.autoSelected .tag img,
.saved-route-tag img,
.gf-result-card img {
    max-width: 20px !important;
    height: auto !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.airline-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
}

.airline-logo-wrapper {
    background: transparent !important;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 4px;
    margin-bottom: 5px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.airline-logo-wrapper img {
    max-width: 36px;
    max-height: 36px;
    object-fit: contain;
    border-radius: 30px;
}

.compact-mode .airline-logo-wrapper {
    width: 16px;
    height: 16px;
    padding: 1px;
}

#cheap-first-class {
    background: radial-gradient(circle at top right, rgba(187, 153, 93, 0.05), transparent 60%), 
                linear-gradient(135deg, #050510 0%, #0c0b25 50%, #050510 100%) !important;
    color: #fff;
}

#general-flights-page {
    padding: 80px 0;
    min-height: 70vh;
    background: transparent !important;
    font-family: 'Jost', sans-serif;
}

header {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#cheap-first-class .footer-area {
    background: transparent !important;
}

#cheap-first-class #footer-new {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
    padding: 30px;
    margin-top: 80px !important;
    margin-bottom: 40px !important;
}

#cheap-first-class #footer-new,
#cheap-first-class #footer-new a {
    color: rgba(255, 255, 255, 0.6) !important;
}

#cheap-first-class #footer-new a:hover {
    color: #fff !important;
}

#menu {
    background: transparent !important;
}

#footer,
#footer a {
    color: rgba(255, 255, 255, 0.6) !important;
}

#footer a:hover {
    color: #fff !important;
}

header .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
}

header .nav-link:hover {
    color: #fff !important;
}

header .nav-item.active .nav-link {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(184, 134, 11, 0.2) 100%) !important;
    border: 1px solid rgba(212, 175, 55, 0.5) !important;
    border-radius: 4px !important;
    color: #FFD700 !important;
}

#logo {
    filter: brightness(0) invert(1) !important;
}

#top {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
}

#locale-picker-top {
    display: none !important;
}

#general-flights-page .gf-main-title {
    background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fcf6ba, #aa771c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 3.5rem;
    font-weight: 200;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: -2px;
    text-transform: uppercase;
}

.gf-badge-container {
    text-align: center;
    margin-bottom: 34px;
}

.gf-one-way-badge {
    background: transparent;
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 2px;
    color: #d4af37;
    border: 1px solid #d4af37;
    border-radius: 20px;
    padding: 4px 14px;
    vertical-align: middle;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.gf-one-way-badge-btn {
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.gf-one-way-badge-btn:hover {
    background: rgba(212, 175, 55, 0.14);
    border-color: #f9d423;
    color: #f9d423;
    transform: translateY(-1px);
}

.gf-one-way-badge-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

.input-field-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
}

.search-pill-container {
    max-width: 1050px;
    margin: 0 auto;
}

.continent-quick-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 18px;
}

.continent-quick-btn {
    min-width: 132px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.continent-quick-btn:hover,
.continent-quick-btn.active {
    background: linear-gradient(135deg, rgba(191, 149, 63, 0.95), rgba(252, 246, 186, 0.98), rgba(179, 135, 40, 0.95));
    border-color: rgba(249, 212, 35, 0.65);
    color: #16120a;
    box-shadow: 0 12px 28px rgba(212, 175, 55, 0.22);
    transform: translateY(-1px);
}

.gf-presearch-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
    gap: 15px;
}

.gf-saved-flights-trigger {
    padding-right: 10px;
}

.gf-saved-routes-trigger {
    display: none;
}

.gf-saved-routes-count {
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(165, 180, 252, 0.18);
    border: 1px solid rgba(165, 180, 252, 0.28);
    color: #a5b4fc;
    font-size: 0.75rem;
}

.gf-saved-flights-count {
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(43, 185, 166, 0.18);
    border: 1px solid rgba(43, 185, 166, 0.28);
    color: #d4af37;
    font-size: 0.75rem;
}

.search-pill {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 60px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25), 0 0 20px rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    padding: 10px 10px 10px 30px;
    position: relative;
    z-index: 1;
}

/* Airport fields wider than date fields */
.search-field {
    flex: 1 1 18%;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    padding: 12px 10px;
    position: relative;
    cursor: pointer;
    border-radius: 40px;
    transition: background 0.2s ease;
}

.search-field.airport-field {
    flex: 1 1 30%;
}

.search-field.date-range-field {
    flex: 1 1 36%;
}

.search-field:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-field .icon {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.4);
    margin-right: 15px;
    min-width: 20px;
    text-align: center;
    margin-top: 2px;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    position: relative;
}

.add-airport-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(43, 185, 166, 0.15);
    border: 1px solid rgba(43, 185, 166, 0.3);
    color: #d4af37;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.7rem;
    z-index: 5;
    padding: 0;
}

.input-field-row .add-airport-btn + .add-airport-btn {
    right: 32px;
}

.add-airport-btn.active {
    background: #d4af37;
    color: #fff;
}

.add-airport-btn:hover {
    background: #d4af37;
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.input-wrapper label {
    font-size: 0.7rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.clean-input {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 1.05rem !important;
    color: #fff !important;
    outline: none !important;
    flex: 1;
    min-width: 120px;
    font-weight: 300;
    height: 30px;
}

.clean-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
}

.gf-loading-state {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    border-radius: 22px;
    background:
        radial-gradient(circle at top left, rgba(43, 185, 166, 0.18), transparent 42%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 40px rgba(6, 10, 28, 0.28);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: hidden;
    position: relative;
}

.gf-loading-state::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.08) 48%, transparent 76%);
    transform: translateX(-120%);
    animation: gfLoadingSheen 2.8s ease-in-out infinite;
    pointer-events: none;
}

.gf-loading-state-compact {
    padding: 16px 18px;
    border-radius: 18px;
    gap: 14px;
}

