:root {
  /* ============================================================
     CLARITY TOKEN LAYER  (refactor/clarity-token-layer)
     LIGHT = current / HOME values -> rendering is pixel-identical.
     DARK  ([data-theme="dark"]) = final Clarity dark values, GATED
     (nothing sets data-theme yet, so dark is inert until launched).
     New Clarity tokens that are not wired yet are seeded with the
     Clarity values in BOTH modes (also inert until referenced).
     ============================================================ */

  /* Type */
  --font-display: 'Hanken Grotesk', sans-serif;
  --font-body: 'Hanken Grotesk', sans-serif;
  --cta-letter: 0;
  --display-letter: -0.01em;

  /* Surfaces & structure */
  --page: #F3F6F9;
  --surface: #FFFFFF;
  --surface-alt: #EDF1F5;
  --header-bg: #FFFFFF;
  --border: #E3E9EF;
  --border-strong: #D2DAE3;

  /* Text */
  --text-hi: #1A2733;
  --text-slate: #1A2733;
  --text-mid: #586472;
  --text-muted: #586472;
  --text-lo: #8B96A3;

  /* Brand / links */
  --primary: #3A6FA8;
  --primary-hover: #2F5C8F;
  --on-primary: #FFFFFF;
  --link: #2563EB;
  --link-hover: #1E54C9;
  --link-locale: #2563EB;
  --link-locale-hover: #1E54C9;
  --auth-google-blue: #1a73e8;

  /* Status */
  --green: #2E9E5B;
  --green-toast: #2E9E5B;
  --danger: #D9574F;
  --danger-border: #E7B6B2;
  --toast-error: #D9574F;
  --warn: #ffcc00;
  /* status banner surfaces */
  --success-bg: #d4edda;
  --success-fg: #155724;
  --success-border: #c3e6cb;
  --danger-bg: #f8d7da;
  --danger-fg: #721c24;
  --info-bg: #d1ecf1;
  --info-fg: #0c5460;
  --info-border: #bee5eb;
  --warn-bg: #fff3cd;
  --warn-fg: #856404;
  --warn-border: #ffeeba;

  /* Radius (light = current geometry) */
  --radius: 11px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-pill: 8px;

  /* Shadows (light = current) */
  --shadow-card: 0 1px 2px rgba(20,38,56,.05), 0 2px 10px rgba(20,38,56,.05);
  --shadow-btn: 0 1px 1px rgba(20,38,56,.06);
  --shadow-pop: 0 18px 50px rgba(20,38,56,.18);

  /* --- New Clarity tokens: defined-but-unused (inert; Clarity values) --- */
  --rec-bg: #DBEAF7;
  --rec-text: #235784;
  --rec-weight: 600;
  /* Verdict (Buy/Wait) badge: solid, saturated, white text so the core product
     output stays the most eye-catching element and reads as a status label,
     NOT an interactive control. Wait is teal, deliberately off the button blue. */
  --verdict-buy-bg: #1FA055;
  --verdict-wait-bg: #2C93B4;
  --verdict-fg: #FFFFFF;
  --badge-bg: #CDE2F3;
  --badge-text: #2B5E8C;
  --band-bg: #E8F1F9;
  --band-border: #D2E3F2;
  --band-text: #235784;
  --alert-bg: #EAF1F9;
  --alert-fg: #3A6FA8;
  --alert-border: #CFE0F1;
  --alert-shadow: none;
  --toggle-row-bg: #F1F4F8;
  --toggle-row-border: #E3E9EF;
  --toggle-row-fg: #586472;
  --toggle-on-bg: #E7F6EE;
  --toggle-on-border: #BFE6D0;
  --toggle-on-fg: #1F7A47;
  --avatar-1: #C8D0D9;
  --avatar-2: #9AA6B2;
  --scrim: rgba(16,30,45,.45);
  --ad-bg: #F6F8FA;
  --ad-border: #E3E9EF;
  --ad-label: #9AA6B2;
  --ad-stripe: rgba(0,0,0,.02);
  --gauge-track: #E6EBF0; /* DEFINED ONLY - must NOT be wired (gauge stays as-is) */
}

[data-theme="dark"] {
  /* Type (unchanged) */
  --font-display: 'Hanken Grotesk', sans-serif;
  --font-body: 'Hanken Grotesk', sans-serif;
  --cta-letter: 0;
  --display-letter: -0.01em;

  /* Surfaces & structure */
  --page: #0E141B;
  --surface: #161F29;
  --surface-alt: #1E2935;
  --header-bg: #131C25;
  --border: #2A3744;
  --border-strong: #3A4A59;

  /* Text */
  --text-hi: #EAF1F8;
  --text-slate: #EAF1F8;
  --text-mid: #A2B0BF;
  --text-muted: #A2B0BF;
  --text-lo: #6E7E8E;

  /* Brand / links */
  --primary: #4585C6;
  --primary-hover: #5594D2;
  --on-primary: #FFFFFF;
  --link: #6EA8EC;
  --link-hover: #5594D2;
  --link-locale: #6EA8EC;
  --link-locale-hover: #5594D2;
  --auth-google-blue: #6EA8EC;

  /* Status */
  --green: #36B26C;
  --green-toast: #36B26C;
  --danger: #E0675D;
  --danger-border: #6E3B37;
  --toast-error: #E0675D;
  --warn: #ffcc00;
  /* status banner surfaces (dark) */
  --success-bg: #14331f;
  --success-fg: #6ee7a0;
  --success-border: #1f4d33;
  --danger-bg: #3a1d1b;
  --danger-fg: #f0a8a2;
  --info-bg: #15293b;
  --info-fg: #9fc6ec;
  --info-border: #264159;
  --warn-bg: #33290f;
  --warn-fg: #e8c96b;
  --warn-border: #4a3d1a;

  /* Radius (Clarity dark geometry) */
  --radius: 11px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-pill: 8px;

  /* Shadows (Clarity dark) */
  --shadow-card: 0 1px 2px rgba(0,0,0,.4), 0 2px 12px rgba(0,0,0,.35);
  --shadow-btn: 0 1px 2px rgba(0,0,0,.45);
  --shadow-pop: 0 22px 60px rgba(0,0,0,.6);

  /* New Clarity tokens (dark) */
  --rec-bg: #16344C;
  --rec-text: #BBD7F2;
  --rec-weight: 600;
  --verdict-buy-bg: #1FA055;
  --verdict-wait-bg: #2C93B4;
  --verdict-fg: #FFFFFF;
  --badge-bg: #17324A;
  --badge-text: #9FC6EC;
  --band-bg: #15293B;
  --band-border: #264159;
  --band-text: #BBD7F2;
  --alert-bg: #18293B;
  --alert-fg: #9FC6EC;
  --alert-border: #2A425A;
  --alert-shadow: none;
  --toggle-row-bg: #16202B;
  --toggle-row-border: #2A3744;
  --toggle-row-fg: #A2B0BF;
  --toggle-on-bg: #11281E;
  --toggle-on-border: #1F4633;
  --toggle-on-fg: #4FC07F;
  --avatar-1: #3A4A59;
  --avatar-2: #232F3B;
  --scrim: rgba(0,0,0,.6);
  --ad-bg: #121A23;
  --ad-border: #283643;
  --ad-label: #6E7E8E;
  --ad-stripe: rgba(255,255,255,.025);
  --gauge-track: #2A3744; /* DEFINED ONLY - must NOT be wired */
}

