@charset "utf-8";
/* ==========================================================================
   Flight Schedule - modern UI
   Self-contained. Requires only Bootstrap 5 + Font Awesome (loaded by MasterPage).
   Works LTR (English) and RTL (Urdu, <div class="fs" dir="rtl">).
   ========================================================================== */

.fs {
    --fs-blue: var(--paa-blue, #005C7C);
    --fs-dark: var(--paa-dark, #002e3e);
    --fs-gold: var(--paa-gold, #CAA202);
    --fs-bg: #f4f6f8;
    --fs-card: #ffffff;
    --fs-line: #e3e8ec;
    --fs-text: #1f2d34;
    --fs-muted: #6b7c86;
    --fs-green: #0f7b43;
    --fs-green-bg: #e6f4ec;
    --fs-red: #b3261e;
    --fs-red-bg: #fdecea;
    --fs-amber: #8a6100;
    --fs-amber-bg: #fdf3e0;
    --fs-radius: 12px;
    --fs-shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(0,46,62,.07);
    color: var(--fs-text);
    font-size: 15px;
}

/* ---------- Urdu / RTL ---------- */
.fs[dir="rtl"] {
    font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Inter', Tahoma, sans-serif;
    line-height: 2.1;
}

.fs[dir="rtl"] .fs-num,
.fs[dir="rtl"] .fs-time,
.fs[dir="rtl"] .fs-eta {
    direction: ltr;
    unicode-bidi: embed;
    font-family: 'Inter', Tahoma, sans-serif;
    line-height: 1.4;
}

/* ---------- Header ---------- */
.fs-head {
    background: linear-gradient(135deg, var(--fs-blue) 0%, var(--fs-dark) 100%);
    border-radius: var(--fs-radius);
    padding: 1.5rem 1.75rem;
    color: #fff;
    margin-bottom: 1.25rem;
}

.fs-head h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 .35rem;
    color: #fff;
}

.fs[dir="rtl"] .fs-head h1 { font-size: 2rem; }

.fs-head .fs-sub {
    margin: 0;
    opacity: .85;
    font-size: .9rem;
}

.fs-updated {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    padding: .3rem .85rem;
    font-size: .8rem;
    white-space: nowrap;
}

.fs-updated b { font-weight: 600; }

/* language switch */
.fs-lang {
    display: inline-flex;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 999px;
    overflow: hidden;
}

.fs-lang a {
    padding: .3rem 1rem;
    font-size: .82rem;
    color: #fff;
    text-decoration: none;
    background: transparent;
    line-height: 1.6;
}

.fs-lang a:hover { background: rgba(255,255,255,.18); }

/* ---------- Segmented control: Arrivals / Departures ---------- */
.fs-seg {
    display: inline-flex;
    background: #e7ecef;
    border-radius: 999px;
    padding: 4px;
    gap: 4px;
}

.fs-seg input[type="submit"] {
    border: 0;
    background: transparent;
    color: var(--fs-muted);
    font-weight: 600;
    font-size: .95rem;
    padding: .5rem 1.6rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.fs-seg input[type="submit"]:hover { color: var(--fs-blue); }

.fs-seg input[type="submit"].active {
    background: var(--fs-card);
    color: var(--fs-blue);
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

.fs[dir="rtl"] .fs-seg input[type="submit"] { font-size: 1.15rem; }

/* ---------- Day tabs (replaces the old drag timeline) ---------- */
.fs-days {
    display: inline-flex;
    gap: .4rem;
    flex-wrap: wrap;
}

.fs-day {
    border: 1px solid var(--fs-line);
    background: var(--fs-card);
    border-radius: 10px;
    padding: .45rem 1rem;
    cursor: pointer;
    text-align: center;
    line-height: 1.25;
    transition: border-color .15s, box-shadow .15s;
}

.fs-day:hover { border-color: var(--fs-blue); }

.fs-day.active {
    border-color: var(--fs-blue);
    background: var(--fs-blue);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,92,124,.28);
}

.fs-day .fs-day-name { font-weight: 600; font-size: .88rem; display: block; }
.fs-day .fs-day-date { font-size: .72rem; opacity: .7; display: block; }
.fs-day.active .fs-day-date { opacity: .85; }
.fs[dir="rtl"] .fs-day .fs-day-name { font-size: 1.1rem; }

/* ---------- Filter bar ---------- */
.fs-filters {
    background: var(--fs-card);
    border: 1px solid var(--fs-line);
    border-radius: var(--fs-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--fs-shadow);
}

.fs-field label {
    display: block;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--fs-muted);
    font-weight: 600;
    margin-bottom: .25rem;
}

.fs[dir="rtl"] .fs-field label {
    text-transform: none;
    letter-spacing: 0;
    font-size: .95rem;
}

.fs-filters select,
.fs-filters input[type="text"] {
    width: 100%;
    border: 1px solid var(--fs-line);
    border-radius: 8px;
    padding: .5rem .7rem;
    font-size: .92rem;
    background-color: #fff;
    color: var(--fs-text);
}

.fs[dir="rtl"] .fs-filters select,
.fs[dir="rtl"] .fs-filters input[type="text"] {
    font-size: 1.1rem;
    font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', Tahoma, sans-serif;
}

.fs-filters select:focus,
.fs-filters input[type="text"]:focus {
    outline: 0;
    border-color: var(--fs-blue);
    box-shadow: 0 0 0 3px rgba(0,92,124,.13);
}

.fs-search-wrap { position: relative; }

.fs-search-wrap .fa-magnifying-glass,
.fs-search-wrap .fa-search {
    position: absolute;
    top: 50%;
    inset-inline-start: .7rem;
    transform: translateY(-50%);
    color: var(--fs-muted);
    font-size: .85rem;
    pointer-events: none;
}

.fs-search-wrap input[type="text"] { padding-inline-start: 2rem; }

/* ---------- Results ---------- */
.fs-results {
    background: var(--fs-card);
    border: 1px solid var(--fs-line);
    border-radius: var(--fs-radius);
    box-shadow: var(--fs-shadow);
    overflow: hidden;
}

/* Narrow fixed logo column; the other five share the remaining width equally:
   Airline | Flight | From/To | Schedule Time | Estimated Time | Status */
.fs-thead {
    display: grid;
    grid-template-columns: 84px repeat(5, 1fr);
    gap: .75rem;
    align-items: center;
    padding: .7rem 1rem;
    background: #eef2f4;
    border-bottom: 1px solid var(--fs-line);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--fs-muted);
    position: sticky;
    top: 0;
    z-index: 2;
}

.fs[dir="rtl"] .fs-thead {
    text-transform: none;
    letter-spacing: 0;
    font-size: 1rem;
}

.fs-list { max-height: 65vh; overflow-y: auto; }

.fs-row {
    display: grid;
    grid-template-columns: 84px repeat(5, 1fr);
    gap: .75rem;
    align-items: center;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--fs-line);
    text-decoration: none;
    color: inherit;
    transition: background .12s;
}