.gf-loading-orbit {
    width: 56px;
    height: 56px;
    position: relative;
    flex: 0 0 56px;
}

.gf-loading-state-compact .gf-loading-orbit {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
}

.gf-loading-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(165, 180, 252, 0.35);
}

.gf-loading-ring-a {
    animation: gfLoadingPulse 1.8s ease-out infinite;
}

.gf-loading-ring-b {
    inset: 8px;
    border-color: rgba(43, 185, 166, 0.45);
    animation: gfLoadingPulse 1.8s ease-out infinite 0.35s;
}

.gf-loading-core {
    position: absolute;
    inset: 13px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(165, 180, 252, 0.95), rgba(43, 185, 166, 0.95));
    color: #08111f;
    box-shadow: 0 8px 18px rgba(43, 185, 166, 0.35);
    animation: gfLoadingFloat 1.6s ease-in-out infinite;
}

.gf-loading-state-compact .gf-loading-core {
    inset: 10px;
}

.gf-loading-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.gf-loading-title {
    color: #fff;
    font-size: 1.02rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    margin-bottom: 8px;
}

.gf-loading-state-compact .gf-loading-title {
    font-size: 0.92rem;
    margin-bottom: 6px;
}

.gf-loading-detail {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.87rem;
    font-weight: 300;
    line-height: 1.45;
    margin-top: 8px;
}

.gf-loading-state-compact .gf-loading-detail {
    font-size: 0.8rem;
    margin-top: 6px;
}

.gf-loading-track {
    display: flex;
    gap: 7px;
}

.gf-loading-track span {
    display: block;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(165, 180, 252, 0.22), rgba(43, 185, 166, 0.85));
    animation: gfLoadingBars 1.4s ease-in-out infinite;
}

.gf-loading-track span:nth-child(1) {
    width: 42px;
}

.gf-loading-track span:nth-child(2) {
    width: 76px;
    animation-delay: 0.15s;
}

.gf-loading-track span:nth-child(3) {
    width: 28px;
    animation-delay: 0.3s;
}

@keyframes gfLoadingPulse {
    0% {
        transform: scale(0.82);
        opacity: 0;
    }
    35% {
        opacity: 0.75;
    }
    100% {
        transform: scale(1.15);
        opacity: 0;
    }
}

@keyframes gfLoadingFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

@keyframes gfLoadingBars {
    0%,
    100% {
        opacity: 0.4;
        transform: scaleX(0.92);
    }
    50% {
        opacity: 1;
        transform: scaleX(1.08);
    }
}

@keyframes gfLoadingSheen {
    0% {
        transform: translateX(-120%);
    }
    100% {
        transform: translateX(140%);
    }
}

/* --- Flatpickr Range visibility --- */
.flatpickr-day.inRange {
    background: rgba(43, 185, 166, 0.2) !important;
    border-radius: 0 !important;
    box-shadow: -5px 0 0 rgba(43, 185, 166, 0.2), 5px 0 0 rgba(43, 185, 166, 0.2) !important;
    color: #d4af37 !important;
}

.flatpickr-day.selected.startRange,
.flatpickr-day.startRange,
.flatpickr-day.selected.endRange,
.flatpickr-day.endRange {
    background: #d4af37 !important;
    color: #fff !important;
    border-color: #d4af37 !important;
}

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

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

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

.divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 5px;
    flex-shrink: 0;
}

.btn-pill-save-route {
    height: 54px;
    width: 54px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #a5b4fc;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 10px;
}

.btn-pill-save-route:hover {
    background: rgba(165, 180, 252, 0.15);
    transform: scale(1.05);
    color: #fff;
    border-color: rgba(165, 180, 252, 0.3);
}

.btn-pill-search {
    height: 54px;
    width: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fcf6ba, #aa771c);
    color: #000;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    box-shadow: 0 4px 15px rgba(187, 153, 93, 0.4);
}

.btn-pill-search:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.6);
}

/* --- Autocomplete Dropdown (scoped to page) --- */
.autocomplete {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    width: 350px;
    background: #1e1c32 !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6) !important;
    z-index: 99999 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 0;
    overflow: hidden;
}

/* Style the scrollbar */
.autocomplete ul::-webkit-scrollbar {
    width: 6px;
}

.autocomplete ul::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.autocomplete ul::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.autocomplete ul::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.autocomplete::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: #1e1c32 !important;
    transform: rotate(45deg);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 1;
}

.autocomplete .selected span {
    display: block !important;
    padding: 10px 20px !important;
    font-size: 0.75rem !important;
    font-weight: 300 !important;
    color: #d4af37 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

.autocomplete .selected li {
    background: rgba(255, 255, 255, 0.05) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.autocomplete .selected li a {
    color: #fff !important;
    font-weight: 300 !important;
}

.autocomplete ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.autocomplete li {
    position: relative !important;
    background: transparent !important;
}

.autocomplete li a {
    display: flex !important;
    align-items: center !important;
    padding: 12px 20px !important;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 0.95rem !important;
    transition: background 0.2s !important;
    background: transparent !important;
}

.autocomplete li a:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

.autocomplete li a i {
    width: 24px !important;
    color: rgba(255, 255, 255, 0.4) !important;
    font-size: 1.1rem !important;
    text-align: center !important;
    margin-right: 12px !important;
}

.autocomplete li a .name {
    flex: 1 !important;
    font-weight: 300 !important;
}

.autocomplete li .check {
    display: none !important;
}

.autocomplete .clearAll {
    display: block !important;
    padding: 10px 20px !important;
    color: #ff5252 !important;
    font-size: 0.8rem !important;
    font-weight: 300 !important;
    text-align: right !important;
    cursor: pointer !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.autocomplete .clearAll:hover {
    text-decoration: underline !important;
}

/* --- Selected Airport Tags (scoped to beat global style.css) --- */
#general-flights-page .autoSelected {
    position: static !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    margin-left: 0 !important;
    display: flex !important;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 4px;
}

#general-flights-page .autoSelected.active {
    z-index: auto !important;
}

#general-flights-page .autoSelected .cont {
    position: static !important;
    margin-top: 0 !important;
    white-space: normal !important;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

#general-flights-page .autoSelected .tag {
    background: rgba(43, 185, 166, 0.15) !important;
    color: #fff !important;
    border: 1px solid rgba(43, 185, 166, 0.4) !important;
    border-radius: 20px !important;
    padding: 3px 12px !important;
    font-weight: 300 !important;
    font-size: 0.82rem !important;
    display: inline-flex !important;
    align-items: center;
    white-space: nowrap;
    line-height: 1.4;
}