body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
    color: var(--text-hi);
    background-color: var(--page);
}

html {
    overflow-x: hidden;
}

#main {
    margin: 0 auto;
    width: 100%;
    position: relative;
    margin-bottom: 10px;
}

h2 {
    margin-top: 30px;
}

img {
    max-width: 100%;
    height: auto;
}

.form-group {
    margin-bottom: 8px;
}

.article_image {
    max-height: 400px;
    margin: 0 auto;
    width: 100%;
}

#nav_bar {
    margin: 0 auto;
    margin-top: 3px;
    margin-bottom: 0px;
    width: 95%;
}

#logo {
    margin-left: 10px;
    font-size: 120%;
}

.navbar {
    margin-bottom: 0;
    /* iOS safe area support - prevents navbar from being behind notch */
    padding-top: env(safe-area-inset-top);
}

#logo a {
    text-decoration: none;
    color: black;
}

#main h1 {
    margin-top: 0;
    font-weight: normal;
    font-size: 140%;
    color: white;
}

#article_header {
    font-family:
        "freight-text-pro", Georgia, Cambria, "Times New Roman", Times, serif;
}

#article_header h1 {
    font-size: 22px;
}

#article_header h2 {
    padding: 0px 10px 10px 10px;
    font-size: 18px;
    color: rgba(0, 0, 0, 0.44);
}

.central-content {
    margin: 0 auto;
    width: 500px;
}

/* CLS Prevention - Reserve space for dynamic content */
#ad_content_block {
    min-height: 140px; /* Reserve minimum space to prevent layout shift */
    transition: height 0.3s ease-in-out;
    overflow: hidden;
}

#airports-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
}

#flip_container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0;
}

#airports-container-inner {
    display: flex;
    flex: 1;
    flex-direction: row;
    gap: 8px;
}

#airports {
    display: flex;
    flex-direction: column;
    flex: 1;
}


#date-fields {
    display: flex;
    gap: 8px;
}

#airports select {
    height: 28px;
    position: absolute;
}

#price_container {
    display: none;
    margin-top: 10px;
    margin-bottom: 10px;
}

#price_container .flight_data {
    text-weight: bold;
}

/* Prevent flight times from wrapping to new lines */
#flight_departure {
    white-space: nowrap;
}

#price_container .list-group {
    margin-bottom: 0;
}

#prediction_container .prediction_element {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 155%;
    line-height: 1.1;
}

#prediction_container #suggestion {
    white-space: normal;
}

.prediction-verdict-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
}

#prediction_tooltip {
    font-size: 55%;
    font-weight: 500;
    cursor: pointer;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.prediction_element {
    display: none;
}

#price_line {
    margin-top: 2px;
    margin-bottom: 2px;
}

#prediction_container {
    margin-top: 10px;
}

/* Tighten the prediction row's vertical padding to reclaim card height without
   shrinking the (larger) price font. Keeps side padding from the base rules. */
.list-group-item.prediction-item {
    padding-top: 6px;
    padding-bottom: 8px;
}

#price_line h3 {
    display: inline;
}

#discount_label {
    margin-left: 10px;
    vertical-align: text-top;
    cursor: pointer;
    display: none;
}

#saving_label {
    margin-left: 10px;
    vertical-align: text-top;
    cursor: pointer;
    display: none;
}

.alert {
    display: none;
    margin-top: 10px;
}

.stay22-no-results-banner {
    margin-top: 10px;
    margin-bottom: 10px;
}

.stay22-no-results-banner__inner {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.stay22-no-results-banner__image {
    flex: 0 0 auto;
    width: 96px;
    height: 64px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-alt);
}

.stay22-no-results-banner__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.stay22-no-results-banner__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2px;
}

.stay22-no-results-banner__subtitle {
    font-size: 13px;
    color: var(--text-mid);
    line-height: 1.3;
}

.stay22-no-results-banner__cta {
    flex: 0 0 auto;
}

.stay22-no-results-banner__button {
    border-radius: var(--radius);
    padding: 10px 14px;
    font-weight: 600;
    white-space: nowrap;
}

.stay22-hotel-card__image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f3f3f3;
}

.stay22-hotel-badge {
    position: absolute;
    top: 12px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    border-radius: 999px;
    line-height: 1.2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.stay22-hotel-badge--label {
    left: 12px;
    font-size: 13px;
    font-weight: 600;
}

.stay22-hotel-badge--rating {
    right: 12px;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.stay22-hotel-badge__score {
    font-size: 16px;
    font-weight: 700;
}

.stay22-hotel-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 14px 10px 14px;
}

.stay22-hotel-meta__item {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    line-height: 1.3;
}

.stay22-hotel-meta__item--positive {
    color: #1f6b35;
}

.stay22-hotel-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px 14px 14px;
    gap: 12px;
}

.stay22-hotel-price-wrap {
    text-align: right;
    line-height: 1.2;
}

.stay22-hotel-price {
    font-size: 18px;
    font-weight: 650;
    color: #222;
    white-space: nowrap;
    line-height: 1.1;
}

.stay22-hotel-nights {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
}

@media (max-width: 520px) {
    .stay22-no-results-banner__inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .stay22-no-results-banner__image {
        width: 100%;
        height: 120px;
    }
    .stay22-no-results-banner__cta {
        width: 100%;
    }
    .stay22-no-results-banner__button {
        width: 100%;
        text-align: center;
    }
}

#index_prediction {
    display: none;
}

