/* ==========================================================================
   eAir home page (flight search) - v2 presentation layer.
   Loaded after flightsearch.css and eAirMobile.css from Default.aspx only, so
   nothing here affects other pages that share HomeMasterPage.master.
   Selectors deliberately keep working with result HTML cached before this
   redesign (same table, older cell markup).
   Colour tokens, the dark palette, navbar, footer and the theme switch live in
   themes/v1/site.css (loaded by the master page on every page).
   ========================================================================== */

    /* airline logos are drawn for light backgrounds */
    [data-bs-theme="dark"] .FlightList img.al,
    [data-bs-theme="dark"] .leg-al img,
    [data-bs-theme="dark"] .dc-tags img,
    [data-bs-theme="dark"] .fh-al img {
        background: var(--logo-bg);
        border-radius: 3px;
    }

    /* date-picker arrows are a dark sprite */
    [data-bs-theme="dark"] .ui-datepicker .ui-icon {
        filter: invert(1);
    }

    /* shortest-path rows in result HTML cached before the redesign carry an inline light background */
    [data-bs-theme="dark"] .FlightList tr[style*="aliceblue"] {
        background-color: var(--row-sp) !important;
        border-top-color: var(--line) !important;
    }

/* ---------- page chrome ---------- */

body, body.bg-body-tertiary {
    font-family: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.45;
    color: var(--ink);
    background-color: var(--page) !important;
    padding-top: var(--nav-h);
}

.container {
    max-width: 1480px !important;
}

main.container-fluid {
    padding-top: 8px;
    padding-bottom: 8px;
}

.Menu {
    color: inherit;
    background-color: transparent;
}

#divMiddleMenuDetail:empty {
    display: none;
}

#nprogress .bar {
    background: var(--accent);
}

/* ---------- layout: results column + side rail ---------- */

#parentContainer {
    width: auto;
    float: none;
    display: block;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

#sidePanel {
    min-width: 0;
}

.adrail .adslot {
    padding: 0 0 12px;
    text-align: center;
    line-height: 0;
}

@media (min-width: 1200px) {
    .hp {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 360px;
        gap: 12px;
        align-items: start;
    }

    /* the card follows the page while the (taller) ad rail scrolls underneath */
    #detailCard {
        position: sticky;
        top: calc(var(--nav-h) + 8px);
        z-index: 5;
        max-height: calc(100vh - var(--nav-h) - 16px);
        overflow: auto;
        scrollbar-width: thin;
    }
}

/* ---------- command bar ---------- */

#divTopMenu.cmdbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: var(--cmd-h);
    padding: 5px 10px;
    text-align: left;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) 0 0;
    position: sticky;
    top: var(--nav-h);
    z-index: 30;
}

.cmd-fields {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.fld {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    margin: 0;
    padding: 0 9px;
    font-size: 13px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-2);
    border-radius: var(--radius-s);
    transition: border-color .15s, box-shadow .15s;
}

    .fld:hover {
        border-color: var(--line-3);
    }

    .fld:focus-within, select.fld:focus, input.fld:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px var(--focus-ring);
        outline: 0;
    }

    .fld input {
        min-width: 0;
        padding: 0;
        border: 0;
        outline: 0;
        background: transparent;
        color: inherit;
    }

.fld-cap {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.fld-apt {
    cursor: text;
}

    /* hotel/taxi modes hide some inputs server-side: do not leave an empty field shell behind */
    .fld-apt:not(:has(input)) {
        display: none;
    }

    .fld-apt input {
        width: 44px;
        font-size: 14px;
        font-weight: 700;
        letter-spacing: .04em;
        text-transform: uppercase;
        transition: width .15s;
    }

        .fld-apt input:focus {
            width: 170px;
            font-weight: 600;
            letter-spacing: 0;
            text-transform: none;
        }

.fld-city {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: var(--ink-2);
}

.fld-apt:focus-within .fld-city {
    display: none;
}

.swap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    font-size: 13px;
    color: var(--ink-2);
    background: var(--surface);
    border: 1px solid var(--line-2);
    border-radius: 50%;
    cursor: pointer;
    transition: transform .25s, color .15s, border-color .15s;
}

    .swap:hover {
        color: var(--accent);
        border-color: var(--accent);
        transform: rotate(180deg);
    }

    .swap.icon-switch:before {
        margin: 0;
    }