#general-flights-page .autoSelected .tag.continent-shortcut-tag {
    background: rgba(212, 175, 55, 0.16) !important;
    border-color: rgba(212, 175, 55, 0.45) !important;
    color: #f8e6a0 !important;
}

#general-flights-page .autoSelected .tag a {
    color: rgba(255, 255, 255, 0.5) !important;
    margin-left: 6px;
    font-size: 0.75rem;
    text-decoration: none !important;
    z-index: auto !important;
}

#general-flights-page .autoSelected .tag a:hover {
    color: #e74c3c !important;
}

#general-flights-page .autoSelected .tag i {
    margin: 0;
}

#general-flights-page .autoSelected .tag.continent-shortcut-tag i {
    margin-right: 8px !important;
}

/* Input remains visible even with tags */
.input-field-row .autoSelected:has(.tag) {
    margin-right: 8px;
}

/* Results Updates */
#gf-results {
    max-width: 900px;
    margin: 60px auto 0;
}

.results-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.results-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.results-toolbar-label {
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.92rem;
    font-weight: 300;
}

.toolbar-icon-btn,
.toolbar-chip-btn {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
        rgba(11, 12, 35, 0.35);
    color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 22px rgba(5, 6, 19, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.toolbar-icon-btn {
    width: 46px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.toolbar-icon-btn:hover,
.toolbar-chip-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(165, 180, 252, 0.38);
    box-shadow: 0 14px 28px rgba(7, 9, 28, 0.24), 0 0 0 1px rgba(165, 180, 252, 0.06);
    color: #fff;
}

.toolbar-icon-btn.active {
    background:
        linear-gradient(135deg, rgba(43, 185, 166, 0.24), rgba(88, 188, 255, 0.16)),
        rgba(10, 16, 35, 0.4);
    border-color: rgba(43, 185, 166, 0.5);
    color: #8cf2e4;
    box-shadow: 0 14px 30px rgba(21, 121, 110, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.toolbar-price-input {
    width: 110px;
    min-width: 110px;
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #fff !important;
    border-radius: 12px;
    padding: 9px 12px !important;
    outline: none;
    font-size: 0.92rem !important;
    font-weight: 300;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.toolbar-price-input:focus {
    border-color: rgba(165, 180, 252, 0.42) !important;
    box-shadow: 0 0 0 4px rgba(165, 180, 252, 0.12);
}

.toolbar-chip-btn {
    height: 42px;
    min-width: 42px;
    padding: 0 14px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.toolbar-chip-btn-apply {
    display: none;
    background:
        linear-gradient(135deg, rgba(43, 185, 166, 0.24), rgba(43, 185, 166, 0.12)),
        rgba(8, 20, 27, 0.35);
    border-color: rgba(43, 185, 166, 0.42);
    color: #79f0dd;
}

.toolbar-chip-btn-clear {
    background:
        linear-gradient(135deg, rgba(231, 76, 60, 0.2), rgba(231, 76, 60, 0.08)),
        rgba(34, 12, 18, 0.34);
    border-color: rgba(231, 76, 60, 0.34);
    color: #ff8d82;
}

.clean-flight-row {
    display: flex;
    align-items: center;
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    position: relative;
}

.clean-flight-row:hover {
    background: rgba(255, 255, 255, 0.02);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.clean-flight-row:last-child {
    border-bottom: none;
}

.airline-logo {
    width: 70px;
    flex-shrink: 0;
    text-align: center;
    background: #ffffff17;
    padding: 10px;
    border-radius: 8px;
}

.airline-logo img {
    max-width: 45px;
    border-radius: 4px;
}

.flight-info {
    flex: 2;
    padding: 0 25px;
}

.flight-info .route {
    font-weight: 300;
    font-size: 1.15rem;
    color: #fff;
    margin-bottom: 4px;
}

.flight-info .times {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.flight-info .times .time {
    color: #fff;
    font-weight: 300;
    margin-left: 4px;
}

.flight-info .times .duration {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.8rem;
    margin-left: 15px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Compact Mode CSS */
.compact-mode .clean-flight-row {
    padding: 6px 12px;
    border-radius: 6px;
    flex-wrap: nowrap;
    gap: 10px;
}

.compact-mode .airline-logo {
    width: 10px;
    padding: 0;
    background: transparent;
}

.compact-mode .airline-logo img {
    height: 10px;
    width: auto;
    max-width: 10px;
}

.compact-mode .flight-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    flex: 3;
    padding: 0 5px;
}

.compact-mode .flight-info .route {
    font-size: 0.85rem;
    margin: 0;
    min-width: 0;
    flex: 1.5;
}

.compact-mode .flight-info .times {
    font-size: 0.8rem;
    margin: 0;
    min-width: 0;
}

.compact-mode .flight-info .times .duration {
    margin-left: 8px;
    font-size: 0.7rem;
}

.compact-mode .flight-stops {
    margin: 0 !important;
    font-size: 0.75rem;
    flex: 0 0 auto;
    min-width: 80px;
    text-align: left;
}

.compact-mode .stopover-badge {
    flex-direction: row !important;
    padding: 2px 8px !important;
    gap: 6px !important;
}

.compact-mode .stopover-flags img {
    height: 10px;
}

.compact-mode .btn-compare {
    display: none !important;
}

.compact-mode .show-more-flights {
    padding: 4px 10px;
    font-size: 0.7rem;
    background: transparent;
    justify-content: center;
}

.compact-mode .btn-select-flight {
    padding: 2px;
    width: 26px;
    height: 26px;
    font-size: 0.7rem;
}

.compact-mode .btn-save-flight {
    width: 26px;
    height: 26px;
    font-size: 0.7rem;
}

.compact-mode .flight-action {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.compact-mode .flight-price {
    align-items: center !important;
    flex-direction: row !important;
    gap: 4px !important;
    font-size: 0.9rem !important;
    margin-bottom: 0 !important;
}

.compact-mode .flight-group-header {
    margin-top: 10px;
    margin-bottom: 5px;
    font-size: 0.85rem;
    padding-left: 10px;
}

.compact-mode .clean-flight-row {
    padding: 4px 10px;
    gap: 15px;
    justify-content: space-between;
}

.flight-stops {
    flex: 1;
    text-align: center;
    font-size: 0.95rem;
    color: #fff;
}

.flight-action {
    flex: 1;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.flight-price {
    background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fcf6ba, #aa771c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.flight-action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}

.btn-select-flight,
.btn-save-flight,
.btn-compare {
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(6, 8, 24, 0.16);
}

.btn-select-flight::before,
.btn-save-flight::before,
.btn-compare::before,
.toolbar-icon-btn::before,
.toolbar-chip-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 22%, rgba(255, 255, 255, 0.12) 50%, transparent 78%);
    transform: translateX(-130%);
    transition: transform 0.45s ease;
    pointer-events: none;
}

.btn-select-flight:hover::before,
.btn-save-flight:hover::before,
.btn-compare:hover::before,
.toolbar-icon-btn:hover::before,
.toolbar-chip-btn:hover::before {
    transform: translateX(130%);
}

.btn-select-flight {
    background:
        radial-gradient(circle at 30% 30%, rgba(165, 180, 252, 0.34), transparent 55%),
        linear-gradient(135deg, rgba(116, 75, 162, 0.85), rgba(91, 149, 255, 0.72));
    border: 1px solid rgba(165, 180, 252, 0.3);
    color: #fff;
    padding: 8px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-select-flight:hover {
    border-color: rgba(165, 180, 252, 0.5);
    color: #fff;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 14px 30px rgba(90, 96, 210, 0.32);
}

.btn-save-flight {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
        rgba(10, 10, 30, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.8);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save-flight:hover {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05)),
        rgba(14, 14, 40, 0.42);
    color: #fff;
    transform: translateY(-2px);
}

.btn-save-flight.saved {
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 221, 107, 0.34), transparent 58%),
        linear-gradient(135deg, rgba(241, 196, 15, 0.24), rgba(110, 78, 14, 0.24));
    border-color: rgba(241, 196, 15, 0.4);
    color: #f1c40f;
}

.btn-compare {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
        rgba(10, 10, 30, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.88);
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-compare:hover {
    transform: translateY(-2px);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(165, 180, 252, 0.12)),
        rgba(10, 10, 30, 0.45);
    border-color: rgba(165, 180, 252, 0.36);
    color: #fff;
    box-shadow: 0 14px 28px rgba(40, 46, 112, 0.2);
}

.stopover-badge {
    color: #fff !important;
    text-decoration: none !important;
    font-size: 0.8rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    padding: 6px 12px !important;
    border-radius: 16px;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    box-shadow: 0 10px 22px rgba(8, 9, 28, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.stopover-badge-content {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.stopover-badge:hover {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05)) !important;
    border-color: rgba(165, 180, 252, 0.24) !important;
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(8, 9, 28, 0.22);
}

.stopover-flags {
    display: flex;
    gap: 3px;
    align-items: center;
}

.stopover-flags img {
    width: 16px;
    height: 12px;
    border-radius: 2px;
}

.text-success {
    color: #2ecc71 !important;
    font-size: 0.9rem;
}

.flight-luggage-chip {
    display: none;
}

.stopover-badge.fav-stopover {
    background: rgba(241, 196, 15, 0.15) !important;
    border-color: rgba(241, 196, 15, 0.4) !important;
    color: #f1c40f !important;
}

.stopover-badge.fav-stopover i.fa-star {
    color: #f1c40f;
}

/* Grouping Options */
.grouping-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.grouping-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.grouping-btn.active {
    background: rgba(43, 185, 166, 0.2);
    border-color: #d4af37;
    color: #d4af37;
}

#gf-grouping-options {
    max-width: 900px;
    margin: 60px auto 0;
    padding: 0 20px;
}

.gf-toolbar-row {
    display: flex;
    gap: 15px;
    margin-bottom: 16px;
    align-items: center;
}

.gf-toolbar-row.gf-toolbar-row-compact {
    gap: 10px;
    margin-bottom: 30px;
}

.gf-toolbar-label {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

.gf-toolbar-spacer {
    margin-left: auto;
}

.flight-group-header {
    background: linear-gradient(to right, rgba(212, 175, 55, 0.1), rgba(255, 255, 255, 0.03));
    color: #fff;
    font-size: 1.15rem;
    font-weight: 400;
    margin-top: 35px;
    margin-bottom: 0px;
    padding: 18px 25px;
    border-left: 4px solid #d4af37;
    border-radius: 15px 15px 0 0;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    letter-spacing: 0.5px;
}

.flight-group-header:first-of-type {
    margin-top: 0;
}

.group-toggle-btn {
    background: none;
    border: none;
    color: #d4af37;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0 8px;
    transition: transform 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.group-toggle-btn.collapsed {
    transform: rotate(-90deg);
}

.group-count {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-weight: 300;
    margin-left: 10px;
}

.group-price {
    color: #d4af37;
    font-size: 0.9rem;
    font-weight: 300;
    margin-left: 10px;
}

.flight-group-content {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0 0 12px 12px;
    margin-bottom: 30px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.flight-group-content.top-only .clean-flight-row:not(:first-child) {
    display: none;
}

.flight-group-content.collapsed {
    max-height: 0;
}

.show-more-flights {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    background: transparent;
    color: #d4af37;
    font-weight: 300;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.show-more-flights:hover {
    background: rgba(43, 185, 166, 0.05);
    color: #fff;
}

.flight-group-content:not(.top-only) .show-more-flights {
    display: none;
}

/* Dark Modal Styling */
#cheap-first-class .modal-content {
    background: #1e1c32;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

#cheap-first-class .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#cheap-first-class .modal-header h4 {
    font-weight: 300;
}

#cheap-first-class .close {
    color: #fff;
    text-shadow: none;
    opacity: 0.8;
}

#cheap-first-class .modal-body hr {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#cheap-first-class .modal-body strong {
    color: #fff;
}

#cheap-first-class .modal-body small {
    color: rgba(255, 255, 255, 0.5);
}

.gf-modal-content {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gf-modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.gf-modal-title-success {
    color: #2ecc71;
    font-weight: 300;
}

.gf-modal-title-info {
    color: #a5b4fc;
    font-weight: 300;
}

.gf-modal-title-bookmark {
    color: #f1c40f;
    font-weight: 300;
}

.gf-modal-close {
    color: #fff;
    opacity: 0.5;
}

.gf-modal-body {
    background: transparent;
}

.special-flights-intro {
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
    line-height: 1.6;
}

.special-flights-feature-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.special-flights-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.special-flights-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(43, 185, 166, 0.14);
    border: 1px solid rgba(43, 185, 166, 0.22);
    color: #f9d423;
    font-size: 0.95rem;
}

.special-flights-feature-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.45;
}

.saved-flights-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.saved-flights-toolbar-title {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 300;
    color: #fff;
}

.saved-flights-toolbar-copy {
    margin: 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.85rem;
}

.saved-flights-refresh {
    white-space: nowrap;
}

.saved-flights-refresh[disabled] {
    opacity: 0.7;
    cursor: wait;
}

.saved-flights-empty {
    padding: 28px;
    border-radius: 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.saved-flights-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 8px;
}

.saved-flights-list::-webkit-scrollbar {
    width: 6px;
}

.saved-flights-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.saved-flights-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.saved-flight-flag {
    margin-right: 6px;
    vertical-align: middle;
    margin-top: -2px;
}

.saved-items-section-title {
    margin: 22px 0 12px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.4px;
}

.saved-items-section-title:first-of-type {
    margin-top: 0;
}

.saved-flight-card {
    padding: 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.saved-route-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid #a5b4fc !important;
    margin-bottom: 12px;
    overflow: hidden;
}

.saved-route-card:hover {
    transform: translateY(-2px);
    background: rgba(165, 180, 252, 0.08) !important;
    border-color: rgba(165, 180, 252, 0.2);
}

.saved-route-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.saved-route-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 6px;
    margin: 2px 4px 2px 0;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.saved-route-row {
    display: block;
    font-size: 0.95rem;
    color: #fff;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 4px;
}

.saved-route-row .icon {
    display: inline-block;
    width: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    margin-right: 6px;
}

.saved-route-details .saved-flight-flag {
    margin-right: 4px;
    display: inline-block;
}

.saved-pop {
    animation: savedPop 0.5s ease;
}

@keyframes savedPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); color: #fff; background: #a5b4fc; }
    100% { transform: scale(1); }
}

.saved-flight-card-collapsed {
    padding: 8px 12px;
}

.saved-flight-card-collapsed-row {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
}

.saved-flight-collapsed-info {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.62);
    white-space: nowrap;
}

.action-btn-small {
    padding: 4px 8px;
    font-size: 0.7rem;
}

.saved-flight-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    min-width: 0;
}

.saved-flight-actions {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
}

.saved-flight-route {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 300;
}

.saved-flight-route-flag,
.saved-flight-flag {
    width: 18px;
    height: 13px;
    border-radius: 2px;
    object-fit: cover;
}

.saved-flight-route-flag:first-child,
.saved-flight-flag:first-child {
    margin-right: 8px;
}

.saved-flight-route-flag:last-child,
.saved-flight-flag:last-child {
    margin-left: 8px;
}

.saved-flight-route span {
    color: rgba(255, 255, 255, 0.45);
    margin: 0 6px;
}

.saved-flight-summary {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.85rem;
}

.saved-flight-price-block {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    text-align: right;
}

.saved-flight-airline-logos {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.saved-flight-airline-logo-wrap {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.saved-flight-airline-logo,
.saved-flight-leg-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.saved-flight-price {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 300;
}

.saved-flight-trend {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.saved-flight-trend-up {
    background: rgba(231, 76, 60, 0.14);
    border: 1px solid rgba(231, 76, 60, 0.26);
    color: #ff9b97;
}

.saved-flight-trend-down {
    background: rgba(46, 204, 113, 0.14);
    border: 1px solid rgba(46, 204, 113, 0.26);
    color: #7ff0b7;
}

.saved-flight-refresh-btn {
    margin-left: 8px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: currentColor;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.2s;
}

.saved-flight-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
}

.saved-flight-refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.saved-flight-trend-neutral {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.72);
}

.saved-flight-times {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.82rem;
}

.saved-flight-times strong {
    color: #fff;
    font-weight: 300;
}

.saved-flight-saved-timestamp {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.65rem;
    line-height: 1.2;
}

.saved-flight-legs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.saved-flight-leg {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.saved-flight-leg-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.saved-flight-leg-content {
    flex: 1;
    min-width: 0;
}

.saved-flight-leg-main {
    color: #fff;
    font-size: 0.94rem;
}

.saved-flight-leg-main span {
    color: rgba(255, 255, 255, 0.4);
    margin: 0 6px;
}

.saved-flight-leg-meta {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.8rem;
}

.saved-flight-leg-airline {
    margin-left: 8px;
    color: #d4af37;
}

.saved-flight-layover {
    margin-top: -2px;
    margin-left: 10px;
    padding-left: 12px;
    border-left: 2px solid rgba(43, 185, 166, 0.32);
    color: #d4af37;
    font-size: 0.76rem;
}

.layover-hotel-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(241, 196, 15, 0.14);
    border: 1px solid rgba(241, 196, 15, 0.28);
    color: #f6d86f;
    font-size: 0.7rem;
    line-height: 1;
    vertical-align: middle;
}

.layover-hotel-badge-inline {
    margin-left: 8px;
}

.luggage-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(149, 165, 166, 0.14);
    border: 1px solid rgba(149, 165, 166, 0.28);
    color: #b0c4de;
    font-size: 0.7rem;
    line-height: 1;
    vertical-align: middle;
}

.luggage-badge-inline {
    margin-left: 8px;
}

.saved-flight-error {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(231, 76, 60, 0.14);
    border: 1px solid rgba(231, 76, 60, 0.24);
    color: #ffb5b2;
    font-size: 0.8rem;
}

.saved-flight-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.saved-package-card {
    position: relative;
    border-color: rgba(165, 180, 252, 0.18);
}

.saved-package-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #a5b4fc;
    background: rgba(165, 180, 252, 0.12);
    border: 1px solid rgba(165, 180, 252, 0.2);
}

.saved-package-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.82rem;
}