#index_prediction h2 {
    margin-top: 5px;
    margin-bottom: 5px;
    display: inline;
}

#confidence_progress {
    width: 40%;
}

.buy {
    color: green;
}

.wait {
    color: var(--warn);
}

#price_container {
    background-color: var(--surface);
}

.glyphicon-refresh-animate {
    -animation: spin 0.7s infinite linear;
    -webkit-animation: spin2 0.7s infinite linear;
}

@-webkit-keyframes spin2 {
    from {
        -webkit-transform: rotate(0deg);
    }
    to {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes spin {
    from {
        transform: scale(1) rotate(0deg);
    }
    to {
        transform: scale(1) rotate(360deg);
    }
}

#faq h2:first-of-type {
    margin-top: 10px;
}

#faq h4 {
    margin-top: 15px;
}

.faq_item {
    margin-top: 10px;
}

.faq_item ul {
    margin-top: 10px;
}

.faq_item ul li {
    margin-top: 6px;
}

.faq_question {
    display: block;
    font-weight: bold;
}

.faq_answer {
    display: block;
    margin-top: 5px;
}

#credits {
    font-size: 80%;
    position: absolute;
    bottom: 0px;
    right: 5px;
}

#credits a {
    color: black;
}
#footer {
    margin-top: 15px;
    text-align: center;
    clear: both;
}


#search-form {
    position: relative;
}

.container-fluid {
    padding-left: 0;
    padding-right: 0;
}

/* Form header with flexbox layout */
.form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 0 5px;
}

/* Mobile-specific form header adjustments */
.mobile-app-view .form-header {
    padding: 0 8px;
    margin-bottom: 20px;
}

.mobile-app-view .form-header h1 {
    margin-right: 15px;
    flex: 1;
}

/* Ensure consistent left alignment across all devices */
.form-header {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.form-header h1 {
    margin: 0 !important;
    padding: 0 !important;
    color: var(--text-slate) !important;
}

#collapse-button-container {
    display: none;
}

#collapse-button-container.collapse-control-visible {
    display: block;
}

/* Override any Bootstrap form-horizontal margins that might interfere */
#search-form .form-group {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.form-group-select {
    height: 46px;
    position: relative;
    overflow: hidden;
}
.airports-select-label,
.airports-select-label-help {
    position: absolute; 
    top: 100%;
    left: 0;
}

#flight_selector .departure_block {
    width: 120px;
    display: inline-block;
}

#flight_selector .departure_block input {
    border-radius: var(--radius-sm);
}

#hints_list {
    list-style-type: none;
}

/* Same list has .prediction_element for show/hide with gauges; do not use the 155% headline size */
#prediction_container #hints_list,
#prediction_container #hints_list .list-group-item {
    font-size: inherit;
    line-height: inherit;
}

#hints_list .fb-share-button {
    margin-left: 10px;
}

#social_bar {
    margin-top: 10px;
    margin-bottom: 10px;
}

.social {
    margin-top: 10px;
    margin-bottom: 10px;
}

.article {
    padding-left: 2%;
    padding-right: 2%;
    font-size: 14px;
    font-family: proxima-nova, "Helvetica Neue", Helvetica, Arial, sans-serif;
    /*font-family: "freight-text-pro",Georgia,Cambria,"Times New Roman",Times,serif; */
    letter-spacing: 0.01rem;
    line-height: 1.5;
}

#article_main {
    max-width: 500px;
    width: 95%; /* Responsive width on small screens */
    margin: 5px auto;
    text-align: left;
}

#article_main h1 {
    font-size: 22px;
    margin-bottom: 20px;
}

#article_main h2 {
    font-size: 20px;
}

#article_main h3 {
    font-size: 18px;
}

.article p {
    margin-top: 15px;
    margin-bottom: 15px;
}

.article li {
    margin-top: 12px;
}

.article table {
    width: 100%;
    border: 1px solid var(--border);
    table-layout: fixed;
}

.article thead {
    font-weight: bold;
}

.article td {
    border: 1px solid var(--border);
    padding: 5px;
}

.low_priority {
    font-size: 95%;
}

.article #author_line {
    font-size: 80%;
    color: var(--text-lo);
    clear: both;
    overflow: auto;
}

.article #author_line #article_author {
    float: left;
}

.article #author_line #article_date {
    float: right;
}

.article h3 {
    margin-top: 30px;
    margin-bottom: 20px;
}

#stats_container {
    margin-top: 10px;
}

#stats_container #stats_explained {
    margin-top: 20px;
    font-size: 10pt;
}

#get_started {
    margin-bottom: 30px;
}

.gauge {
    width: 200px;
    height: 160px;
    flex-shrink: 0;
}

#gauge_block {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start; /* Changed from center to flex-start for proper title alignment */
    gap: 8px;
    margin-top: 6px;
}

/* Gauge container for title + gauge pairing */
.gauge-container {
    position: relative; /* Enable absolute positioning for title */
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0; /* Prevent shrinking */
    margin-top: 10px;
}

/* Gauge titles are now SVG text elements - no CSS needed */

/* Hide duplicate flights in all_flights container */
.invisible_duplicate {
    display: none !important;
}

#focus_point:focus {
    outline: none;
}

#booking_block {
    clear: both;
    margin-top: 5px;
    margin-bottom: 8px;
}

#booking_block img {
    vertical-align: middle;
}

/* Mobile: keep the two prediction CTAs (Book now / Create price alert) side by
   side on one line, like the pre-Clarity layout. Buttons size to their content
   (proportional widths — the longer label gets a wider button) and grow to fill
   the row. Text is flex-centered (fixes the label sitting at the top when a
   button is taller) and scales fluidly with the viewport (~12px on small phones
   up to the 15px desktop size) so long i18n labels stay on one line down to
   ~320px. If they truly can't fit (very long locale / tiny screen) they fall
   back to full-width stacked buttons rather than clipping. Card width untouched. */
@media (max-width: 768px) {
    #booking_block {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: stretch;
    }
    #booking_block #purchase_button,
    #booking_block #alert_action_btn {
        /* !important overrides the inline display:inline-block that JS sets on
           #purchase_button, so the label can be flex-centered in the button. */
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 6px;
        flex: 1 1 auto;
        min-width: 0;
        margin: 0;
        padding: 10px 6px;
        font-size: clamp(12px, 3.6vw, 15px);
        line-height: 1.2;
        white-space: nowrap;
    }
    #booking_block #powered_by {
        flex: 1 0 100%;
    }
}

