/* Modern Booking Bar Styles */

.banner {
    position: relative;
}

.banner-form {
    position: relative;
    z-index: 1060 !important;
}

/* Specific override for the section containing the booking bar to prevent dropdown clipping */
.hero-search-section {
    overflow: visible !important;
    position: relative;
    z-index: 100; /* Ensure it stays above subsequent sections */
}
/* Ensure the Tom Select dropdown itself has maximum priority within that context */
.ts-dropdown {
    z-index: 9999 !important; 
}

/* Overlay positioning over the hero slider */
.booking-widget-overlay {
    position: absolute;
    margin-top: -25vh;
    left: 0;
    width: 100%;
    z-index: 1050 !important; /* Extremely high to stay above ribbons and badges */
}

.modern-booking-bar-wrapper {
    background: #ffffff;
    padding: 25px; /* Increased padding for a more spacious feel */
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: flex-start; /* Align labels at the top */
    gap: 5px;
    flex-wrap: nowrap;
    width: 100%;
}

.booking-field {
    display: flex;
    flex-direction: column;
    padding: 0px 8px;
    transition: background-color 0.2s;
    min-width: 0;
    position: relative;
    overflow: visible;
}

.booking-field:hover,
.booking-field:focus-within {
    z-index: 10;
}

.booking-field.flex-grow-3 {
    flex: 3 1 auto;
}

.booking-field label {
    font-size: 14px; /* More standard label size */
    color: #64748b;
    margin-bottom: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.booking-field .field-content {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    min-height: 50px;
    border-bottom: 1px solid #e2e8f0; /* Subtle underline */
    transition: border-color 0.3s ease;
}

.booking-field:hover .field-content {
    border-color: var(--theme-primary-color); /* Highlight underline on hover */
}

.booking-field .field-content i.fa {
    color: var(--theme-primary-color); /* Premium gold/brown color */
    font-size: 16px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.booking-field .form-control {
    border: none !important;
    padding: 0 !important;
    height: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 15px;
    color: #666; /* Less black, more grey */
    font-weight: 400; /* Non-bold value */
    width: 100%;
    overflow: visible;
}

/* Ensure inputs and selects don't truncate text */
.booking-field input.form-control,
.booking-field select.form-control {
    text-overflow: clip;
    white-space: nowrap;
    min-width: 0;
}

.booking-field select.form-control {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: none;
}

.booking-field .chevron-icon {
    font-size: 10px;
    color: #ccc;
    flex-shrink: 0;
    margin-left: 5px;
}

.field-divider-80 {
    width: 2px;
    height: 80px;
    background-color: #e5e5e5;
}

.booking-dates-row {
    display: flex;
    align-items: flex-start;
    flex: 3 1 auto;
}

.booking-dates-row .booking-field {
    flex: 1;
}

.occupancy-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    width: 280px;
    margin-top: 10px;
}

/* ========================================= */
/*      TOMSELECT PREMIUM DROPDOWN STYLING   */
/* ========================================= */

/* Main Wrapper - Fixed width with expansion logic */
.ts-wrapper.tom-select-premium {
    width: 340px !important;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* The Main Control Box */
.ts-wrapper.tom-select-premium .ts-control {
    border: 0px !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s ease !important;
    height: 50px !important;
    /* display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important; */
}

/* Focus State */

/* Custom Dropdown Arrow */
.ts-wrapper.tom-select-premium .ts-control::after {
    content: "\f107" !important;
    font-family: "FontAwesome" !important;
    font-size: 12px !important;
    color: #94a3b8 !important;
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    transition: transform 0.3s ease !important;
}

.ts-wrapper.tom-select-premium.open .ts-control::after {
    transform: translateY(-50%) rotate(180deg) !important;
}

/* Selected item styling */
.ts-wrapper.tom-select-premium .ts-control .item {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

/* Dropdown Menu styling */
.ts-wrapper.tom-select-premium .ts-dropdown,
.ts-dropdown.tom-select-premium-dropdown {
    border-radius: 12px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #e2e8f0 !important;
    padding: 6px !important;
    margin-top: 8px !important;
    background: #ffffff !important;
    animation: ts-dropdown-fade 0.2s ease-out !important;
}

@keyframes ts-dropdown-fade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Individual Options */
.ts-wrapper.tom-select-premium .ts-dropdown .option {
    border-radius: 8px !important;
    padding: 10px 12px !important;
    margin-bottom: 2px !important;
    transition: all 0.2s ease !important;
    font-size: 14px !important;
    color: #475569 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Hover/Active State */
.ts-wrapper.tom-select-premium .ts-dropdown .active {
    background-color: #ecf2f7 !important;
}

/* Selected State in Menu */
.ts-wrapper.tom-select-premium .ts-dropdown .selected {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
    font-weight: 600 !important;
}

/* --- Dropdown Search Input (Plugin: dropdown_input) --- */
.ts-dropdown .ts-dropdown-input-wrap {
    padding: 12px 12px 8px 12px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.ts-dropdown .ts-dropdown-input {
    width: 100% !important;
    padding: 10px 15px 10px 35px !important;
    border-radius: 20px !important;
    border: 1px solid #e2e8f0 !important;
    background-color: #f8fafc !important;
    font-size: 14px !important;
    color: #475569 !important;
    outline: none !important;
}

.ts-dropdown .ts-dropdown-input-wrap::before {
    content: "\f002" !important;
    font-family: "FontAwesome" !important;
    position: absolute !important;
    left: 25px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #94a3b8 !important;
    font-size: 14px !important;
    z-index: 1 !important;
    margin-top: -2px !important;
}

/* Above state for collision detection */
.ts-dropdown.ts-dropdown--above {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    border-radius: 12px !important;
    box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.1), 0 -8px 10px -6px rgba(0, 0, 0, 0.1) !important;
}

/* Hide the default input in the control box when using dropdown_input plugin */
.ts-wrapper.tom-select-premium .ts-control > input {
    display: none !important;
}

/* Add to modern-general-style.css */
@media (max-width: 767px) {
    .ts-wrapper.tom-select-premium {
        width: 100% !important; /* Prevents horizontal scroll on small phones */
    }
}

/* Responsive adjustments */
@media (max-width: 1199px) {
    .modern-booking-bar-wrapper {
        flex-wrap: wrap;
        gap: 15px;
    }
    .booking-field {
        flex: 1 1 45%;
    }
    .field-divider {
        display: none;
    }
}

@media (max-width: 991px) {
    .booking-widget-overlay {
        position: relative;
        bottom: auto;
        margin-top: -30px;
        padding: 0 15px;
    }
    
    .modern-booking-bar-wrapper {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
    }
    
    .booking-field {
        flex: 1 1 auto;
        padding: 10px 0;
        /* border-bottom: 1px solid #eee; */
    }
    
    .booking-field:last-of-type {
        border-bottom: none;
    }
    
    .booking-action {
        margin-left: 0;
        margin-top: 20px;
    }
    
    .check-now-btn {
        width: 100%;
    }

    .field-divider-80{
        display: none;
    }
}