.saved-package-meta strong {
    color: #fff;
    font-weight: 300;
}

.saved-package-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0 8px;
    padding: 6px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.saved-package-toggle-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
}

.saved-package-toggle-copy {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.82rem;
    white-space: nowrap;
}

.saved-package-toggle-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.saved-package-hotel-input {
    width: 88px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 10px;
    padding: 6px 10px;
    outline: none;
    text-align: center;
}

.saved-package-cost-input {
    width: 88px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 10px;
    padding: 6px 10px;
    outline: none;
    text-align: center;
}

.saved-package-toggle.active {
    background: rgba(46, 204, 113, 0.14);
    border-color: rgba(46, 204, 113, 0.28);
    color: #7ff0b7;
}

.saved-package-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 14px 0 8px;
    color: #a5b4fc;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.saved-package-leg-price {
    color: #fff;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: normal;
}

.saved-package-leg-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.save-package-btn.saved {
    background: rgba(241, 196, 15, 0.18);
    border-color: rgba(241, 196, 15, 0.36);
    color: #f1c40f;
}

.saved-flight-link {
    text-decoration: none;
}

.saved-flight-remove {
    background: rgba(231, 76, 60, 0.12);
    border-color: rgba(231, 76, 60, 0.24);
    color: #ff9b97;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

/* Country Filter Styles */
.country-row {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.country-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.country-row:last-child {
    border-bottom: none;
}

.country-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 300;
}

.country-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.action-btn.active-hide {
    background: rgba(231, 76, 60, 0.15);
    border-color: rgba(231, 76, 60, 0.4);
    color: #e74c3c;
}

.action-btn.active-fav {
    background: rgba(241, 196, 15, 0.15);
    border-color: rgba(241, 196, 15, 0.4);
    color: #f1c40f;
}

.country-search-wrapper {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #1e1c32;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: -15px -15px 10px -15px;
}

.country-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 15px;
    border-radius: 10px;
    outline: none;
    font-weight: 300;
}