/* Primary buttons inside inline/hotel ads must match Book now (white text). */
.image-filler a.btn.btn-primary,
.results-hero-ad a.btn.btn-primary,
#inline_ad_0 a.btn.btn-primary {
    color: #fff;
}

.image-filler a.btn.btn-primary:hover,
.image-filler a.btn.btn-primary:focus,
.image-filler a.btn.btn-primary:active,
.results-hero-ad a.btn.btn-primary:hover,
.results-hero-ad a.btn.btn-primary:focus,
.results-hero-ad a.btn.btn-primary:active,
#inline_ad_0 a.btn.btn-primary:hover,
#inline_ad_0 a.btn.btn-primary:focus,
#inline_ad_0 a.btn.btn-primary:active {
    color: #fff;
}

#all_stats #flights a {
    display: block;
    margin-top: 5px;
}

#ad_bar {
    margin-top: 10px;
    margin-bottom: 10px;
}

#ad_container {
    width: 468px;
    max-height: 100px;
    text-align: left;
}

#flight_info_item h4 {
    display: inline;
}

.new_article_label {
    margin-left: 5px;
    font-size: 90%;
    color: green;
}

#articles {
    margin-top: 30px;
    margin-bottom: 30px;
}

#articles ul a {
    display: block;
}

#articles ul span {
    font-size: 90%;
}

/* Small devices */
@media (max-width: 768px) {
    .central-content {
        width: 95%;
    }

    h1 {
        font-size: 120%;
    }

    #main .form-header h1 {
        font-size: 1.5rem;
        font-weight: bold;
    }
}

/* Collapsible search form styling */
#search-form-container {
    min-height: 0;
    height: auto;
    padding: 15px 10px 10px;
    margin-top: 10px;
    background-color: var(--surface-alt);
    color: var(--text-slate);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-card);
}

.search-form-expanded .full-search-form {
    display: block;
}

.search-form-collapsed .full-search-form {
    display: none;
}

/* Collapsed search panel styling (now outside #main) */
#collapsed-search-panel {
    background: var(--surface-alt);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 15px 10px 10px 20px;
    margin: 10px auto 10px auto;
    box-shadow: var(--shadow-card);
    cursor: pointer;
    display: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.42857143;
    color: var(--text-slate);
    position: relative;
}

#collapsed-search-panel:hover {
    background: var(--border);
    border-color: var(--link);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

#collapsed-search-panel.search-running {
    pointer-events: none;
    cursor: wait;
    opacity: 0.92;
}

#collapsed-search-panel.search-running:hover {
    background: var(--surface-alt);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-card);
    transform: none;
}

.search-summary {
    font-size: 13px;
    font-weight: normal;
    color: var(--text-slate);
    margin-bottom: 0;
    line-height: 18px;
    font-family: inherit;
    position: relative;
    /* Reserve room for the absolutely-positioned expand chevron (top-right) so
       the route text never runs under it, in any language. */
    padding-right: 34px;
}

.search-summary .route {
    color: var(--text-slate);
    font-weight: 500;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.origin-text, .destination-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-slate);
}

.route-arrow {
    font-size: 16px;
    color: var(--text-muted);
    margin: 0 12px;
}

/* Keep "origin →" together on the first line; when the whole route is too long
   the destination wraps onto its own line below (the arrow stays with origin). */
.route-leg {
    white-space: nowrap;
}
.destination-text {
    white-space: nowrap;
}

.search-summary .dates {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 10px;
}

/* Toggle button styling - same as collapse button */
.toggle-button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease-in-out;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    position: absolute;
    right: 0;
    top: -8px;
}

.toggle-button:hover {
    background: rgba(108, 117, 125, 0.1);
    color: var(--text-hi);
}

/* Show collapsed panel immediately when URL parameters are present */
.search-form-url-loaded #collapsed-search-panel {
    display: block;
}

/* Don't hide the full search form immediately - let it load airport data first */
.search-form-url-loaded .full-search-form {
    /* Keep it visible initially so airport data can load */
}

.search-form-url-loaded #main {
    display: none;
}

/* Ensure airport dropdowns maintain proper width regardless of form state */
.airport-field {
    width: 100% !important;
    max-width: none !important;
}

/* Select2 dropdown styling for airport fields */
.select2-container--default .select2-selection--single {
    width: 100% !important;
    max-width: none !important;
}

.select2-container {
    width: 100% !important;
    max-width: none !important;
}

/* Override any width constraints on airport dropdowns */
#airports .airport-field,
#airports .select2-container {
    width: 100% !important;
    max-width: none !important;
}

/* ---- Clarity search fields: airport select2 + date inputs (per .ahs-select/.ahs-field) ---- */
.select2-container--default .select2-selection--single {
    height: 46px;
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 0 30px 0 14px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-hi);
    line-height: 44px;
    padding: 0;
    font-size: 15px;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--text-lo);
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 0;
    right: 10px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--text-lo) transparent transparent transparent;
}
.select2-dropdown {
    border-color: var(--border-strong);
    background-color: var(--surface);
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary);
}
#departure,
#return_date {
    height: 46px;
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    color: var(--text-hi);
    font-size: 15px;
}

/* Mobile app view spacing - consistent 15px spacing */
.mobile-app-view .radio-inline {
    margin-bottom: 8px;
    margin-right: 15px;
    display: inline-flex;
    gap: 8px;
}

.mobile-app-view .radio-inline input[type="radio"] {
    flex-shrink: 0;
}

.mobile-app-view .radio-inline label {
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.mobile-app-view #airports .form-group:first-child {
    margin-bottom: 20px;
}

.mobile-app-view #airports .form-group:last-child {
    margin-bottom: 25px;
}

.mobile-app-view .departure_block:first-child {
    margin-top: 15px;
}

/* Mobile app view layout */
.mobile-app-view #main {
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Ensure no extra spacing in mobile app view */
.mobile-app-view #main > *:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Override default min-height that causes whitespace */
.mobile-app-view #main {
    min-height: auto !important;
    height: auto !important;
    transition: none !important;
}

/* Image filler below search form - fixed height for consistent layout */
.image-filler {
    width: 100%;
    max-width: 100%;
    margin: 10px auto;
    text-align: center;
    display: block;
    overflow: hidden;
}

.image-filler img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-pop);
}