.fld-date {
    padding: 0 2px;
    gap: 0;
}

    .fld-date input {
        width: 96px;
        font-weight: 600;
        text-align: center;
        font-variant-numeric: tabular-nums;
        cursor: pointer;
    }

.nudge {
    width: 22px;
    height: 24px;
    padding: 0;
    font-size: 17px;
    line-height: 1;
    color: var(--ink-2);
    background: transparent;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

    .nudge:hover {
        color: var(--accent);
        background: var(--accent-soft);
    }

select.fld-sel {
    max-width: 160px;
    padding-right: 4px;
    cursor: pointer;
}

input.fld-flt {
    width: 96px;
}

.btn-go {
    flex: 0 0 auto;
    height: 30px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(180deg, var(--btn-from), var(--btn-to));
    border: 0;
    border-radius: var(--radius-s);
    box-shadow: 0 1px 2px rgba(42, 65, 216, .4);
    cursor: pointer;
    transition: filter .15s, transform .05s;
}

    .btn-go:hover {
        filter: brightness(1.08);
    }

    .btn-go:active {
        transform: translateY(1px);
    }

/* ---------- summary + filter strip ---------- */

.strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: var(--strip-h);
    padding: 0 10px;
    font-size: 12px;
    color: var(--ink-2);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

#routeSummary {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

    #routeSummary > b {
        font-size: 13px;
        color: var(--ink);
    }

    #routeSummary .arr, .dc-title .arr {
        color: var(--ink-3);
        font-weight: 400;
    }

    #routeSummary span:not(.arr)::before {
        content: "\00b7";
        margin: 0 7px;
        color: var(--ink-3);
    }

    #routeSummary span b {
        color: var(--ink);
    }

    #routeSummary .best b {
        color: var(--good-ink);
    }

.chips {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
}

.chip {
    height: 20px;
    padding: 0 10px;
    font-size: 11.5px;
    line-height: 18px;
    color: var(--ink-2);
    background: var(--surface);
    border: 1px solid var(--line-2);
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .15s, color .15s, border-color .15s;
}

    .chip:hover {
        border-color: var(--accent);
        color: var(--accent-ink);
    }

    .chip.on {
        color: var(--accent-ink);
        font-weight: 600;
        background: var(--accent-soft);
        border-color: var(--accent);
    }

.chip-sep {
    width: 1px;
    height: 14px;
    margin: 0 3px;
    background: var(--line-2);
}

/* ---------- results table ---------- */

#results {
    display: block;
    height: auto;
    min-height: 220px;
    max-height: calc(100vh - var(--nav-h) - var(--cmd-h) - var(--strip-h) - 28px);
    padding: 0;
    overflow: auto;
    background: var(--surface);
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-thumb) transparent;
}

.FlightList {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

    .FlightList tr, .DataTable tr {
        height: var(--row-h);
    }

.DataTable tr:nth-of-type(odd):not(.child):not(.disNo),
.DataTable tr:hover, .DataTable tr:nth-of-type(odd):hover {
    background-color: transparent;
}

.FlightList th {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 3px 6px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--ink-2);
    background-color: var(--surface-2);
    border: 0;
    box-shadow: inset 0 -1px 0 var(--line-2);
    cursor: pointer;
    user-select: none;
}

    .FlightList th:hover {
        color: var(--ink);
    }

    .FlightList th.sorted {
        color: var(--accent-ink);
        background-color: var(--surface-2);
    }

        .FlightList th.sorted.asc::after {
            content: " \25B4";
        }

        .FlightList th.sorted.dsc::after {
            content: " \25BE";
        }

    /* day columns: weekday + date on the first line, cheapest fare of the day underneath */
    .FlightList th.thM {
        min-width: 62px;
        padding: 2px 4px;
        font-size: 11px;
        letter-spacing: 0;
        text-transform: none;
        line-height: 1.2;
    }

        .FlightList th.thM .dow {
            color: var(--ink-3);
            font-weight: 500;
        }

        .FlightList th.thM .lo {
            display: block;
            min-height: 13px;
            font-size: 11px;
            font-weight: 700;
            color: var(--good-ink);
        }

        .FlightList th.thM.sel {
            color: var(--ink);
            background-color: var(--accent-soft);
            box-shadow: inset 0 2px 0 var(--accent), inset 0 -1px 0 var(--line-2);
        }

        .FlightList th.thM.sorted::after {
            content: none;
        }

        .FlightList th.thM.sorted .lo::after {
            content: " \25B4";
            color: var(--accent-ink);
        }

        .FlightList th.thM.sorted.dsc .lo::after {
            content: " \25BE";
        }

        .FlightList th.thM.loading .lo {
            width: 38px;
            height: 9px;
            min-height: 0;
            margin: 3px auto 2px;
            border-radius: 3px;
            background: linear-gradient(90deg, var(--skel-a) 25%, var(--skel-b) 50%, var(--skel-a) 75%);
            background-size: 200% 100%;
            animation: hp-shimmer 1.2s linear 10;
        }

    .FlightList th.rbwt {
        color: var(--ink-2) !important;
    }

        .FlightList th.rbwt .dow {
            color: var(--sunday);
        }

    /* header cells cached before the redesign: neutralise the yellow "loading" paint */
    .FlightList th[style*="yellow"] {
        background-color: var(--surface-2) !important;
    }

    .FlightList th svg {
        display: none;
    }

