/* ============================================================
   TLV Flight Board — Frontend CSS v17 (v16 recovered from live site + v28 additions)
   Mobile-first responsive flight board
   ============================================================ */

.tlv-flightboard {
    font-family: 'Open Sans', 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    color: #1a2e4a;
    margin: 0 0 24px;
    border: 1px solid #b8d4d4;
    border-radius: 6px;
    overflow: hidden;
}

/* ── Topbar: clock + filter + meta ── */
.tlv-fb-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: #b8d8d8;
    padding: 10px 16px;
    border-bottom: 2px solid #8bbcbc;
}

.tlv-fb-clock {
    display: flex;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
}
.tlv-clock-label,
.tlv-clock-date,
.tlv-clock-time {
    font-size: 20px;
    font-weight: 700;
    color: #1c3f5e;
    letter-spacing: 0.03em;
    font-variant-numeric: tabular-nums;
}
.tlv-clock-label { font-size: 20px; }
.tlv-clock-date  { color: #2a6070; }
.tlv-clock-time  { letter-spacing: 0.05em; }

.tlv-fb-filter {
    flex: 1;
    min-width: 160px;
    max-width: 300px;
}
.tlv-filter-input {
    width: 100%;
    padding: 6px 14px;
    border: 2px solid #8bbcbc;
    border-radius: 20px;
    font-size: 14px;
    color: #1c3f5e;
    background: #fff;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}
.tlv-filter-input:focus {
    border-color: #1c3f5e;
    box-shadow: 0 0 0 3px rgba(28,63,94,.12);
}
.tlv-filter-input::placeholder { color: #7aaabb; }

.tlv-fb-meta {
    font-size: 12px;
    color: #3a6070;
    white-space: nowrap;
}
.tlv-fb-meta a { color: #1c3f5e; text-decoration: underline; }

.tlv-fb-disclaimer {
    font-size: 12px;
    color: #6a8e9e;
    margin: 0;
    padding: 5px 16px;
    background: #edf8f8;
    border-bottom: 1px solid #cce4e4;
}

/* ── Scroll wrapper (desktop) ── */
.tlv-fb-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ══════════════════════════════════════════════════════════
   DESKTOP TABLE  (≥ 700px)
══════════════════════════════════════════════════════════ */
.tlv-fb-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    background: #fff;
    font-size: 15px;
}

.tlv-fb-table thead { display: table-header-group; }
.tlv-fb-table thead tr { background: #daeef0; }
.tlv-fb-table thead th {
    padding: 11px 14px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
    color: #1c3f5e;
    letter-spacing: .02em;
    border-bottom: 2px solid #8bbcbc;
    white-space: nowrap;
}
.tlv-fb-table thead th.center { text-align: center; }

.tlv-fb-table tbody tr {
    background: #fff;
    border-bottom: 1px solid #daeaea;
    transition: background .12s;
}
.tlv-fb-table tbody tr:nth-child(even) { background: #f4fafa; }
.tlv-fb-table tbody tr:hover { background: #e4f4f4; }

.tlv-fb-table tbody td {
    padding: 9px 14px;
    vertical-align: middle;
    color: #1a2e4a;
    font-size: 15px;
    line-height: 1.3;
}

/* Column styles */
.tlv-airline    { font-weight: 600; font-size: 14px; color: #1c3f5e; }
.tlv-flight-num { font-weight: 700; font-size: 15px; color: #1c3f5e; white-space: nowrap; }
.tlv-terminal   { text-align: center; font-weight: 600; font-size: 15px; }
.tlv-actual     { color: #2a6a7a; }
.tlv-iata       { font-size: 12px; color: #5a8a9a; font-weight: 400; margin-left: 3px; }

.tlv-time-wrap  { display: flex; flex-direction: column; line-height: 1.2; }
.tlv-time-main  { font-weight: 700; font-size: 16px; color: #1c3f5e; }
.tlv-time-date  { font-size: 13px; color: #7a9aaa; margin-top: 1px; }

/* Day separator row (v28) */
.tlv-fb-table tbody tr.tlv-day-sep td {
    background: #e6f2f3;
    color: #1c3f5e;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 6px 14px;
}

/* Status */
.tlv-status {
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}
.tlv-status--landed,
.tlv-status--departed,
.tlv-status--final       { color: #1a7a4a; }
.tlv-status--landing     { color: #1a7a4a; font-style: italic; }
.tlv-status--on-time,
.tlv-status--scheduled,
.tlv-status--early       { color: #1c5080; }
.tlv-status--delayed,
.tlv-status--not-final   { color: #b06000; }
.tlv-status--boarding,
.tlv-status--gate-open,
.tlv-status--check-in    { color: #1a6aaa; }
.tlv-status--gate-closed { color: #6a4a9a; }
.tlv-status--diverted    { color: #8a3a9a; }
.tlv-status--canceled,
.tlv-status--cancelled   {
    display: inline-block;
    background: #c0392b;
    color: #fff !important;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 700;
}

/* Cancelled row */
.tlv-fb-table tbody tr.tlv-row--canceled              { background: #fff5f5 !important; }
.tlv-fb-table tbody tr.tlv-row--canceled:hover        { background: #ffe8e8 !important; }
.tlv-fb-table tbody tr.tlv-row--canceled td           { color: #8a1010; border-bottom-color: #f0c8c8; }

/* Filter hide */
.tlv-fb-table tbody tr.tlv-hidden { display: none; }

.tlv-no-results {
    padding: 16px;
    text-align: center;
    color: #8aa8b8;
    font-style: italic;
    display: none;
}
.tlv-empty { padding: 20px; color: #8aa8b8; font-style: italic; text-align: center; }
.tlv-error {
    color: #b02020; background: #fff0f0;
    border: 1px solid #f0c0c0; border-radius: 4px;
    padding: 12px 16px; font-size: 13px;
}

/* ══════════════════════════════════════════════════════════
   MOBILE CARD LAYOUT  (< 700px)
══════════════════════════════════════════════════════════ */
@media (max-width: 699px) {

    .tlv-fb-topbar    { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px; padding: 7px 10px; }
    .tlv-fb-clock     { flex: 0 0 auto; }
    .tlv-clock-label,
    .tlv-clock-date,
    .tlv-clock-time   { font-size: 13px; }
    .tlv-clock-date   { display: none; }
    .tlv-fb-filter    { flex: 1 1 auto; min-width: 0; max-width: 160px; }
    .tlv-filter-input { font-size: 12px; padding: 4px 10px; border-radius: 16px; }
    .tlv-fb-meta      { flex: 0 0 100%; text-align: center; font-size: 10px; white-space: normal; order: 3; }

    .tlv-fb-table thead { display: none; }

    .tlv-fb-table,
    .tlv-fb-table tbody,
    .tlv-fb-table tr,
    .tlv-fb-table td { display: block; width: 100%; }

    .tlv-fb-table tbody tr {
        margin: 0;
        padding: 10px 12px;
        border-bottom: 3px solid #b8d4d4;
        position: relative;
    }
    .tlv-fb-table tbody tr:nth-child(even) { background: #f4fafa; }

    .tlv-fb-table tbody tr.tlv-day-sep { padding: 0; border-bottom: 0; }
    .tlv-fb-table tbody tr.tlv-day-sep td { display: block; }
    .tlv-fb-table tbody tr.tlv-day-sep td::before { display: none; }

    .tlv-fb-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 0;
        border: none;
        font-size: 14px;
        min-height: 28px;
    }
    .tlv-fb-table tbody td:empty { display: none; }

    .tlv-fb-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 12px;
        color: #5a8a9a;
        text-transform: uppercase;
        letter-spacing: .04em;
        min-width: 110px;
        flex-shrink: 0;
    }

    .tlv-airline {
        font-size: 15px;
        font-weight: 700;
        color: #1c3f5e;
        border-bottom: 1px solid #daeaea;
        padding-bottom: 6px !important;
        margin-bottom: 2px;
    }
    .tlv-airline::before { display: none; }

    .tlv-flight-num { font-size: 15px; }

    .tlv-fb-table tbody td:last-child {
        justify-content: flex-end;
        border-top: 1px solid #daeaea;
        padding-top: 6px !important;
        margin-top: 2px;
    }
    .tlv-fb-table tbody td:last-child::before { display: none; }

    .tlv-time-main { font-size: 15px; }
    .tlv-time-date { font-size: 11px; }

    .tlv-fb-table tbody tr.tlv-row--canceled { border-left: 4px solid #c0392b; padding-left: 8px; }

    .tlv-fb-scroll { overflow-x: visible; }
}
