#generalflights {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 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;
}

#footer {
    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;
}

#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;
}

#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 {
    color: #fff;
    font-size: 2.8rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.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: #2bb9a6;
    border: 1px solid #2bb9a6;
    border-radius: 20px;
    padding: 4px 14px;
    vertical-align: middle;
}

.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(43, 185, 166, 0.14);
    border-color: #7ce8d7;
    color: #7ce8d7;
    transform: translateY(-1px);
}

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

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

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

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

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

.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: #2bb9a6;
    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);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px 10px 10px 30px;
}

/* 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: #2bb9a6;
    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;
}

.add-airport-btn:hover {
    background: #2bb9a6;
    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;
}

/* --- 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: #2bb9a6 !important;
}

.flatpickr-day.selected.startRange,
.flatpickr-day.startRange,
.flatpickr-day.selected.endRange,
.flatpickr-day.endRange {
    background: #2bb9a6 !important;
    color: #fff !important;
    border-color: #2bb9a6 !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-search {
    height: 54px;
    width: 54px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #2bb9a6;
    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: 15px;
}

.btn-pill-search:hover {
    background: rgba(43, 185, 166, 0.2);
    border-color: #2bb9a6;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(43, 185, 166, 0.3);
}

/* --- 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: #2bb9a6 !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 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 !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;
}

.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;
    border-radius: 12px;
    position: relative;
}

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

.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: 3px;
    font-size: 0.6rem;
    background: transparent;
    margin-bottom: 2px;
}

.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 {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 8px;
}

.btn-select-flight {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-select-flight:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.4);
}

.btn-save-flight {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.8);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save-flight:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    transform: translateY(-2px);
}

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

.stopover-badge {
    color: #fff !important;
    text-decoration: none !important;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding: 4px 10px !important;
    border-radius: 12px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stopover-badge:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

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

.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: #2bb9a6;
    color: #2bb9a6;
}

#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 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 300;
    margin-top: 30px;
    margin-bottom: 15px;
    padding: 0 20px;
    border-left: 3px solid #2bb9a6;
    padding-left: 17px;
}

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

.group-toggle-btn {
    background: none;
    border: none;
    color: #2bb9a6;
    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: #2bb9a6;
    font-size: 0.9rem;
    font-weight: 300;
    margin-left: 10px;
}

.flight-group-content {
    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: block;
    width: 100%;
    padding: 14px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    color: #2bb9a6;
    font-weight: 300;
    font-size: 0.85rem;
    cursor: pointer;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

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

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

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

#generalflights .modal-header h4 {
    font-weight: 300;
}

#generalflights .close {
    color: #fff;
    text-shadow: none;
    opacity: 0.8;
}

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

#generalflights .modal-body strong {
    color: #fff;
}

#generalflights .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: #7ce8d7;
    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;
}

.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-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: 18px;
    margin-bottom: 12px;
}

.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: #2bb9a6;
}

.saved-flight-layover {
    margin-top: -2px;
    margin-left: 10px;
    padding-left: 12px;
    border-left: 2px solid rgba(43, 185, 166, 0.32);
    color: #2bb9a6;
    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;
}

/* 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: #2bb9a6;
    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: #7ce8d7;
        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;
    }

    .gf-saved-flights-trigger {
        width: 100%;
        justify-content: space-between;
    }

    /* 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 ─────────────────────── */
    #generalflights .modal-dialog {
        margin: 10px;
    }

    #generalflights .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;
    }
}