/* Hide image when search starts */
.image-filler.hidden {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Prevent horizontal overflow on mobile */
.mobile-app-view {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Form header styling */
.form-header h1 {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    text-align: left !important;
}

/* Fix whitespace issues after collapse/expand on mobile */
.mobile-app-view #search-form-container {
    min-height: 0 !important;
    height: auto !important;
    margin-bottom: 0 !important;
}

.form-group {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.mobile-app-view #search-form-container .full-search-form {
    margin-bottom: 0 !important;
}

.mobile-app-view #flight_selector {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Reset main container height after form expansion to prevent whitespace */
.mobile-app-view #main.search-form-expanded {
    min-height: auto !important;
    height: auto !important;
}

.mobile-app-view #main.search-form-collapsed {
    min-height: 0 !important;
    height: auto !important;
}

.mobile-app-view .expand-button {
    min-width: 32px !important;
    min-height: 32px !important;
    padding: 6px !important;
}

/* Prevent iOS WKWebView auto-zoom on input focus.
   iOS zooms in on any focused input with font-size < 16px.
   .select2-search__field and .dateField are NOT scoped to .mobile-app-view because
   Select2 appends its dropdown directly to <body>, and .mobile-app-view is not
   reliably applied to the page container. */
.mobile-app-view input,
.mobile-app-view .form-control {
    font-size: 16px !important;
}
.select2-search__field {
    font-size: 16px !important;
}
.dateField {
    font-size: 16px !important;
}

.social span {
    margin-right: 20px;
}

.fb_iframe_widget {
    vertical-align: top;
}

#alternative_flights {
    display: none;
    margin-top: 5px;
    padding-bottom: 1px;
}

#alternative_flights table {
    font-size: 90%;
}

#alternative_flights .panel-heading a {
    text-decoration: none;
}

.datepicker {
    font-size: 18px;
}

@media (max-width: 768px) {
    .datepicker {
        font-size: 22px;
    }
    .datepicker td,
    .datepicker th {
        width: 32px;
        height: 32px;
    }
    .datepicker table tr td span {
        height: 80px;
        line-height: 80px;
    }
    .datepicker .datepicker-switch {
        width: 200px;
    }
    .datepicker.datepicker-dropdown {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%);
    }
    .datepicker.datepicker-dropdown:before,
    .datepicker.datepicker-dropdown:after {
        display: none;
    }
}

.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
    background-color: var(--surface) !important;
    opacity: 1;
}

.sticky-content {
    top: 0;
    position: -webkit-sticky;
    position: sticky;
    min-height: 280px;
}

.panel {
    padding: 0;
}

.panel-body {
    padding: 0;
}

.skeleton-container {
    display: none;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    box-sizing: border-box;
    max-width: 500px;
    margin: auto;
    height: 370px;
}