.FlightList td {
    min-width: 0;
    padding: 0 6px;
    white-space: nowrap;
    border: 0;
    border-bottom: 1px solid var(--line);
}

.DataTable tr td:last-child {
    border-right: 0;
}

.DataTable tr:last-child td {
    border-bottom: 1px solid var(--line);
}

.FlightList td:nth-child(1) {
    width: 30px;
    padding: 0 4px 0 8px;
    font-size: 10.5px;
    color: var(--ink-3);
    text-align: right;
}

.FlightList td:nth-child(2) {
    max-width: 260px;
    padding-left: 8px;
    text-align: left;
    font-weight: 600;
}

.FlightList td:nth-child(3) {
    text-align: left;
    color: var(--ink-2);
}

.FlightList img.al {
    width: 14px;
    height: 14px;
    margin-right: 7px;
    vertical-align: -2px;
    border-radius: 3px;
}

.FlightList small.routes {
    margin-top: 1px;
    padding: 0 6px;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 15px;
    color: var(--accent-ink);
    background: var(--accent-soft);
    border-radius: 999px;
}

    .FlightList small.routes::after {
        content: " \25BE";
    }

/* cells that only exist in the v2 column set */
.FlightList.v2 td b {
    font-size: 12.5px;
    font-weight: 650;
}

.FlightList.v2 td i {
    margin-left: 2px;
    font-size: 10.5px;
    font-style: normal;
    letter-spacing: .03em;
    color: var(--ink-3);
}

.FlightList.v2 .ns {
    font-size: 11.5px;
    color: var(--ink-3);
}

.FlightList.v2 .stp {
    display: inline-block;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 16px;
    color: var(--warn-ink);
    background: var(--warn-bg);
    border-radius: 4px;
}

.FlightList.v2 .lay {
    margin-left: 5px;
    font-size: 11px;
    color: var(--ink-2);
}

.FlightList.v2 td:nth-child(7) {
    min-width: 74px;
    padding-top: 1px;
    text-align: left;
    line-height: 1.15;
}

/* journey-time gauge: filled part is this flight's duration relative to the longest one listed */
.FlightList.v2 td i.bar {
    display: block;
    width: 56px;
    height: 2px;
    margin: 1px 0 0;
    background: linear-gradient(to right, var(--gauge-fill) var(--p, 0%), var(--gauge-track) 0);
    border-radius: 2px;
}

/* fare cells */
.FlightList td div {
    padding: 0 6px;
    line-height: 18px;
    border-radius: 4px;
    cursor: pointer;
}

.FlightList div:hover {
    font-weight: inherit;
    color: inherit;
    background: transparent;
    box-shadow: inset 0 0 0 1.5px var(--accent);
}

.FlightList td div.na, .FlightList td div.na:hover {
    color: var(--fare-na);
    cursor: default;
    box-shadow: none;
}

.FlightList td div.f0, .FlightList td div.f0:hover {
    font-weight: 700;
    color: var(--good-ink);
    background: var(--heat-0-bg);
}

.FlightList td div.f1, .FlightList td div.f1:hover {
    color: var(--heat-1-ink);
    background: var(--heat-1-bg);
}

.FlightList td div.f2, .FlightList td div.f2:hover {
    background: var(--heat-2-bg);
}

.FlightList td div.f4, .FlightList td div.f4:hover {
    color: var(--heat-4-ink);
}

/* the single cheapest fare of each day */
.FlightList td div.green, .FlightList td div.green:hover {
    font-weight: 700;
    color: #fff;
    background: var(--good);
}