.fs-row:last-child { border-bottom: 0; }
.fs-row:hover { background: #f7fafb; }

/* the first flight at or after the current time, on today's board */
.fs-row.fs-next {
    background: #f2f9fb;
    box-shadow: inset 3px 0 0 var(--fs-blue);
}

.fs[dir="rtl"] .fs-row.fs-next { box-shadow: inset -3px 0 0 var(--fs-blue); }

/* Airline logos ship at wildly different aspect ratios (1:1 to 6.5:1), so each
   one sits in a fixed tile and is scaled to fit. Every logo then reads as the
   same size no matter what shape the source file is. */
.fs-logo-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 44px;
    padding: 5px;
    background: #fff;
    border: 1px solid var(--fs-line);
    border-radius: 9px;
    box-shadow: 0 1px 2px rgba(0, 46, 62, .07);
    overflow: hidden;
}

.fs-row:hover .fs-logo-tile { border-color: #c2d4dc; }

.fs-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* time stacked over its date */
.fs-c-time { display: flex; flex-direction: column; align-items: flex-start; }

.fs-time { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.fs-date { font-size: .72rem; color: var(--fs-muted); font-weight: 400; line-height: 1.3; }
.fs-city { font-size: 1rem; font-weight: 600; }
.fs[dir="rtl"] .fs-city { font-size: 1.25rem; }

.fs-num {
    font-weight: 600;
    color: var(--fs-blue);
    font-variant-numeric: tabular-nums;
}

/* Nudge the Flight column off the logo tile - the logo column is fixed and
   narrow, so the default gap alone left the two sitting too close.
   Header and rows take the same offset so the column stays aligned. */
.fs-thead > div:nth-child(2),
.fs-c-num {
    padding-inline-start: 1.25rem;
}

/* ---------- Estimated time (its own column) ---------- */
.fs-eta {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--fs-muted);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

/* an estimate that differs from schedule is the number people look for */
.fs-eta.changed { color: var(--fs-red); }

/* ---------- Status badges ---------- */
.fs-badge {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    background: #eef2f4;
    color: var(--fs-muted);
    white-space: nowrap;
}

.fs[dir="rtl"] .fs-badge { font-size: .95rem; }

.fs-badge.green { background: var(--fs-green-bg); color: var(--fs-green); }
.fs-badge.red { background: var(--fs-red-bg); color: var(--fs-red); }
.fs-badge.amber { background: var(--fs-amber-bg); color: var(--fs-amber); }


/* ---------- Empty state ---------- */
.fs-empty {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--fs-muted);
}

.fs-empty i { font-size: 2.25rem; opacity: .35; display: block; margin-bottom: .75rem; }

/* ---------- Loading ---------- */
.fs-loading {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.55);
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fs-spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(0,92,124,.2);
    border-top-color: var(--fs-blue);
    border-radius: 50%;
    animation: fs-spin .7s linear infinite;
}