.skeleton {
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-image {
    width: 120px;
    height: 60px;
}

.skeleton-text {
    height: 24px;
    width: 100%;
}

.skeleton-text.short {
    width: 70%;
}

.skeleton-button {
    width: 140px;
    height: 45px;
}

/* Prediction skeleton styles */
.prediction-skeleton-container {
    padding: 8px;
    margin-top: 6px;
}

.prediction-skeleton-hints {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.prediction-skeleton-hints .skeleton-text {
    height: 14px;
}

.prediction-skeleton-loading {
    text-align: center;
    margin-top: 15px;
}

.skeleton-semi-gauge {
    position: relative;
}

.skeleton-suggestion {
    width: 180px;
    height: 26px;
    margin-bottom: 15px;
}

.skeleton-gauges-container {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-bottom: 15px;
    justify-content: flex-start;
}

/* Skeleton gauge containers with titles */
.skeleton-gauge-container {
    position: relative; /* Enable absolute positioning for skeleton title */
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

/* Skeleton gauge titles removed - using SVG text elements */

.skeleton-gauge-left,
.skeleton-gauge-right {
    width: 85px;
    height: 68px;
}

.prediction-skeleton-container .loading-text {
    color: var(--text-mid);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    display: block;
    margin-bottom: 15px;
    animation: shimmer 1.5s infinite;
}
.flight-pill {
    display: inline-flex;
    align-items: center; /* Center items vertically */
    margin-right: 5px;
    margin-bottom: 5px;
    background-color: var(--primary); /* Match image blue */
    color: var(--on-primary); /* White text */
    border-radius: var(--radius-sm); /* Slightly rounded */
    padding: 4px 8px; /* Reduced padding for smaller height */
    font-size: 12px; /* Match text size in image */
    line-height: 16px; /* Reduced line height */
    height: 15px; /* Match line height for consistency */
}
.flight-pill .flight-text {
    margin-right: 5px; /* Space before X */
}
.flight-pill .close-x {
    color: var(--on-primary); /* White X */
    font-size: 18px; /* Slightly reduced but still bold */
    font-weight: bold;
    cursor: pointer;
    padding: 0 2px; /* Small padding for click area */
    line-height: 16px; /* Match pill height */
}
.flight-pill .close-x:hover {
    color: var(--danger); /* Red on hover for contrast */
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Small devices */
@media (max-width: 620px) {
    img {
        max-width: 100%;
    }

    #flight_departure {
        margin-right: 20px;
        display: inline-block;
    }

    #ad_container {
        width: 100%;
        max-width: 500px;
    }

    .gauge {
        width: 155px;
        height: 124px;
    }

    #gauge_block {
        gap: 6px;
        margin-left: -3px; /* Slight left margin reduction for tablets */
    }

    /* Responsive gauge titles for tablets */
    .gauge-title {
        font-size: 13px;
        top: 2px; /* Position over SVG top whitespace */
        max-width: 155px; /* Match gauge width on tablets */
    }

    .skeleton-suggestion {
        width: 150px;
        height: 20px;
    }

    .skeleton-gauge-left,
    .skeleton-gauge-right {
        width: 75px;
        height: 60px;
    }

    /* Skeleton gauge titles removed - using SVG text elements */
}

/* Airport code tooltip styling */
.airport-code {
    cursor: pointer; /* Changed to pointer for finger/hand cursor */
    border-bottom: 1px dotted var(--link);
    transition: all 0.1s ease; /* Faster appearance */
    position: relative;
}

.airport-code:hover {
    border-bottom-color: var(--link-hover);
    background-color: rgba(0, 123, 255, 0.1);
}

/* Toast notification styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: var(--green-toast);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-pop);
    margin-bottom: 10px;
    pointer-events: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    max-width: 300px;
    font-size: 14px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: var(--green-toast);
}

.toast.error {
    background: var(--toast-error);
}

.toast-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toast-message {
    flex: 1;
    margin-right: 10px;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    opacity: 0.8;
}

.toast-link {
    color: white;
    text-decoration: underline;
    margin-top: 5px;
    display: block;
}

.toast-link:hover {
    opacity: 0.8;
}

/* Spinning animation for loading state */
.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Car Hire Flexbox Layout */
.car-hire-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.car-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

/* Car hire image styling for mobile compatibility */
.car-info img {
    width: 80px;
    height: 60px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background-color: var(--surface-alt);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

/* Fallback for failed images */
.car-info img:not([src]),
.car-info img[src=""],
.car-info img[src*="undefined"],
.car-info img[src*="null"] {
    display: none;
}

/* Placeholder when image is missing */
.car-info:not(:has(img[src]:not([src=""])))::before {
    content: "🚗";
    font-size: 24px;
    width: 80px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

/* Mobile-specific image adjustments */
@media (max-width: 768px) {
    .car-info img {
        width: 70px;
        height: 50px;
        min-width: 70px; /* Prevent shrinking */
    }

    .car-info {
        gap: 8px; /* Reduce gap on mobile */
    }
}

.vehicle-name {
    font-weight: 600;
    color: var(--text-hi);
}

.car-action {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.price-text {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

/* Car hire container styling */
#carhire_container {
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

/* Ensure car hire options don't overflow the container */
#carhire_options {
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #carhire_container {
        max-width: 100%;
        margin: 0;
    }
}

/* Mobile Form Control Sizing - Bootstrap 3.4.1 Compatible */
@media (max-width: 768px) {
    /* Make radio buttons and checkboxes larger for better touch targets */
    input[type="radio"],
    input[type="checkbox"] {
        min-width: 16px;
        min-height: 16px;
        width: 16px;
        height: 16px;
        margin: 0;
        vertical-align: middle;
    }

    /* Ensure labels align properly with larger inputs and add spacing */
    .radio-inline,
    .checkbox-inline {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
        margin-right: 20px; /* Increased margin for better spacing */
        line-height: 1.4;
    }

    /* Add margin to labels to create space between form elements */
    .radio-inline label,
    .checkbox-inline label {
        margin-left: 8px; /* Space between input and label text */
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    input[type="radio"],
    input[type="checkbox"] {
        min-width: 18px;
        min-height: 18px;
        width: 18px;
        height: 18px;
    }

    .radio-inline,
    .checkbox-inline {
        gap: 10px;
        margin-right: 25px; /* Increased margin for better spacing */
    }

    /* Add margin to labels to create space between form elements */
    .radio-inline label,
    .checkbox-inline label {
        margin-left: 10px; /* Space between input and label text */
    }

    .list-group-item {
        padding: 10px;
    }

    /* Skeleton gauge titles removed - using SVG text elements */

    /* Smaller gauges for mobile screens */
    .gauge {
        width: 155px;
        height: 124px;
    }

    #gauge_block {
        gap: 4px;
        margin-left: -5px; /* Reduce left margin specifically for gauges */
    }

    /* Responsive gauge titles for mobile */
    .gauge-title {
        font-size: 13px;
        top: 2px; /* Position over SVG top whitespace */
        max-width: 155px; /* Match gauge width on mobile */
    }
}

/* Very small mobile devices */
@media (max-width: 320px) {
    input[type="radio"],
    input[type="checkbox"] {
        min-width: 20px;
        min-height: 20px;
        width: 20px;
        height: 20px;
    }

    .radio-inline,
    .checkbox-inline {
        gap: 12px;
        margin-right: 30px; /* Increased margin for better spacing */
    }

    /* Add margin to labels to create space between form elements */
    .radio-inline label,
    .checkbox-inline label {
        margin-left: 12px; /* Space between input and label text */
    }

    /* Even smaller gauges for very small screens */
    .gauge {
        width: 110px;
        height: 89px;
    }

    #gauge_block {
        gap: 4px;
        margin-left: -2px; /* Minimal left margin reduction for ultra-small screens */
    }

    /* Responsive skeleton gauge titles for very small mobile */
    .skeleton-gauge-title {
        top: 2px; /* Match gauge title position */
        width: 55px;
        height: 8px;
    }

    /* Gauge titles removed - using SVG text elements */
}

/* Powered by Skyscanner styling */
#powered_by {
    margin-top: 10px; /* Reduced margin */
    margin-bottom: 0; /* Remove bottom margin */
    text-align: left; /* Left-aligned with CTA buttons */
    padding: 5px 0 0 0; /* Reduced padding, no bottom padding */
    align-items: center;
    gap: 8px;
}

.powered-by-text {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-lo);
    font-weight: normal;
    white-space: nowrap;
}

.skyscanner-logo {
    height: 20px; /* Fixed height for consistent sizing */
    width: auto; /* Maintain aspect ratio */
    max-width: 100%; /* Responsive fallback */
    /* SVG-specific styling for crisp rendering */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: auto;
    filter: none;
    -webkit-filter: none;
}

/* Mobile adjustments for powered by */
@media (max-width: 768px) {
    .powered-by-text {
        font-size: 12px;
    }

    .skyscanner-logo {
        height: 18px; /* Slightly smaller on mobile */
    }
}

/* Locale + Currency selector (world icon dropdown) – footer / nav */
.locale-currency-selector {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.locale-currency-selector__trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    color: var(--text-hi);
}

/* ---- theme toggle (navbar light/dark switch) ----
   Hidden by default; shown only when the dark-mode debug flag is enabled
   (?darkMode=true sets [data-theme-enabled="true"] on <html> — see _head_theme.html). */
