/**
 * Public styles for Nuvho Booking Mask with reduced form element heights
 */

/* Container styling */
.nuvho-booking-mask-container {
    padding: 20px;
    margin: 20px 0;
    box-sizing: border-box;
}

/* Form layout */
.nuvho-booking-form {
    max-width: 1200px;
    margin: 0 auto;
}

.nuvho-form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
    align-items: flex-end;
}

.nuvho-form-field {
    flex: 1;
    min-width: 150px;
    padding: 0 10px;
    margin-bottom: 15px;
    box-sizing: border-box;
}

/* Bottom row with promo code and submit button */
.nuvho-bottom-row {
    justify-content: space-between;
    margin-top: 5px;
}

.nuvho-form-spacer {
    flex-grow: 1;
}

/* Form elements */
.nuvho-booking-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

/* REDUCED HEIGHT FOR ALL FORM ELEMENTS */
.nuvho-booking-form input[type="text"],
.nuvho-booking-form input[type="date"],
.nuvho-booking-form select,
.nuvho-date-picker,
.nuvho-promo-field input {
    height: 40px; /* Reduced height closer to text size */
    width: 100%;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.9);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.nuvho-booking-form button {
    padding: 8px 16px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nuvho-booking-form button:hover {
    opacity: 0.9;
}

/* Date range picker */
.nuvho-date-range {
    flex: 2;
}

.nuvho-date-inputs {
    position: relative;
}

.nuvho-date-picker {
    cursor: pointer;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>');
    background-repeat: no-repeat;
    background-position: calc(100% - 10px) center;
    background-size: 14px;
    padding-right: 30px;
}

/* DateRangePicker customization */
.daterangepicker {
    font-family: inherit;
    border-radius: 5px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000 !important;
}

.daterangepicker .calendar-table {
    border-radius: 4px;
}

.daterangepicker td.active, 
.daterangepicker td.active:hover,
.daterangepicker td.in-range.active {
    background-color: #4c7380 !important;
    border-color: #4c7380 !important;
    color: #fff !important;
}

.daterangepicker td.in-range {
    background-color: rgba(76, 115, 128, 0.2);
    color: #333;
    border-color: transparent;
}

.daterangepicker .drp-selected {
    font-weight: 600;
}

.daterangepicker.show-calendar .drp-buttons {
    border-top: 1px solid #ddd;
}

.daterangepicker .drp-buttons .btn {
    border-radius: 4px;
    padding: 4px 12px;
}

.daterangepicker .drp-buttons .btn.btn-primary {
    background-color: #4c7380;
    border-color: #4c7380;
}

.daterangepicker .drp-buttons .btn.btn-default {
    background-color: #f8f8f8;
    border-color: #ddd;
}

.daterangepicker:after {
    border-bottom-color: #fff;
}

.daterangepicker:before {
    border-bottom-color: rgba(0, 0, 0, 0.2);
}

/* Submit field - bottom right aligned */
.nuvho-submit-field {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

.nuvho-submit-field button[type="submit"] {
    padding: 0 25px;
    font-size: 14px;
    font-weight: 500;
    width: auto;
    margin-top: 0;
    height: 40px; /* Reduced height closer to text size */
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Original stepper controls - keeping for backward compatibility */
.nuvho-stepper {
    display: flex;
    align-items: center;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.9);
    overflow: hidden;
    height: 40px; /* Match the new height */
}

.nuvho-stepper input[type="number"] {
    flex: 1;
    width: 100%;
    border: none;
    padding: 8px 5px;
    text-align: center;
    -moz-appearance: textfield; /* Remove number spinner in Firefox */
    background-color: transparent;
    font-size: 14px;
}

.nuvho-stepper input::-webkit-outer-spin-button,
.nuvho-stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.nuvho-stepper-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.05);
    border: none;
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
    padding: 0;
    transition: background-color 0.2s ease;
}

.nuvho-stepper-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.nuvho-stepper-btn:active {
    background-color: rgba(0, 0, 0, 0.15);
}

/* Promo field styling */
.nuvho-promo-field {
    flex: 0 0 300px;
}