@keyframes fs-spin { to { transform: rotate(360deg); } }

/* refresh countdown chip, sits beside "Last Updated" in the header */
.fs-countdown {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    padding: .3rem .85rem;
    font-size: .8rem;
    white-space: nowrap;
}

.fs-countdown #fsCountdown {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    min-width: 2.6em;
    text-align: center;
}

.fs[dir="rtl"] .fs-countdown { font-size: .95rem; }

.fs-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    justify-content: flex-end;
}

/* Google Play button */
.fs-appbtn {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    border: 1px solid var(--fs-line);
    background: var(--fs-card);
    border-radius: 10px;
    padding: .45rem .9rem;
    text-decoration: none;
    color: var(--fs-text);
    font-size: .82rem;
    line-height: 1.25;
    transition: border-color .15s, box-shadow .15s;
}

.fs-appbtn:hover {
    border-color: var(--fs-blue);
    box-shadow: 0 2px 10px rgba(0,92,124,.14);
    color: var(--fs-text);
}

.fs-appbtn img { height: 22px; width: auto; }
.fs-appbtn .fs-appbtn-sub { display: block; font-size: .7rem; color: var(--fs-muted); }
.fs-appbtn .fs-appbtn-name { font-weight: 600; }
.fs[dir="rtl"] .fs-appbtn { font-size: .95rem; }

/* ---------- Responsive: card layout on small screens ---------- */
@media (max-width: 767.98px) {
    .fs-thead { display: none; }

    .fs-list { max-height: none; }

    /* two lines: city + status on top, then flight no / schedule / estimated */
    .fs-row {
        grid-template-columns: 56px auto 1fr auto;
        grid-template-areas:
            "logo city city status"
            "logo num  time eta";
        row-gap: .25rem;
        column-gap: .6rem;
        padding: .85rem 1rem;
        align-items: center;
    }

    .fs-c-logo   { grid-area: logo; }
    .fs-c-city   { grid-area: city; }
    /* the desktop offset would misalign the stacked card layout */
    .fs-c-num    { grid-area: num; padding-inline-start: 0; }
    .fs-c-time   { grid-area: time; }
    .fs-c-eta    { grid-area: eta; justify-self: end; }
    .fs-c-status { grid-area: status; justify-self: end; text-align: end; }

    .fs-time { font-size: .95rem; }
    .fs-eta  { font-size: .95rem; }
    .fs-c-time .fs-date { font-size: .7rem; }

    .fs-logo-tile { width: 54px; height: 36px; padding: 4px; border-radius: 8px; }

    /* mark the estimate so the two times aren't confusable without headers */
    .fs-c-eta:not(:empty) .fs-eta::before {
        content: "\2192\00a0";
        opacity: .55;
        font-weight: 400;
    }
}

@media (max-width: 575.98px) {
    .fs-head { padding: 1.15rem; }
    .fs-head h1 { font-size: 1.3rem; }
    .fs-seg input[type="submit"] { padding: .5rem 1rem; font-size: .88rem; }
}

/* ---------- Print ---------- */
@media print {
    .fs-filters, .fs-lang, .fs-seg, .fs-days, .fs-refresh-note { display: none !important; }
    .fs-list { max-height: none; overflow: visible; }
    .fs-results { box-shadow: none; }
}