.FlightList td.sel {
    background-color: var(--col-sel);
}

.FlightList td.sorted, .sorted {
    background-color: var(--col-sorted);
}

/* row states (selectors mirror flightsearch.css, which uses !important) */
.FlightList .parentBlock, .FlightList .childBlock {
    cursor: pointer;
}

    .FlightList .parentBlock:hover td:nth-child(n), .FlightList .parentBlock:hover a,
    .FlightList .childBlock:hover td:nth-child(n), .FlightList .childBlock:hover a {
        background: var(--row-hover) !important;
        color: var(--ink) !important;
    }

    .FlightList .parentBlock.active td:nth-child(n), .FlightList .parentBlock.active a,
    .FlightList .childBlock.active td:nth-child(n), .FlightList .childBlock.active a {
        background: var(--accent-soft) !important;
        color: var(--ink) !important;
    }

    .FlightList .parentBlock.active td:first-child, .FlightList .childBlock.active td:first-child {
        box-shadow: inset 3px 0 0 var(--accent);
    }

    .FlightList .parentBlock.child:not(.active) td, .FlightList .parentBlock.child:not(.active) a,
    .FlightList .childBlock.child:not(.active) td, .FlightList .childBlock.child:not(.active) a {
        background-color: var(--row-child);
        color: var(--ink);
    }

    .FlightList .parentBlock:hover td:nth-child(3), .FlightList .childBlock:hover td:nth-child(3),
    .FlightList .parentBlock.active td:nth-child(3), .FlightList .childBlock.active td:nth-child(3) {
        color: var(--ink-2) !important;
    }

.FlightList .childBlock td:nth-child(2) {
    padding-left: 30px;
    font-weight: 500;
    text-indent: 0;
}

.FlightList tr.sp td {
    background-color: var(--row-sp);
}

/* group dividers ("1 Stop flights"), incl. the inline-styled ones in older cached HTML */
.FlightList tr.grp td, .FlightList td[colspan][style*="color"] {
    padding: 3px 10px !important;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-align: left;
    color: var(--ink-2) !important;
    background: var(--surface-2) !important;
    border-bottom: 1px solid var(--line-2);
}

.FlightList tr.more td, .FlightList td[colspan] {
    padding: 6px;
    text-align: center;
}

    .FlightList tr.more td a {
        display: inline-block;
        padding: 2px 14px;
        font-size: 12px;
        font-weight: 600;
        color: var(--accent-ink);
        background: var(--accent-soft);
        border-radius: 999px;
    }

.FlightList tr.empty td {
    padding: 34px 10px;
    font-size: 13px;
    color: var(--ink-2);
    text-align: center;
}

/* loading skeleton / empty state */
.skel {
    padding: 8px 12px;
}

.skel-row {
    display: grid;
    grid-template-columns: 24px 1.3fr 1fr 1fr 4fr;
    gap: 14px;
    align-items: center;
    height: var(--row-h);
    border-bottom: 1px solid var(--line);
}

    .skel-row i {
        height: 9px;
        border-radius: 4px;
        background: linear-gradient(90deg, var(--skel-a) 25%, var(--skel-b) 50%, var(--skel-a) 75%);
        background-size: 200% 100%;
        animation: hp-shimmer 1.2s linear infinite;
    }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 56px 16px;
    color: var(--ink-2);
    text-align: center;
}

    .empty-state b {
        font-size: 15px;
        color: var(--ink);
    }

@keyframes hp-shimmer {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

/* ---------- fare tooltip ---------- */

#tooltipFare.tooltip {
    opacity: 1;
    visibility: hidden;
    z-index: 1060;
    padding: 0;
    font-family: inherit;
    font-size: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-pop);
    overflow: hidden;
}

    #tooltipFare.tooltip .tooltiptext {
        position: static;
        width: auto;
        min-width: 150px;
        padding: 0;
        border-radius: 0;
        border-collapse: collapse;
    }

        #tooltipFare.tooltip .tooltiptext::after {
            content: none;
        }

    #tooltipFare .DataTable2 th, #tooltipFare .DataTable2 td {
        padding: 4px 10px;
        text-align: left;
        border: 0;
        border-bottom: 1px solid var(--line);
        background-color: var(--surface) !important;
    }

    #tooltipFare .DataTable2 th {
        position: static;
        font-size: 10.5px;
        font-weight: 600;
        letter-spacing: .05em;
        text-transform: uppercase;
        color: var(--ink-2);
        background-color: var(--surface-2) !important;
    }

    #tooltipFare .DataTable2 td:nth-child(2) {
        font-weight: 700;
        text-align: right;
        font-variant-numeric: tabular-nums;
    }

    #tooltipFare .DataTable2 td[colspan] {
        color: var(--ink-2);
    }

