/**
 * Search Form Styles - Floating Centered Bar
 * Like luxury hotel booking widget with combined date range
 */

/* Main container - centered floating white box */
.suitesync-search-form-widget {
    background: transparent !important;
    padding: 0;
    border-radius: 10px !important;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
    display: inline-block;
    width: auto;
    max-width: 1000px;
    overflow: hidden;
}

/* Form row - flex layout */
.suitesync-search-form .search-form-row {
    display: flex;
    gap: 0;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: center;
}

/* Individual fields */
.suitesync-search-form .search-form-field {
    flex: 0 0 auto;
    min-width: auto;
    padding: 22px 35px;
    border-right: 1px solid #315143;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.suitesync-search-form .search-form-field:last-child {
    border-right: none;
    padding: 0;
}

/* Labels - small uppercase gray */
.suitesync-search-form .search-form-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 400;
    color: #ffffff;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ========== COMBINED DATE RANGE PICKER ========== */
.search-field-daterange {
    padding: 0 !important;
    border-right: 1px solid #e5e5e5;
}

.daterange-combined {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 18px 25px;
    transition: background 0.2s ease;
    position: relative;
    background: none;
}

.daterange-combined:hover {
    background: #253c32bd;
}

.daterange-part {
    display: flex;
    flex-direction: column;
    min-width: 90px;
}

.daterange-part label {
    display: block;
    margin-bottom: 6px;
    font-weight: 400;
    color: #666666;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    pointer-events: none;
}

.date-display {
    font-size: 15px;
    font-weight: 400;
    color: #7b9d8e;
    white-space: nowrap;
}

.date-display:empty::before,
.date-display:contains('Select date') {
    color: #888888;
}

/* Separator line between check-in and check-out */
.daterange-separator {
    width: 1px;
    height: 40px;
    background: #e5e5e5;
    margin: 0 25px;
}

/* Calendar icon */
.calendar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    margin-left: 20px;
    transition: color 0.2s ease;
}

.calendar-icon:hover {
    color: #666666;
}

.calendar-icon svg {
    width: 20px;
    height: 20px;
    stroke: #ffff;
}

/* Hidden range picker input */
.daterange-hidden-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* ========== END DATE RANGE PICKER ========== */

/* Guest counter - minimal with thin circle buttons */
.guests-counter {
    display: flex;
    align-items: center;
    gap: 12px;
    border: none;
    border-radius: 0;
    padding: 0;
    transition: none;
    height: auto;
    background: transparent;
}

.guests-counter:focus-within {
    background: transparent;
    box-shadow: none;
}

/* THIN OUTLINED circular +/- buttons */
.guest-btn {
    width: 26px;
    height: 26px;
    border: 1px solid #1a1a1a !important;
    background: transparent !important;
    color: #f1f9ff;
    font-size: 16px;
    font-weight: 300;
    border-radius: 50% !important;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

button.guest-btn.guest-minus,
button.guest-btn.guest-plus {
    border-radius: 50% !important;
    background: transparent !important;
    border: 1px solid #ffffff !important;
}

.guest-btn:hover {
    background: #1a1a1a !important;
    color: #ffffff;
}

/* Guest count display - just the number */
.guest-count-display {
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
    background: transparent;
    padding: 0;
    height: auto;
    min-width: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* BOOK NOW button - solid black */
.suitesync-search-form .search-submit-field {
    flex: 0 0 auto;
    padding: 0;
    border-right: none;
}

.suitesync-search-form .search-submit-btn,
button.search-submit-btn {
    border: none !important;
    border-radius: 0 5px 5px 0 !important;
    height: 100%;
    min-height: 85px;
    width: auto;
    padding: 25px 45px;
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    background: transparent;
}

.suitesync-search-form .search-submit-btn:hover,
button.search-submit-btn:hover {
    background: #333333 !important;
}

.suitesync-search-form .search-submit-btn svg {
    display: none;
}

/* ========== FLATPICKR RANGE STYLING ========== */
.flatpickr-calendar {
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 4px;
}

.flatpickr-calendar.showMonths2 {
    width: auto !important;
}

/* Range selection styling */
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #1a1a1a !important;
    border-color: #1a1a1a !important;
    color: #fff !important;
}

.flatpickr-day.inRange {
    background: rgba(26, 26, 26, 0.1) !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.flatpickr-day.startRange {
    border-radius: 50% 0 0 50% !important;
}

.flatpickr-day.endRange {
    border-radius: 0 50% 50% 0 !important;
}

.flatpickr-day.startRange.endRange {
    border-radius: 50% !important;
}

.flatpickr-day:hover {
    background: #f0f0f0;
    border-color: #f0f0f0;
}

/* ========== END FLATPICKR STYLING ========== */

/* Responsive - Mobile */
@media (max-width: 768px) {
    .suitesync-search-form-widget {
        width: 100%;
        max-width: 100%;
        background: #ffffff !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
        border-radius: 8px !important;
        padding: 15px !important;
    }

    .suitesync-search-form .search-form-row {
        flex-direction: column;
        gap: 0;
    }

    .suitesync-search-form .search-form-field {
        width: 100%;
        padding: 15px 20px;
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
        display: flex;
        align-items: center;
    }
    
    .search-field-daterange {
        border-bottom: 1px solid #e5e5e5;
    }
    
    .daterange-combined {
        padding: 15px 20px;
    }
    
    .daterange-separator {
        margin: 0 15px;
    }

    .suitesync-search-form .search-submit-field {
        width: 100%;
    }

    .suitesync-search-form .search-submit-btn,
    button.search-submit-btn {
        width: 100%;
        min-height: 55px;
        padding: 15px 20px;
    }
    
    /* Single month on mobile */
    .flatpickr-calendar.showMonths2 .flatpickr-months {
        flex-wrap: wrap;
    }
}

@media (max-width: 576px) {
    .suitesync-search-form-widget {
        padding: 12px !important;
        background: #ffffff !important;
        box-shadow: 0 3px 15px rgba(0, 0, 0, 0.12) !important;
    }
    
    .suitesync-search-form .search-form-field {
        padding: 12px 15px;
    }
    
    .daterange-combined {
        padding: 12px 15px;
    }
    
    .daterange-part {
        min-width: 70px;
    }
    
    .date-display {
        font-size: 13px;
    }
    
    .search-submit-btn {
        padding: 13px 18px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .suitesync-search-form-widget {
        padding: 12px !important;
        background: #ffffff !important;
        box-shadow: 0 3px 15px rgba(0, 0, 0, 0.12) !important;
    }
    
    .suitesync-search-form .search-form-field {
        padding: 12px 15px;
    }
    
    .daterange-combined {
        padding: 12px 15px;
    }
    
    .daterange-part {
        min-width: 70px;
    }
    
    .date-display {
        font-size: 13px;
    }
    
    .search-submit-btn {
        padding: 13px 18px;
        font-size: 13px;
    }
}