.theme-toggle-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-mid);
    cursor: pointer;
}
/* shown only when the dark-mode debug flag is enabled */
[data-theme-enabled="true"] .theme-toggle-btn {
    display: inline-flex;
}
.theme-toggle-btn:hover {
    color: var(--text-hi);
    background: var(--surface-alt);
}
.theme-toggle-btn .ti-sun { display: none; }
[data-theme="dark"] .theme-toggle-btn .ti-moon { display: none; }
[data-theme="dark"] .theme-toggle-btn .ti-sun { display: inline; }
.locale-currency-selector__trigger:hover {
    background: var(--surface-alt);
    border-color: var(--border-strong);
}
.locale-currency-selector__icon {
    width: 20px;
    height: 20px;
}
.locale-currency-selector__label {
    white-space: nowrap;
}
.locale-currency-selector__dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 4px;
    z-index: 1000;
}
nav .locale-currency-selector__dropdown {
    bottom: auto;
    top: 100%;
    left: auto;
    right: 0;
    margin-top: 4px;
    margin-bottom: 0;
}
.locale-currency-selector__panel {
    min-width: 280px;
    padding: 12px 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.locale-currency-selector__section {
    padding: 0 12px 8px;
}
.locale-currency-selector__section:last-child {
    padding-bottom: 0;
}
.locale-currency-selector__section-title {
    display: block;
    padding: 4px 0 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-mid);
}
.locale-currency-selector__select {
    display: block;
    width: 100%;
    padding: 8px 28px 8px 10px;
    font-size: 14px;
    color: var(--text-hi);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1 1.5L6 6.5L11 1.5' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
.locale-currency-selector__select:hover {
    border-color: var(--border-strong);
}
.locale-currency-selector__select:focus {
    outline: none;
    border-color: var(--link-locale);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}
.locale-currency-selector__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 12px 12px 0;
    margin-top: 8px;
    border-top: 1px solid var(--border);
}
.locale-currency-selector__btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: none;
}
.locale-currency-selector__btn--primary {
    background: var(--primary);
    color: var(--on-primary);
}
.locale-currency-selector__btn--primary:hover {
    background: var(--primary-hover);
}
.locale-currency-selector__btn--secondary {
    background: var(--surface);
    color: var(--text-hi);
    border: 1px solid var(--border-strong);
}
.locale-currency-selector__btn--secondary:hover {
    background: var(--surface-alt);
    border-color: var(--border-strong);
}

/* Travelers trigger link */
#travelers-trigger-container {
    margin-top: 12px;
    margin-bottom: 8px;
}

.travelers-trigger-link,
.travelers-trigger-link:hover,
.travelers-trigger-link:focus,
.travelers-trigger-link:active,
.travelers-trigger-link:visited {
    color: var(--text-mid);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none !important;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.travelers-trigger-link:hover {
    color: var(--text-hi);
}

.travelers-trigger-link .travelers-count {
    margin-right: 2px;
    font-weight: 700;
    color: var(--text-hi);
}

#travelers-cabin-text {
    margin-left: 8px;
}

/* Collapsed panel travelers text */
.search-summary .travelers-text {
    font-size: 13px;
    color: var(--text-mid);
}

.search-summary .travelers-text:empty {
    display: none;
}

/* ============================================================
   CLARITY COMPONENT LAYER  (redesign/clarity — Wire step)
   Token-driven component styling applied to PRODUCTION classes
   (Bootstrap 3 + AirHint markup), reproducing the treatments in
   design_handoff_clarity_refresh/source/airhint.css. No markup or
   class renames; loaded last so it overrides Bootstrap by source
   order. Gauge geometry + ad creatives are intentionally untouched.
   ============================================================ */

/* ---- typography: display font on titles/headings ---- */
h1, h2, h3, h4, h5, h6,
.page-header h1,
.form-header h1 {
    font-family: var(--font-display);
    letter-spacing: var(--display-letter);
}
/* Article/deal page titles use the Clarity display font (consistent with the refresh) */
#article_header h1,
#article_header h2 {
    font-family: var(--font-display);
    letter-spacing: var(--display-letter);
}

/* ---- Clarity action-button geometry (per .ah-btn); filled CTAs only,
   excludes small variants so icon/ghost/stepper buttons keep their size ---- */
.btn-primary:not(.btn-sm):not(.btn-xs),
.btn-success:not(.btn-sm):not(.btn-xs),
.btn-danger:not(.btn-sm):not(.btn-xs),
.modal-footer .btn-default {
    padding: 12px 16px;
    font-size: 15px;
}

/* ---- modals: themed surface + scrim (Bootstrap .modal-content was #fff) ---- */
.modal-content {
    background-color: var(--surface);
    color: var(--text-hi);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.modal-header,
.modal-footer {
    border-color: var(--border);
}
.modal-backdrop,
.modal-backdrop.in {
    background-color: var(--scrim);
    opacity: 1;
}

/* ---- buttons: primary CTA (per .ah-btn-primary) ---- */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-btn);
    font-weight: 700;
    letter-spacing: var(--cta-letter);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary.focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary:active:hover,
.btn-primary:active:focus,
.open > .dropdown-toggle.btn-primary {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--on-primary);
}

/* ---- buttons: success / "Select" (per .ah-btn-select -> --green) ---- */
.btn-success {
    background-color: var(--green);
    border-color: var(--green);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 700;
    letter-spacing: var(--cta-letter);
}
.btn-success:hover,
.btn-success:focus,
.btn-success.focus,
.btn-success:active,
.btn-success.active,
.open > .dropdown-toggle.btn-success {
    background-color: var(--green);
    border-color: var(--green);
    color: #fff;
    filter: brightness(0.94);
}

/* ---- buttons: danger (per .ah-btn-danger -> --danger) ---- */
.btn-danger {
    background-color: var(--danger);
    border-color: var(--danger);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 700;
    letter-spacing: var(--cta-letter);
}
.btn-danger:hover,
.btn-danger:focus,
.btn-danger.focus,
.btn-danger:active,
.btn-danger.active,
.open > .dropdown-toggle.btn-danger {
    background-color: var(--danger);
    border-color: var(--danger);
    color: #fff;
    filter: brightness(0.94);
}

/* ---- buttons: default / ghost-ish (per .ah-btn-ghost surface) ---- */
.btn-default {
    background-color: var(--surface);
    border-color: var(--border-strong);
    color: var(--text-mid);
    border-radius: var(--radius-sm);
}
.btn-default:hover,
.btn-default:focus,
.btn-default.focus {
    background-color: var(--surface-alt);
    border-color: var(--border-strong);
    color: var(--text-hi);
}

/* Reusable Clarity button variants (wire --primary / --danger-border) */

/* "Create price alert" = soft alert variant (per .ah-btn-alert) */
#alert_action_btn.btn,
#alert_action_btn.btn-primary {
    background-color: var(--alert-bg);
    border-color: var(--alert-border);
    color: var(--alert-fg);
    box-shadow: var(--alert-shadow);
}
#alert_action_btn.btn:hover,
#alert_action_btn.btn:focus,
#alert_action_btn.btn:active {
    background-color: var(--alert-bg);
    border-color: var(--alert-border);
    color: var(--alert-fg);
    filter: brightness(0.97);
}