.nuvho-promo-field input {
    height: 40px; /* Reduced height closer to text size */
    width: 100%;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.9);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    font-size: 14px;
}

/* NEW: Guest Selector Styles */
.nuvho-guest-selector-container {
    position: relative;
    margin-bottom: 15px;
    flex: 1;
}

.nuvho-guest-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    height: 40px; /* Reduced height closer to text size */
    box-sizing: border-box;
}

.nuvho-guest-count {
    font-size: 14px;
    text-transform: uppercase;
    color: #333; /* Dark text color for better visibility */
}

.nuvho-guest-trigger {
    color: #333; /* Dark text color */
    background-color: rgba(255, 255, 255, 0.9);
}

/* For better contrast, make sure the text doesn't inherit transparency */
.nuvho-guest-trigger * {
    opacity: 1;
}

.nuvho-guest-count strong {
    font-weight: 700;
    line-height: 1;
    margin-right: 3px;
}

.nuvho-selector-toggle {
    color: #4c7380;
    font-size: 14px;
}

/* Modal styling */
.nuvho-guest-modal {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 5px;
    max-width: 500px;
    overflow: hidden;
}

.nuvho-modal-content {
    padding: 15px;
}

.nuvho-room-title {
    font-size: 16px;
    font-weight: 500;
    padding-bottom: 12px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.nuvho-guest-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.nuvho-guest-label {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* Stepper buttons */
.nuvho-stepper-controls {
    display: flex;
    gap: 8px;
}

.nuvho-circle-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
}

.nuvho-decrease {
    background-color: #4c7380;
    color: white;
}

.nuvho-increase {
    background-color: #4c7380;
    color: white;
}

.nuvho-increase:hover, .nuvho-decrease:hover {
    background-color: #3a6a7c;
}

.nuvho-btn-icon {
    font-weight: bold;
    font-size: 16px;
    line-height: 0;
}

.nuvho-decrease.disabled {
    background-color: #e0e0e0;
    color: #a0a0a0;
    cursor: not-allowed;
}

/* Modal buttons */
.nuvho-modal-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.nuvho-cancel-btn {
    padding: 8px 15px;
    background: transparent;
    border: none;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    width: auto;
}

.nuvho-done-btn {
    padding: 8px 20px;
    background: #4c7380;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    width: auto;
}

.nuvho-done-btn:hover {
    background: #3a6a7c;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .nuvho-form-field {
        flex: 1 0 50%;
    }
    
    .nuvho-date-range {
        flex: 1 0 100%;
    }
    
    .nuvho-promo-field {
        flex: 1 0 60%;
    }
    
    .nuvho-submit-field {
        flex: 0 0 auto;
    }
    
    .ui-datepicker.ui-datepicker-multi {
        width: 100% !important;
    }
    
    .ui-datepicker-multi .ui-datepicker-group {
        width: 100% !important;
        float: none;
        margin-bottom: 10px;
    }
    
    .daterangepicker {
        width: 100%;
        left: 0 !important;
        right: 0 !important;
    }
    
    .daterangepicker .drp-calendar {
        max-width: 100%;
    }
    
    .daterangepicker.ltr .drp-calendar.left {
        clear: both;
    }
    
    /* All form elements maintain the same 40px height on mobile */
    .nuvho-booking-form input[type="text"],
    .nuvho-booking-form input[type="date"],
    .nuvho-booking-form select,
    .nuvho-date-picker,
    .nuvho-guest-trigger,
    .nuvho-promo-field input,
    .nuvho-submit-field button[type="submit"] {
        height: 40px; /* Keep consistent height on mobile */
        padding: 0 12px; /* Slightly smaller padding on mobile */
    }
    
    .nuvho-circle-btn {
        width: 30px;
        height: 30px;
    }
    
    .nuvho-modal-content {
        padding: 12px;
    }
}

@media screen and (max-width: 480px) {
    .nuvho-form-field {
        flex: 1 0 100%;
    }
    
    .nuvho-submit-field {
        flex: 1 0 100%;
    }
    
    .nuvho-submit-field button[type="submit"] {
        width: 100%;
    }
}