/* Fix for Traveller Dropdown Z-Index Issue */
/* This ensures the traveller dropdown appears above "Highest To Lower" tab and other UI elements */

/* ONLY target travellers dropdowns in search forms - not header dropdowns */
.main_search .dropdown-contain,
.search-panel .dropdown-contain,
.flight-search-results .dropdown-contain,
.modify_search .dropdown-contain {
    position: relative !important;
    z-index: 1000 !important;
}

/* ONLY target dropdowns within search areas */
.main_search .dropdown,
.search-panel .dropdown,
.flight-search-results .dropdown,
.modify_search .dropdown {
    position: relative !important;
    z-index: 1 !important;
}

/* ONLY target dropdown menus within search areas - exclude header */
.main_search .dropdown-menu-wrap,
.main_search .dropdown-menu,
.search-panel .dropdown-menu-wrap,
.search-panel .dropdown-menu,
.flight-search-results .dropdown-menu-wrap,
.flight-search-results .dropdown-menu,
.modify_search .dropdown-menu-wrap,
.modify_search .dropdown-menu {
    z-index: 99999 !important;
    position: relative !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* EXCLUDE header dropdowns from high z-index */
header .dropdown-menu,
.navbar .dropdown-menu,
header .dropdown-contain,
.navbar .dropdown-contain {
    z-index: auto !important;
}

/* Ensure quantity buttons are properly positioned ONLY in search areas */
.main_search .qtyBtn,
.search-panel .qtyBtn,
.flight-search-results .qtyBtn,
.modify_search .qtyBtn {
    position: relative !important;
    z-index: 5 !important;
}

.main_search .qtyDec,
.main_search .qtyInc,
.search-panel .qtyDec,
.search-panel .qtyInc,
.flight-search-results .qtyDec,
.flight-search-results .qtyInc,
.modify_search .qtyDec,
.modify_search .qtyInc {
    cursor: pointer !important;
    z-index: 10 !important;
    position: relative !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.main_search .qtyDec:hover,
.main_search .qtyInc:hover,
.search-panel .qtyDec:hover,
.search-panel .qtyInc:hover,
.flight-search-results .qtyDec:hover,
.flight-search-results .qtyInc:hover,
.modify_search .qtyDec:hover,
.modify_search .qtyInc:hover {
    background: rgba(0, 0, 0, 0.1) !important;
    transform: scale(1.1) !important;
}

.main_search .qtyDec:active,
.main_search .qtyInc:active,
.search-panel .qtyDec:active,
.search-panel .qtyInc:active,
.flight-search-results .qtyDec:active,
.flight-search-results .qtyInc:active,
.modify_search .qtyDec:active,
.modify_search .qtyInc:active {
    transform: scale(0.95) !important;
    background: rgba(0, 0, 0, 0.15) !important;
}

.qtyDec svg, .qtyInc svg {
    width: 16px !important;
    height: 16px !important;
    pointer-events: none !important;
}

/* Ensure dropdown toggles work properly */
.dropdown-toggle {
    position: relative !important;
    z-index: 2 !important;
}

/* Force dropdown to be above any sorting/filter tabs or content */
.flights_listing .dropdown-contain,
.modify_search .dropdown-contain {
    position: relative !important;
    z-index: 1000 !important;
}

.flights_listing .dropdown-menu,
.modify_search .dropdown-menu {
    z-index: 99999 !important;
}

/* Ultra-specific selector for flights listing to override any other styles */
.flights_listing .flight-search-form .dropdown-menu,
.flights_listing #contentId .dropdown-menu,
.flights_listing .modify_search .dropdown-menu,
.flight-search-results .dropdown-menu {
    z-index: 99999 !important;
    position: absolute !important;
}

/* Force dropdown to be above sorting/filter tabs */
.flights_listing .sorting-tabs,
.flights_listing .filter-tabs,
.flights_listing .nav-tabs {
    z-index: 1 !important;
    position: relative !important;
}

/* Additional class that can be added via JavaScript for extra force */
.traveller-dropdown-force-top {
    z-index: 999999 !important;
}

/* Responsive fix */
@media (max-width: 767px) {
    .dropdown-menu-wrap,
    .dropdown-menu {
        z-index: 99999 !important;
        position: relative !important;
    }
}