/* ---------- autocomplete + datepicker ---------- */

.autocomplete-w1 {
    margin: 6px 0 0;
}

.autocomplete {
    margin: 0;
    font-size: 12.5px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-pop);
}

    /* one suggestion per row: name on the left (ellipsised), code chip on the right.
       The plugin writes float/width inline on the name cell, hence !important. */
    .autocomplete > div {
        display: flex;
        float: none;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 4px 8px;
        cursor: pointer;
    }

        .autocomplete > div > div {
            float: none !important;
            padding: 0;
        }

            .autocomplete > div > div:first-child {
                flex: 1 1 auto;
                width: auto !important;
                min-width: 0;
                text-overflow: ellipsis;
            }

    .autocomplete div.apcd {
        flex: 0 0 auto;
        padding: 2px 6px;
    }

    .autocomplete .selected {
        background: var(--accent-soft);
    }

    .autocomplete div.apcd {
        background: var(--navy);
        border-radius: 4px;
    }

    .autocomplete strong {
        color: var(--accent-ink);
    }

.ui-datepicker {
    z-index: 1055 !important;
    width: 19em;
    padding: 8px;
    font-size: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-pop);
}

    .ui-datepicker, .ui-datepicker.ui-widget-content {
        color: var(--ink);
    }

    .ui-datepicker .ui-datepicker-header {
        color: var(--ink);
        background: var(--surface-2);
        border-color: var(--line);
        border-radius: 6px;
    }

    .ui-datepicker .ui-datepicker-title {
        font-weight: 600;
        color: var(--ink);
    }

    .ui-datepicker .ui-state-default {
        color: var(--ink);
        background: transparent;
        border-color: transparent;
    }

    .ui-datepicker th {
        padding: .5em .3em;
        font-size: 10.5px;
        font-weight: 600;
        color: var(--ink-3);
        text-transform: uppercase;
    }

    .ui-datepicker td span, .ui-datepicker td a {
        padding: .35em .2em;
        text-align: center;
        color: var(--ink);
        border: 0;
        border-radius: 6px;
        background: transparent;
    }

        .ui-datepicker td a:hover {
            background: var(--accent-soft);
        }

    .ui-datepicker td a.ui-state-highlight {
        box-shadow: inset 0 0 0 1px var(--accent);
    }

    .ui-datepicker td a.ui-state-active {
        color: #fff;
        background: var(--btn-to);
    }

    .ui-datepicker .ui-state-disabled {
        opacity: 1;
    }

        .ui-datepicker .ui-state-disabled span {
            color: var(--fare-na);
        }

/* ---------- flight detail card (side rail; bottom sheet under 1200px) ---------- */

#detailCard {
    display: none;
    margin-bottom: 12px;
    font-size: 12.5px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

body.has-detail #detailCard {
    display: block;
}

.dc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 8px 9px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
}

.dc-title b {
    display: block;
    font-size: 15px;
    line-height: 1.2;
}

.dc-title small {
    font-size: 11.5px;
    color: var(--ink-2);
}

.dc-x {
    width: 28px;
    height: 28px;
    font-size: 20px;
    line-height: 1;
    color: var(--ink-2);
    background: transparent;
    border: 0;
    border-radius: var(--radius-s);
    cursor: pointer;
}

    .dc-x:hover {
        color: var(--ink);
        background: var(--line);
    }

.dc-legs {
    padding: 10px 12px 6px;
}

.leg-al {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
    color: var(--ink-2);
}

    .leg-al a {
        font-weight: 600;
        color: var(--accent-ink);
    }

.leg-dur {
    margin-left: auto;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
}