.country-search-input:focus {
    border-color: #d4af37;
    background: rgba(255, 255, 255, 0.08);
}

/* Hide native number input spinners */
input[type="number"].clean-number::-webkit-outer-spin-button,
input[type="number"].clean-number::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.02);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(43, 185, 166, 0.5);
}

input[type="number"].clean-number {
    -moz-appearance: textfield;
}

/* ============================================================
   MOBILE LAYOUT OPTIMISATIONS  (≤ 767 px)
   Desktop layout is completely untouched.
============================================================ */
@media (max-width: 767px) {

    /* --- Page padding & heading --- */
    #general-flights-page {
        padding: 40px 0 60px;
    }

    #general-flights-page h2 {
        font-size: 1.7rem;
        margin-bottom: 30px;
        letter-spacing: -0.5px;
        padding: 0 16px;
    }

    /* --- Search pill → vertical stack --- */

    .gf-title-actions {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 18px;
    }

    .gf-title-actions-label {
        color: rgba(255, 255, 255, 0.74);
        font-size: 0.92rem;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .gf-title-special-btn {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding: 10px 18px;
        border-radius: 8px;
        border: 1px solid rgba(43, 185, 166, 0.26);
        background: rgba(43, 185, 166, 0.12);
        color: #f9d423;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.2s;
    }

    .gf-title-special-btn:hover {
        background: rgba(43, 185, 166, 0.2);
    }
    .search-pill-container {
        padding: 0 12px;
    }

    .search-pill {
        flex-direction: column;
        align-items: stretch;
        border-radius: 20px;
        padding: 8px 12px 12px;
        gap: 0;
    }

    .search-field,
    .search-field.airport-field {
        flex: unset;
        width: 100%;
        padding: 12px 6px;
        border-radius: 12px;
    }

    .divider {
        width: 100%;
        height: 1px;
        margin: 0;
    }

    .clean-input {
        min-width: 0;
        font-size: 1rem !important;
    }

    .btn-pill-search {
        width: 100%;
        height: 48px;
        border-radius: 12px;
        margin-left: 0;
        margin-top: 10px;
        font-size: 1.1rem;
    }

    /* --- Autocomplete dropdown --- */
    .autocomplete {
        width: calc(100vw - 48px);
        left: 0;
    }

    /* --- Results section container --- */
    #gf-results {
        max-width: 100%;
        margin-top: 30px;
        padding: 0 12px;
    }

    /* --- Grouping / filter options bar --- */
    #gf-grouping-options {
        max-width: 100%;
        margin-top: 30px;
        padding: 0 12px;
    }

    #gf-grouping-options > div {
        flex-wrap: wrap;
        gap: 8px;
    }

    .grouping-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    /* "Collapse all" button floats to next line naturally */
    #collapse-all-btn {
        margin-left: 0 !important;
    }

    /* --- Results header row (N Flights Found + Max Price) --- */
    /* This is built by JS — we target the wrapping divs via CSS */
    #gf-results > div:first-child > div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    /* The right-side controls row also wraps */
    #gf-results > div:first-child > div:first-child > div:last-child {
        width: 100%;
        flex-wrap: wrap;
        gap: 6px;
    }

    .gf-presearch-actions {
        justify-content: stretch;
        flex-wrap: wrap;
        gap: 10px;
    }

    .grouping-btn {
        flex: 1;
        min-width: fit-content;
        justify-content: center;
    }

    .gf-saved-flights-trigger {
        width: auto;
        justify-content: center;
    }

    /* Max price input takes remaining space */
    #max-price-input {
        flex: 1 !important;
        min-width: 70px !important;
    }

    /* "Expensive flight?" button full-width */
    #gf-results button[onclick*="openCheapestToModal"] {
        width: 100% !important;
        font-size: 0.85rem !important;
    }

    /* --- Mobile flight cards --- */
    .clean-flight-row {
        display: grid !important;
        grid-template-columns: 58px minmax(0, 1fr) auto;
        grid-template-areas:
            "logo info action"
            "logo stops action";
        gap: 8px 12px;
        padding: 14px;
        margin-bottom: 10px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 18px;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
            rgba(10, 8, 29, 0.38);
        box-shadow: 0 14px 28px rgba(3, 2, 13, 0.22);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        align-items: start;
    }

    .clean-flight-row:hover {
        transform: none;
        border-bottom-color: rgba(255, 255, 255, 0.08);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
            rgba(10, 8, 29, 0.42);
        box-shadow: 0 14px 28px rgba(3, 2, 13, 0.22);
    }

    .airline-logo {
        grid-area: logo;
        width: 58px;
        min-width: 58px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 6px;
        padding: 0;
        background: transparent;
        text-align: center;
    }

    .airline-logo > div {
        width: 46px !important;
        height: 46px !important;
        margin-bottom: 0 !important;
        border-radius: 12px !important;
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14) !important;
    }

    .airline-logo img {
        max-width: 32px !important;
        max-height: 32px !important;
    }

    .flight-luggage-badge,
    .airline-logo > div[title^="Checked luggage included"] {
        display: none !important;
    }

    .flight-luggage-chip {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 5px 10px;
        border-radius: 999px;
        background: rgba(46, 204, 113, 0.14);
        border: 1px solid rgba(46, 204, 113, 0.28);
        color: #7ff0b7;
        font-size: 0.7rem;
        line-height: 1;
        white-space: nowrap;
    }

    .flight-luggage-chip i {
        font-size: 0.7rem;
        line-height: 1;
    }

    .flight-luggage-chip span {
        line-height: 1;
    }

    .flight-info {
        grid-area: info;
        min-width: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .flight-info .route {
        font-size: 0.98rem;
        line-height: 1.32;
        font-weight: 400;
        margin-bottom: 6px;
        white-space: normal;
    }

    .flight-info .times {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px 6px;
        font-size: 0.76rem;
        line-height: 1.35;
        color: rgba(255, 255, 255, 0.6);
    }

    .flight-info .times .time {
        display: inline-block;
        margin-left: 4px;
        font-weight: 400;
        color: #fff;
    }

    .flight-info .times .duration {
        margin-left: 0;
        margin-top: 2px;
        padding: 3px 8px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.06);
        color: rgba(255, 255, 255, 0.72);
        font-size: 0.7rem;
    }

    .flight-info .times .flight-luggage-chip {
        margin-top: 2px;
        background: rgba(46, 204, 113, 0.14);
        border-color: rgba(46, 204, 113, 0.28);
        color: #7ff0b7;
    }

    .flight-stops {
        grid-area: stops;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 6px;
        padding-top: 0;
        text-align: left;
        min-width: 0;
    }

    .flight-stops > div[style*="margin-top"] {
        margin-top: 0 !important;
    }

    .stopover-badge {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center;
        gap: 6px !important;
        padding: 5px 10px !important;
        border-radius: 999px !important;
        font-size: 0.72rem !important;
        line-height: 1;
    }

    .stopover-badge > div {
        display: inline-flex !important;
        align-items: center !important;
        gap: 5px !important;
    }

    .stopover-badge span[style*="font-weight"] {
        font-size: 0.72rem !important;
        line-height: 1;
    }

    .stopover-flags {
        gap: 4px;
    }

    .stopover-flags img {
        width: 14px;
        height: 10px !important;
    }

    .flight-stops span[style*="border-radius: 12px"] {
        display: inline-flex !important;
        align-items: center;
        gap: 4px;
        font-size: 0.68rem !important;
        padding: 4px 8px !important;
        border-radius: 999px !important;
    }

    .flight-action {
        grid-area: action;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: space-between;
        gap: 8px;
        width: auto;
        height: 100%;
        min-height: 100%;
        margin-top: 0;
        padding-top: 0;
        padding-left: 6px;
        border-top: 0;
        align-self: stretch;
    }

    .flight-price {
        flex: 0 0 auto;
        margin-bottom: 0 !important;
        font-size: 1.2rem;
        font-weight: 400;
        line-height: 1.1;
        white-space: nowrap;
    }

    .flight-price[style] {
        align-items: flex-end !important;
        justify-content: flex-start !important;
        text-align: right;
    }

    .flight-action > div:last-child {
        display: flex;
        gap: 8px;
        align-items: flex-end;
        justify-content: flex-end;
        margin-top: auto !important;
        margin-left: 0;
        flex: 0 0 auto;
        min-width: 28px;
    }

    .btn-compare {
        display: none !important;
    }

    .btn-select-flight {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px !important;
        height: 28px !important;
        padding: 0 !important;
        border-radius: 999px !important;
        font-size: 0.72rem !important;
        line-height: 1;
        background: rgba(43, 185, 166, 0.16);
        border-color: rgba(43, 185, 166, 0.36);
    }

    .btn-save-flight {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.72rem !important;
    }

    .flight-action > div[style*="fa-suitcase"] {
        font-size: 0.72rem !important;
    }

    /* Compact mode on mobile — keep the card footprint short but readable */
    .compact-mode .clean-flight-row {
        grid-template-columns: 42px minmax(0, 1fr) auto;
        grid-template-areas:
            "logo info action";
        gap: 6px 10px;
        padding: 10px 12px;
        margin-bottom: 8px;
        border-radius: 14px;
    }

    .compact-mode .airline-logo {
        width: 42px;
        min-width: 42px;
        gap: 4px;
    }

    .compact-mode .airline-logo > div {
        width: 34px !important;
        height: 34px !important;
        border-radius: 10px !important;
    }

    .compact-mode .airline-logo img {
        max-width: 24px !important;
        max-height: 24px !important;
    }

    .compact-mode .flight-info {
        display: block;
    }

    .compact-mode .flight-info .route {
        font-size: 0.82rem;
        margin-bottom: 4px;
    }

    .compact-mode .flight-info .times {
        font-size: 0.68rem;
        gap: 3px 5px;
    }

    .compact-mode .flight-info .times .duration {
        font-size: 0.64rem;
        padding: 2px 6px;
    }

    .compact-mode .flight-stops {
        display: none;
    }

    .compact-mode .flight-action {
        gap: 6px;
        margin-top: 0;
        padding-top: 0;
        padding-left: 4px;
        width: auto;
    }

    .compact-mode .flight-price {
        font-size: 0.95rem !important;
    }

    /* ─── Group headers ──────────────────────────────────────────── */
    .flight-group-header {
        font-size: 0.9rem;
        margin-top: 18px;
        margin-bottom: 8px;
        padding-left: 12px;
    }

    /* ─── Modals: full-screen feel on mobile ─────────────────────── */
    #cheap-first-class .modal-dialog {
        margin: 10px;
    }

    #cheap-first-class .modal-content {
        border-radius: 12px;
    }

    /* Sub-modal (route details) */
    #sub-modal-content {
        max-width: 100% !important;
        width: 96% !important;
        padding: 20px 16px !important;
    }

    #stayoverModal .modal-dialog,
    #returnModal .modal-dialog {
        margin: 10px;
    }

    /* ─── Filter bar: icon-only buttons on mobile ─────────────────── */
    /* Hides text in Countries / Favorites / Baggage buttons */
    #gf-grouping-options .btn-label {
        display: none;
    }

    /* Baggage: keep icon, lose all padding since it's icon-only now */
    #baggage-settings-btn {
        padding: 6px 10px;
    }

    /* ─── Hide baggage extra-cost suitcase in flight cards ────────── */
    /* This div is the "+ X EUR 🧳" line injected by JS */
    .flight-action > div:first-child {
        display: none !important;
    }

    /* ─── Country filter modal toolbar ────────────────────────────── */
    /* The outer flex row: search + two buttons */
    #country-list-container ~ div,
    .country-search-wrapper {
        flex-wrap: wrap;
    }

    /* Hide text in "Avoid M.East" and "Show All" buttons */
    .cf-btn-label {
        display: none;
    }

    /* ─── Country filter: compact row layout ──────────────────────── */
    .country-row {
        padding: 9px 12px;
        gap: 6px;
    }

    .country-info {
        gap: 8px;
        font-size: 0.88rem;
    }

    /* Action buttons: icon-only pill */
    .country-actions {
        gap: 5px;
    }

    .country-actions .action-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    /* Hide the text label inside action buttons on mobile */
    .country-actions .action-btn .label {
        display: none;
    }

    /* Country list max-height — use more screen on mobile */
    #country-list-container {
        max-height: 60vh !important;
    }
}

/* Continent Airports Modal Styles */
.continent-country-flag {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.country-group .country-title {
    display: flex !important;
    align-items: center !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    font-size: 1.15rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-family: 'Jost', sans-serif;
}

.airport-item {
    transition: all 0.2s ease;
    cursor: default;
    min-height: 32px;
}

.airport-item:hover {
    background: rgba(191, 149, 63, 0.15) !important;
    border-color: rgba(191, 149, 63, 0.4) !important;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.continent-shortcut-tag {
    cursor: pointer;
    background: linear-gradient(135deg, #bf953f, #aa771c) !important;
    color: #fff !important;
    border: 1px solid rgba(252, 246, 186, 0.3) !important;
    padding: 6px 20px !important;
    border-radius: 99px !important;
    font-weight: 500 !important;
    display: inline-flex !important;
    align-items: center !important;
    transition: all 0.2s ease !important;
    letter-spacing: 0.5px;
}

.continent-shortcut-tag:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(191, 149, 63, 0.4);
}