/* ---- cards / surfaces / panels (per .ah-card) ---- */
.panel-default {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}
.panel-default > .panel-heading {
    background-color: var(--surface-alt);
    border-bottom: 1px solid var(--border);
    color: var(--text-hi);
}

/* ---- prediction card: price (per .ah-price) ---- */
#price,
#price_line h3 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-hi);
    letter-spacing: var(--display-letter);
    font-size: 34px;
    line-height: 1.05;
    margin-bottom: 4px;
}

/* ---- prediction card: saving / discount badge (per .ah-badge) ---- */
#saving_label.label,
#saving_label.label-info,
#discount_label.label,
#discount_label.label-info {
    background-color: var(--badge-bg);
    color: var(--badge-text);
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 12.5px;
    padding: 5px 11px;
}

/* prediction-card flight times in display face (per .ah-times) */
#flight_departure {
    font-family: var(--font-display);
}

/* ---- prediction card: verdict PILL (per .ah-verdict).
   #suggestion gets class "label label-success|info|default" toggled by
   results/fare-analysis.js; the 2-ID specificity beats Bootstrap's
   label color classes so the Clarity recommendation pill always wins.
   (fare-analysis.js itself is NOT edited.) ---- */
#prediction_container #suggestion.label,
#prediction_container #suggestion.label-success,
#prediction_container #suggestion.label-info,
#prediction_container #suggestion.label-default {
    /* Solid, saturated, white text -> most eye-catching element on the card and
       visually a status label, not a button (no shadow, pill shape). Default to
       the Wait teal; Buy/Wait override below. */
    background-color: var(--verdict-wait-bg);
    color: var(--verdict-fg);
    font-family: var(--font-display);
    font-weight: 700;
    border-radius: var(--radius-pill);
    padding: 5px 11px;
    font-size: 14px;
    line-height: 1.25;
    display: inline-block;
    margin: 0;
    box-shadow: none;
    max-width: 100%;
}
/* "Buy / Good moment" -> solid green; "Wait" (label-info) -> solid teal.
   Both are deliberately off the button palette so the verdict never reads as
   clickable and the secondary button never reads as a label. */
#prediction_container #suggestion.label-success {
    background-color: var(--verdict-buy-bg);
    color: var(--verdict-fg);
}
#prediction_container #suggestion.label-info {
    background-color: var(--verdict-wait-bg);
    color: var(--verdict-fg);
}

/* ---- prediction card: "Why?" + powered-by (per .ah-powered) ---- */
#powered_by .powered-by-text {
    color: var(--text-lo);
}

/* ---- flight rows: list-group items adopt the card surface (was Bootstrap #fff,
   which left light text invisible on a white strip in dark mode) ---- */
.list-group-item {
    background-color: var(--surface);
    border-color: var(--border);
    color: var(--text-hi);
}

/* ---- info band: cheapest-deal / alternatives hints (per .ah-band) ---- */
#hints_list2_panel.panel-default,
#hints_list2_panel {
    background-color: var(--band-bg);
    border-color: var(--band-border);
}
.list-group-item-info {
    background-color: var(--band-bg);
    color: var(--band-text);
    border-color: var(--band-border);
}
.list-group-item-info a,
#hints_list2 .list-group-item a {
    color: var(--link);
    font-weight: 700;
}

/* ---- result listings: "Select" CTA (compact beside price) ---- */
#all_flights .alternative_date.btn-success {
    padding: 6px 12px;
    font-size: 13px;
    line-height: 1.2;
    vertical-align: middle;
}

/* ---- result listings: alternative-flight price (per .ah-listing-price) ---- */
#all_flights .panel h3,
#all_flights .panel h3 a {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-hi);
    font-size: 26px;
}

/* ---- ad chrome: in-content KAYAK native unit (per .ah-native).
   Only OUR surrounding chrome is styled; only when populated so the
   empty mount never shows a stray box. Ad iframe/markup untouched. ---- */
#inline_ad_0:not(:empty) {
    display: block;
    background-color: var(--ad-bg);
    border: 1px solid var(--ad-border);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-top: 10px;
}
#inline_ad_0:not(:empty) h4 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-hi);
    margin-top: 0;
}


/* ---- forms: Clarity custom radios / checkboxes (per airhint.css .ahs-*) ---- */
input[type="radio"],
input[type="checkbox"] {
    accent-color: var(--primary);
}

.ahs-radios { display: flex; flex-wrap: wrap; gap: 26px; margin-bottom: 16px; }
.ahs-checks { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 16px; margin-bottom: 0; padding: 0; border: 0; }

.ahs-radio, .ahs-check {
    display: inline-flex; align-items: center; gap: 9px;
    font-size: 15px; font-weight: 500; color: var(--text-hi);
    cursor: pointer; white-space: nowrap; padding-left: 0; margin: 0;
}
/* visually hide the native control but keep it operable/accessible */
.ahs-radio input[type="radio"],
.ahs-check input[type="checkbox"] {
    position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0;
}
.ahs-radio-dot {
    width: 19px; height: 19px; flex: 0 0 auto; position: relative;
    border-radius: 50%; border: 2px solid var(--border-strong);
    background: var(--surface); transition: border-color .15s;
}
.ahs-radio input[type="radio"]:checked + .ahs-radio-dot { border-color: var(--primary); }
.ahs-radio input[type="radio"]:checked + .ahs-radio-dot::after {
    content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--primary);
}
.ahs-checkbox {
    width: 19px; height: 19px; flex: 0 0 auto; position: relative;
    border-radius: 5px; border: 2px solid var(--border-strong);
    background: var(--surface); transition: border-color .15s, background .15s;
}
.ahs-check input[type="checkbox"]:checked + .ahs-checkbox { border-color: var(--primary); background: var(--primary); }
.ahs-check input[type="checkbox"]:checked + .ahs-checkbox::after {
    content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 9px;
    border: solid var(--on-primary); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.ahs-radio input[type="radio"]:focus-visible + .ahs-radio-dot,
.ahs-check input[type="checkbox"]:focus-visible + .ahs-checkbox {
    box-shadow: 0 0 0 3px rgba(58, 111, 168, 0.25);
}

/* ---- header wordmark: Air + bold Hint (per airhint.css .ah-logo) ---- */
.ah-logo {
    font-family: var(--font-display); font-size: 24px; font-weight: 400;
    color: var(--text-hi); letter-spacing: var(--display-letter);
}
.ah-logo b { font-weight: 800; }