.leg-pt {
    position: relative;
    display: grid;
    grid-template-columns: 44px 36px minmax(0, 1fr);
    align-items: baseline;
    padding: 4px 0 4px 18px;
}

    .leg-pt b {
        font-size: 14px;
        font-variant-numeric: tabular-nums;
    }

    .leg-pt .code {
        font-size: 11.5px;
        font-weight: 700;
        color: var(--ink-2);
    }

    .leg-pt a {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: var(--ink-2);
    }

        .leg-pt a:hover {
            color: var(--accent-ink);
        }

    .leg-pt::before {
        content: "";
        position: absolute;
        left: 3px;
        top: 50%;
        width: 9px;
        height: 9px;
        margin-top: -4px;
        background: var(--surface);
        border: 2px solid var(--accent);
        border-radius: 50%;
        z-index: 1;
    }

    .leg-pt + .leg-pt::after {
        content: "";
        position: absolute;
        left: 7px;
        top: -50%;
        height: 100%;
        border-left: 1.5px solid var(--timeline);
    }

.layover {
    margin: 6px 0 8px;
    padding: 2px 10px;
    font-size: 11.5px;
    color: var(--warn-ink);
    text-align: center;
    background: var(--warn-bg);
    border: 1px dashed var(--warn-line);
    border-radius: 999px;
}

.dc-fares {
    padding: 0 8px 10px;
    overflow-x: auto;
}

    .dc-fares + .dc-fares {
        padding-top: 0;
    }

.DataTable.VendorFare {
    width: 100%;
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
    border-collapse: collapse;
}

    .DataTable.VendorFare th {
        position: static;
        padding: 3px 2px;
        font-size: 10.5px;
        font-weight: 600 !important;
        color: var(--ink-2);
        background-color: var(--surface-2);
        border: 0;
        border-bottom: 1px solid var(--line-2);
        cursor: default;
    }

        .DataTable.VendorFare th .dow {
            display: block;
            font-size: 9.5px;
            font-weight: 500;
            color: var(--ink-3);
        }

        .DataTable.VendorFare th.sel {
            color: var(--accent-ink);
            background-color: var(--accent-soft);
        }

        .DataTable.VendorFare th:first-child, .DataTable.VendorFare td:first-child {
            padding-left: 6px;
            text-align: left;
            white-space: nowrap;
        }

    .DataTable.VendorFare td {
        padding: 4px 2px;
        border: 0;
        border-bottom: 1px solid var(--line);
    }

    .DataTable.VendorFare a {
        font-weight: 600;
        color: var(--accent-ink);
    }

#commonDetail {
    padding: 10px 12px 12px;
    border-top: 1px solid var(--line);
}

    #commonDetail h6 {
        margin: 0 0 6px;
        font-size: 10.5px;
        font-weight: 700;
        letter-spacing: .06em;
        text-transform: uppercase;
        color: var(--ink-3);
    }

        #commonDetail h6:not(:first-child) {
            margin-top: 10px;
        }

.dc-apt {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 3px 0;
    color: var(--ink);
}

    .dc-apt b {
        flex: 0 0 auto;
        padding: 1px 6px;
        font-size: 11px;
        letter-spacing: .04em;
        color: #fff;
        background: var(--navy);
        border-radius: 4px;
    }

    .dc-apt span {
        min-width: 0;
        font-weight: 600;
    }

    .dc-apt small {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 11.5px;
        font-weight: 400;
        color: var(--ink-2);
    }

    .dc-apt:hover span {
        color: var(--accent-ink);
    }

.dc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

    .dc-tags a {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 1px 9px;
        font-size: 11.5px;
        color: var(--ink-2);
        border: 1px solid var(--line-2);
        border-radius: 999px;
    }

        .dc-tags a:hover {
            color: var(--accent-ink);
            border-color: var(--accent);
        }

@media (max-width: 1199.98px) {
    body.has-detail #detailCard {
        position: fixed;
        left: 8px;
        right: 8px;
        bottom: 8px;
        z-index: 1040;
        max-height: 46vh;
        margin: 0;
        overflow: auto;
        box-shadow: 0 -6px 40px rgba(15, 23, 42, .3);
    }

    #sidePanel {
        margin-top: 12px;
    }

    .adrail {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
    }
}

/* ---------- explore links (server-rendered, kept for SEO) ---------- */

#commonLinks {
    display: block;
    padding: 12px 14px 6px;
    font-size: 12px;
    border-top: 1px solid var(--line);
    border-radius: 0 0 var(--radius) var(--radius);
}

    #commonLinks > div {
        padding: 0 !important;
    }

    #commonLinks .footerlinkssmall {
        margin: 0 0 10px;
        columns: 5 170px;
        column-gap: 20px;
    }

        #commonLinks .footerlinkssmall li {
            padding: 1px 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            break-inside: avoid;
        }

            #commonLinks .footerlinkssmall li:has(> b) {
                column-span: all;
                margin: 2px 0 4px;
            }

            #commonLinks .footerlinkssmall li b {
                font-size: 10.5px;
                font-weight: 700;
                letter-spacing: .06em;
                text-transform: uppercase;
                color: var(--ink-3);
            }

            #commonLinks .footerlinkssmall li.mb-1 {
                margin-bottom: 6px !important;
            }

        #commonLinks .footerlinkssmall a {
            color: var(--ink-2);
        }

            #commonLinks .footerlinkssmall a:hover {
                color: var(--accent-ink);
            }

/* ---------- small screens / mobile markup (flight cards) ---------- */

@media (max-width: 770px) {
    main.container-fluid {
        padding-left: 6px;
        padding-right: 6px;
    }

    #results {
        min-height: 0;
        max-height: none;
        background: transparent;
    }

    #divTopMenu.cmdbar {
        flex-wrap: wrap;
        position: static;
    }

    .cmd-fields {
        flex-wrap: wrap;
    }

    #divTopMenu.m-cmd {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr);
        gap: 6px;
        align-items: center;
        padding: 8px;
    }

        #divTopMenu.m-cmd .form-control {
            height: 34px;
            padding: 0 9px;
            font-size: 14px;
            font-weight: 600;
            border: 1px solid var(--line-2);
            border-radius: var(--radius-s);
        }

        #divTopMenu.m-cmd select.form-control {
            grid-column: 1 / 3;
            font-weight: 500;
        }

    #btnSearch, #btnSearch.btn-go {
        width: 100%;
        height: 34px;
        margin: 0;
        padding: 0 10px;
        color: #fff;
        background: linear-gradient(180deg, var(--btn-from), var(--btn-to));
        border-radius: var(--radius-s);
    }

    .strip {
        flex-wrap: wrap;
        padding: 5px 8px;
        row-gap: 5px;
    }

    #routeSummary {
        flex: 1 1 100%;
    }

    .chips {
        max-width: 100%;
        overflow-x: auto;
    }

    .flight-card {
        margin: 8px 6px;
        padding: 10px 12px;
        color: var(--ink);
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }

    .flight-header .fh-al {
        display: grid;
        grid-template-columns: 20px auto;
        column-gap: 8px;
        align-items: center;
    }

        .flight-header .fh-al img {
            grid-row: 1 / 3;
            width: 20px;
            height: 20px;
            margin: 0;
            border-radius: 4px;
        }

    .flight-card .airline {
        font-size: 13px;
        font-weight: 600;
        line-height: 1.2;
    }

    .flight-card .flight-no {
        font-size: 11.5px;
        color: var(--ink-2);
    }

    .flight-card .duration {
        font-weight: 600;
        color: var(--ink-2);
    }

    .flight-card .city {
        color: var(--ink-2);
    }

    .flight-card .time {
        font-size: 17px;
        font-variant-numeric: tabular-nums;
    }

    .flight-card .via {
        display: inline-block;
        margin-top: 6px;
        padding: 1px 8px;
        font-size: 11.5px;
        color: var(--warn-ink);
        background: var(--warn-bg);
        border-radius: 999px;
    }

    .fare-row, .date-row {
        gap: 3px;
    }

    .fare-row {
        margin-top: 10px;
    }

        .fare-row > div {
            padding: 3px 0;
            font-size: 12px;
            font-weight: 600;
            font-variant-numeric: tabular-nums;
            color: var(--ink);
            background: var(--surface-2);
            border-right: 0;
            border-radius: 5px;
        }

            .fare-row > div.na {
                color: var(--fare-na);
                font-weight: 400;
            }

            .fare-row > div.f0 {
                color: var(--good-ink);
                background: var(--heat-0-bg);
            }

            .fare-row > div.f1 {
                color: var(--heat-1-ink);
                background: var(--heat-1-bg);
            }

            .fare-row > div.f4 {
                color: var(--heat-4-ink);
            }

            .fare-row > div.green {
                color: #fff;
                background: var(--good);
            }

    .date-row > div {
        font-size: 10px;
        color: var(--ink-3);
    }
}

@media (prefers-reduced-motion: reduce) {
    .skel-row i, .FlightList th.thM.loading .lo {
        animation: none;
    }

    .swap, .fld-apt input {
        transition: none;
    }
}
