/**
 * PSP Flight Display Styles
 * v2.3.1
 * Fixes: button active/focus state (white text on teal), uniform row height,
 *        sticky thead, seamless detail rows, CSS-only search icon (correct size),
 *        tab counts removed, pagination label text restored.
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Open+Sans:wght@400;500;600&display=swap');

/* ── Elementor / Astra compatibility resets ───────────────────────────
   Scoped to .psp-flights so we don't bleed into page styles.
   These cover the most common theme overrides: box-sizing, borders on
   table elements, inflated button padding, and font-size resets.
──────────────────────────────────────────────────────────────────── */
.psp-flights *,
.psp-flights *::before,
.psp-flights *::after {
    box-sizing: border-box !important;
}

/* Elementor frequently adds borders to th/td globally */
.psp-flights table,
.psp-flights th,
.psp-flights td {
    border: none !important;
}

/* Astra/Elementor can inflate or deflate button defaults */
.psp-flights button {
    appearance: none !important;
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Prevent Elementor global link styles bleeding onto pills */
.psp-flights a,
.psp-flights span {
    text-decoration: none !important;
}

/* ─── Variables ──────────────────────────────────────────────────── */
:root {
    --psp-dark-teal: #1A747F;
    --psp-teal-hover:#155f69;
    --psp-orange:    #E98056;
    --psp-gray:      #484D56;

    --text-primary:  #1a1f2e;
    --text-secondary:#4b5563;
    --text-muted:    #6b7280;   /* was #9ca3af (2.54: 1) — now 4.83:1 ✓ SC 1.4.3 */
    --text-delay:    #b84a1c !important;

    /* Status — all ≥ 4.5: 1 WCAG AA */
    --good-bg:       #e8f5f6 !important;
    --good-text:     #1A747F;
    --departed-bg:   #eeeef0;
    --departed-text: #484D56;
    --delay-bg:   #fff3ed;
    --delay-text: #b84a1c;
    --cancel-bg:  #fdf2f2;
    --cancel-text:#9b2c2c;

    --border-light:  #f0f2f5;
    --border-medium: #e2e5ea;
    /* SC 1.4.11 — interactive control borders need 3: 1 on white.
       #878e98 = 3.31:1. Used on inputs, selects, and filter buttons. */
    --border-ui:     #878e98 !important;

    --card-bg:     #ffffff;
    --shadow-sm:   0 1px 3px rgba(0,0,0,0.07),0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:   0 4px 12px rgba(0,0,0,0.10),0 2px 4px rgba(0,0,0,0.06);
    --page-bg:     #f4f6f9;

    /* SC 1.4.11 — focus indicator needs 3: 1.
       White inner ring + teal outer ring works on any background:
       on white: teal outer = 5.46:1 ✓   on teal: white inner = 5.46:1 ✓ */
    --focus-ring:  0 0 0 2px #ffffff, 0 0 0 4px #1A747F !important;
    --focus-color: #1A747F;
}

/* ─── Utilities ───────────────────────────────────────────────────── */
.sr-only {
    position: absolute !important;width: 1px !important;height: 1px !important;
    padding: 0 !important;margin: -1px !important;overflow: hidden !important;
    clip: rect(0,0,0,0) !important;white-space: nowrap !important;border: 0 !important;
}

/* ─── Container ───────────────────────────────────────────────────── */
.psp-flights {
    font-family: 'Open Sans', sans-serif !important;
    color: #1a1f2e !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
    background: transparent !important;
    padding: 0 0 32px !important;
}

/* ─── Tabs ────────────────────────────────────────────────────────── */
.psp-flights__tabs {
    display: flex !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e2e5ea !important;
    border-radius: 12px 12px 0 0 !important;
    padding: 0 8px !important;
    margin-bottom: 16px !important;
}

.psp-flights__tab {
    font-family: 'Poppins', sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #6b7280 !important;
    padding: 16px 20px 13px !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    border-radius: 0 !important;
    margin-bottom: -1px !important;
    cursor: pointer !important;
    transition: color 0.15s, border-color 0.15s;
    -webkit-appearance: none !important;
    box-shadow: none !important;
    text-transform: none !important;
    text-decoration: none !important;
    letter-spacing: normal !important;
    -webkit-tap-highlight-color: transparent !important;
}

.psp-flights__tab:hover {
    color: #1a1f2e !important;
    background: none !important;
    background-color: transparent !important;
    border-color: transparent !important;
    border-bottom-color: transparent !important;
}

/* WCAG focus — no outline on mouse click, visible on keyboard */
.psp-flights__tab:focus          { outline: none !important; }
.psp-flights__tab:focus-visible  { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #1A747F !important; outline: none !important; border-radius: 4px 4px 0 0 !important; }

.psp-flights__tab--active {
    color: #1A747F !important;
    background: none !important;
    background-color: transparent !important;
    border-bottom: 3px solid #E98056 !important;
    box-shadow: none !important;
}

.psp-flights__tab--active:hover {
    color: #1A747F !important;
    background: none !important;
    background-color: transparent !important;
}

/* Explicit :active to prevent Elementor blue flash */
.psp-flights__tab:active {
    color: #1A747F !important;
    background: none !important;
    background-color: transparent !important;
}

/* ─── Filters bar ─────────────────────────────────────────────────── */
.psp-flights__filters {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 14px 16px !important;
    background: #ffffff !important;
    border-radius: 10px !important;
    margin-bottom: 16px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07),0 1px 2px rgba(0,0,0,0.04) !important;
}

/* Search — icon is pure CSS, no DOM SVG */
.psp-flights__search { flex: 2 !important; min-width: 240px !important; position: relative !important; }

.psp-flights__search-input {
    width: 100% !important;
    height: 42px !important;
    padding: 0 14px 0 40px !important;
    border: 1.5px solid #878e98 !important;  /* SC 1.4.11: 3.31:1 on white */
    border-radius: 8px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: #1a1f2e !important;
    box-sizing: border-box !important;
    background-color: #fafbfc !important;
    /* Small 16×16 magnifying glass encoded inline — no external request */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: 12px center !important;
    background-size: 16px 16px !important;
    transition: border-color 0.15s, background-color 0.15s;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.psp-flights__search-input:focus {
    outline: none !important;
    border-color: #1A747F !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #1A747F !important;
}

.psp-flights__search-input::placeholder { color: #6b7280 !important; }

/* Remove native clear button on search inputs */
.psp-flights__search-input::-webkit-search-cancel-button { display: none !important; }

/* Airline select */
.psp-flights__airline-select {
    height: 42px !important;
    min-width: 150px !important;
    padding: 0 30px 0 12px !important;
    border: 1.5px solid #878e98 !important;  /* SC 1.4.11 */
    border-radius: 8px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: #1a1f2e !important;
    background: #fafbfc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2 4l4 4 4-4z'/%3E%3C/svg%3E") no-repeat right 10px center !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

.psp-flights__airline-select:focus {
    outline: none !important;
    border-color: #1A747F !important;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #1A747F !important;
}

/* Mobile-only selects: hidden on desktop, shown at 600px */
.psp-flights__mobile-select { display: none !important; }

/* Day filter buttons */
.psp-flights__day-filter { display: flex !important; gap: 4px !important; }

.psp-flights__day-filter-btn {
    height: 42px !important;
    padding: 0 16px !important;
    border: 1.5px solid #878e98 !important;
    border-radius: 8px !important;
    background: #fafbfc !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    color: #4b5563 !important;
    cursor: pointer !important;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap !important;
    text-transform: none !important;
    text-decoration: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.psp-flights__day-filter-btn:hover {
    border-color: #1A747F !important;
    color: #1A747F !important;
    background: #fff !important;
}

/* Fix: active and focus states explicitly defined so UA doesn't invert */
.psp-flights__day-filter-btn:active           { background: #1A747F !important; border-color: #1A747F !important; color: #fff !important; }
.psp-flights__day-filter-btn:focus            { outline: none !important; }
.psp-flights__day-filter-btn:focus-visible    { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #1A747F !important; outline: none !important; }

.psp-flights__day-filter-btn--active {
    background: #1A747F !important;
    background-color: #1A747F !important;
    border-color: #1A747F !important;
    color: #fff !important;
    box-shadow: none !important;
}

.psp-flights__day-filter-btn--active:hover {
    background: #155f69 !important;
    background-color: #155f69 !important;
    border-color: #155f69 !important;
    color: #fff !important;
    box-shadow: none !important;
}

.psp-flights__day-filter-btn:hover {
    border-color: #1A747F !important;
    color: #1A747F !important;
    background: #fff !important;
    background-color: #fff !important;
}

/* Sort toggle */
.psp-flights__sort-toggle { display: flex !important; align-items: center !important; gap: 6px !important; margin-left: auto !important; }

.psp-flights__sort-label {
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #6b7280 !important;
}

.psp-flights__sort-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 0 14px !important;
    height: 38px !important;
    border: 1.5px solid #878e98 !important;
    border-radius: 8px !important;
    background: #fafbfc !important;
    font-size: 13px !important;
    font-family: inherit !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    color: #4b5563 !important;
    cursor: pointer !important;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-transform: none !important;
    text-decoration: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.psp-flights__sort-btn:hover { border-color: #1A747F !important; color: #1A747F !important; }
.psp-flights__sort-btn:active { background: #1A747F !important; border-color: #1A747F !important; color: #fff !important; }
.psp-flights__sort-btn:focus          { outline: none !important; }
.psp-flights__sort-btn:focus-visible  { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #1A747F !important; outline: none !important; }

.psp-flights__sort-btn--active {
    background: #1A747F !important;
    background-color: #1A747F !important;
    border-color: #1A747F !important;
    color: #fff !important;
    box-shadow: none !important;
}

.psp-flights__sort-btn--active:hover {
    background: #155f69 !important;
    background-color: #155f69 !important;
    border-color: #155f69 !important;
    color: #fff !important;
    box-shadow: none !important;
}

.psp-flights__sort-btn:hover {
    border-color: #1A747F !important;
    color: #1A747F !important;
}

/* ─── Pagination — earlier / later ───────────────────────────────── */
.psp-flights__pagination {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 14px 24px !important;
    border: 1.5px solid #878e98 !important;  /* SC 1.4.11 */
    border-radius: 10px !important;
    background: #ffffff !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1A747F !important;
    cursor: pointer !important;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    margin: 10px 0 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07),0 1px 2px rgba(0,0,0,0.04) !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Fix: white text on teal, never invisible */
.psp-flights__pagination:hover {
    background: #1A747F !important;
    border-color: #1A747F !important;
    color: #fff !important;
}

/* Critical fix: :active must also be teal+white, not whatever UA defaults to */
.psp-flights__pagination:active {
    background: #155f69 !important;
    border-color: #155f69 !important;
    color: #fff !important;
}

.psp-flights__pagination:focus          { outline: none !important; }
.psp-flights__pagination:focus-visible  { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #1A747F !important; outline: none !important; }
/* After a click the button keeps :focus — reset so text/bg dont stay white */
.psp-flights__pagination:focus:not(:hover):not(:active) {
    background: #ffffff !important;
    border-color: #e2e5ea !important;
    color: #1A747F !important;
}

.psp-flights__pagination svg { flex-shrink: 0 !important; }
.psp-flights__pagination:hover svg,
.psp-flights__pagination:active svg { color: #fff !important; }

/* ─── Table ────────────────────────────────────────────────────────── */
.psp-flights__table-wrapper { overflow: visible !important; }

.psp-flights__table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 6px !important;  /* vertical gap between card-rows */
    font-size: 14px !important;
    table-layout: fixed !important;
}

/* Column widths */
.psp-flights__table col.col-time     { width: 120px !important; }
.psp-flights__table col.col-airline  { width: 180px !important; }
.psp-flights__table col.col-flight   { width: 105px !important; }
.psp-flights__table col.col-location { width: auto !important; }
.psp-flights__table col.col-status   { width: 235px !important; }
.psp-flights__table col.col-gate     { width: 75px !important; }
.psp-flights__table col.col-expand   { width: 44px !important; }

/* Sticky header — stays visible while scrolling; solid white background so rows don't bleed through */
.psp-flights__table thead {
    /* z-index only — sticky is on th elements for better theme compat */
    position: relative !important;
    z-index: 10 !important;
}

/* Opaque background so rows don't bleed through while scrolling. */
.psp-flights__table thead tr { background: #fff !important; }

.psp-flights__table thead th {
    padding: 6px 16px 10px !important;
    text-align: left !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    /* !important prevents theme stylesheets from re-uppercasing column headers */
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: #4b5563 !important;
    border: none !important;
    background: #fff !important;
    white-space: nowrap !important;
    box-shadow: 0 3px 8px rgba(0,0,0,0.06) !important;
    position: sticky !important;
    top: 32px !important;
    z-index: 10 !important;
}
body:not(.admin-bar) .psp-flights__table thead th { top: 0 !important; }

/* JS sticky clone — floats fixed over table when real header scrolls out of view */
.psp-flights__sticky-clone {
    background: #fff !important;
    box-shadow: 0 3px 8px rgba(0,0,0,0.10) !important;
    border-bottom: 1px solid #f0f2f5 !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
}
.psp-flights__sticky-clone th {
    padding: 6px 16px 10px !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: #4b5563 !important;
    background: #fff !important;
    border: none !important;
    white-space: nowrap !important;
    text-align: left !important;
}

/* Each tbody row = white card with gap via border-spacing */
.psp-flights__row {
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07),0 1px 2px rgba(0,0,0,0.04) !important;
    cursor: pointer !important;
    transition: box-shadow 0.15s, transform 0.1s;
}

.psp-flights__row:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.10),0 2px 4px rgba(0,0,0,0.06) !important;
    transform: translateY(-1px) !important;
    position: relative !important;
    z-index: 1 !important;
}

.psp-flights__row:focus-visible { outline: none !important; box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #1A747F, 0 1px 3px rgba(0,0,0,0.07),0 1px 2px rgba(0,0,0,0.04) !important; }

/* Rounded corners: left side on first td, right side on last td */
.psp-flights__row td:first-child { border-radius: 10px 0 0 10px !important; }
.psp-flights__row td:last-child  { border-radius: 0 10px 10px 0 !important; }

/* When expanded: square off the bottom so detail row attaches flush */
.psp-flights__row--expanded td:first-child { border-radius: 10px 0 0 0 !important; }
.psp-flights__row--expanded td:last-child  { border-radius: 0 10px 0 0 !important; }
.psp-flights__row--expanded { box-shadow: 0 4px 12px rgba(0,0,0,0.10),0 2px 4px rgba(0,0,0,0.06) !important; transform: none !important; }

/* Status accent bar — left border of first cell */
.psp-flights__row td:first-child {
    border-left: 4px solid #e2e5ea !important;
}

.psp-flights__row[data-status="on-time"]   td:first-child,
.psp-flights__row[data-status="arrived"]   td:first-child,
.psp-flights__row[data-status="departed"]  td:first-child,
.psp-flights__row[data-status="in-flight"] td:first-child,
.psp-flights__row[data-status="boarding"]  td:first-child,
.psp-flights__row[data-status="scheduled"] td:first-child { border-left-color: #1A747F !important; }

.psp-flights__row[data-status="delayed"]   td:first-child { border-left-color: #E98056 !important; }
.psp-flights__row[data-status="cancelled"] td:first-child { border-left-color: #9b2c2c !important; }

.psp-flights__table tbody td {
    padding: 14px 16px !important;
    vertical-align: middle !important;
    background: #ffffff !important;
    border-top: 1px solid #f0f2f5 !important;
    border-bottom: 1px solid #f0f2f5 !important;
    border-left: none !important;   /* prevent Elementor/Astra adding column dividers */
    border-right: none !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 14px !important;     /* prevent theme font-size inheritance */
    line-height: 1.4 !important;
    box-shadow: none !important;    /* some themes add inset box-shadow on td */
}

/* First/last td: restore card border edges */
.psp-flights__table tbody td:first-child { border-left: 4px solid #e2e5ea !important; }
.psp-flights__table tbody td:last-child  { border-right: 1px solid #f0f2f5 !important; text-overflow: clip !important; overflow: visible !important; white-space: normal !important; }

/* ─── Detail row — seamlessly attached below parent ──────────────── */
.psp-flights__details-row { display: none !important; }
.psp-flights__details-row.is-visible { display: table-row !important; }

/* Hide via jQuery .toggle() — override display:none when JS shows it */
.psp-flights__details-row[style*="display: table-row"],
.psp-flights__details-row[style*="display:table-row"] { display: table-row !important; }

.psp-flights__details-row td {
    padding: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    /* Seamless: continue the expanded row's shadow, flat top, rounded bottom */
    background: #e8f5f6 !important;
    border-top: none !important;
    border-bottom: 1px solid rgba(26,116,127,0.15) !important;
    border-left: 4px solid #1A747F !important;
    border-right: 1px solid rgba(26,116,127,0.15) !important;
    border-radius: 0 0 10px 10px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.10),0 2px 4px rgba(0,0,0,0.06) !important;
}

/* Delayed flight details — orange tint + accent matches parent row */
tr.psp-flights__details-row[data-status="delayed"] td {
    background: #fff3ed !important;
    border-left-color: #E98056 !important;
    border-bottom-color: rgba(233,128,86,0.2) !important;
    border-right-color: rgba(233,128,86,0.2) !important;
}
/* Cancelled flight details — muted red */
tr.psp-flights__details-row[data-status="cancelled"] td {
    background: #fdf2f2 !important;
    border-left-color: #9b2c2c !important;
    border-bottom-color: rgba(185,50,50,0.15) !important;
    border-right-color: rgba(185,50,50,0.15) !important;
}

.psp-flights__details { padding: 18px 20px 20px 20px !important; }

.psp-flights__details-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
    gap: 16px 24px !important;
}.psp-flights__detail dt,
.psp-flights__detail dd { margin: 0 !important; padding: 0 !important; text-align: left !important; }



.psp-flights__detail { display: flex !important; flex-direction: column !important; gap: 4px !important; }

.psp-flights__detail-label {
    font-family: 'Poppins', sans-serif !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: #4b5563 !important;
    margin-bottom: 2px !important;
}

.psp-flights__detail-value {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1a1f2e !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

/* Scheduled time in delayed dropdown — explicitly Open Sans so Poppins from dt doesn't bleed */
.psp-flights__detail-value--sched {
    font-family: 'Open Sans', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #4b5563 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

/* Weather icon — hard cap so it never renders at full Weatherbit icon size */
.psp-flights__weather-icon {
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0 !important;
    object-fit: contain !important;
}

/* ─── Cell styles ─────────────────────────────────────────────────── */

/* Time — date on top, time below; delayed time in orange */
.psp-flights__cell--time { min-width: 100px !important; }

.psp-flights__date-label {
    font-size: 10px !important;
    color: #4b5563 !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
    margin-bottom: 2px !important;
    display: block !important;
}

.psp-flights__time-display {
    display: flex !important;
    align-items: baseline !important;
    gap: 5px !important;
    flex-wrap: nowrap !important;       /* keep on one line so row height stays uniform */
}

.psp-flights__time {
    font-family: 'Poppins', sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1a1f2e !important;
    letter-spacing: -0.2px !important;
}

.psp-flights__time--delayed { color: #b84a1c !important; }

/* "was 8:29 PM" shown inline in a smaller muted style */
.psp-flights__original-time {
    font-size: 11px !important;
    color: #6b7280 !important;
    white-space: nowrap !important;
}

/* Airline — logo + name, name truncates to keep row height uniform */
.psp-flights__cell--airline { min-width: 140px !important; }

.psp-flights__airline {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
}

.psp-flights__airline-logo {
    width: 24px !important;
    height: 24px !important;
    object-fit: contain !important;
    border-radius: 3px !important;
    flex-shrink: 0 !important;
}

.psp-flights__airline-name {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #1a1f2e !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 130px !important;
}

/* Flight number */
.psp-flights__flight-number {
    font-family: 'Poppins', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    transition: opacity 0.3s;
}

/* Location */
.psp-flights__cell--location {
    font-size: 13px !important;
    color: #1a1f2e !important;
    max-width: 200px !important;
}

/* Gate / baggage */
.psp-flights__gate,
.psp-flights__baggage-num {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    color: #1a1f2e !important;
}

/* ─── Status badges ───────────────────────────────────────────────── */
.psp-flights__cell--status { white-space: nowrap !important; overflow: visible !important; }

.psp-flights__status {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    min-width: 148px !important;
    max-width: 185px !important;
    text-align: center !important;
    box-sizing: border-box !important;
    letter-spacing: 0.1px !important;
    border: none !important;           /* Elementor adds borders to inline-flex elements */
    text-transform: none !important;   /* Astra uppercases some labels */
    text-decoration: none !important;
}

.psp-flights__status svg { flex-shrink: 0 !important; }

.psp-flights__status--on-time,
.psp-flights__status--boarding,
.psp-flights__status--scheduled { background: #e8f5f6 !important; color: #1A747F !important; }

/* Arrived + Departed: neutral PSP Gray — both are completed states */
/* #484D56 on #eeeef0 = 7.4:1 contrast ratio — WCAG AA ✓ */
.psp-flights__status--arrived,
.psp-flights__status--departed { background: #eeeef0 !important; color: #484D56 !important; }

.psp-flights__status--delayed  { background: #fff3ed !important; color: #b84a1c !important; }
.psp-flights__status--cancelled { background: #fdf2f2 !important; color: #9b2c2c !important; }

/* ─── Expand button ───────────────────────────────────────────────── */
.psp-flights__cell--expand { width: 44px !important; text-align: center !important; overflow: visible !important; }

.psp-flights__expand-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 30px !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer !important;
    color: #6b7280 !important;
    border-radius: 6px !important;
    transition: color 0.15s, background 0.15s, transform 0.2s;
    -webkit-tap-highlight-color: transparent !important;
}

.psp-flights__expand-btn:hover { background: #e8f5f6 !important; color: #1A747F !important; }
.psp-flights__expand-btn:active { background: #1A747F !important; color: #fff !important; }
.psp-flights__expand-btn:focus         { outline: none !important; }
.psp-flights__expand-btn:focus-visible { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #1A747F !important; outline: none !important; }
.psp-flights__expand-btn[aria-expanded="true"] { transform: rotate(180deg) !important; color: #1A747F !important; }

/* ─── Day dividers ────────────────────────────────────────────────── */
─── Tomorrow divider ──────────────────────────────────────
   Visually unmissable break between today and tomorrow.
   Transparent row (not a white card) so it reads as a
   section header, not another flight row. Orange label
   and top border rule signal the day change clearly.
   ──────────────────────────────────────────────────────── */
.psp-flights__day-divider-row td {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-left: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    white-space: normal !important;
    padding-top: 28px !important;
    padding-bottom: 8px !important;
}

.psp-flights__day-divider-inner {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    background: #ffffff !important;
    border-radius: 10px !important;
    padding: 12px 18px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07),0 1px 2px rgba(0,0,0,0.04) !important;
    border-left: 4px solid #1A747F !important;
    border-top: none !important;
    margin: 0 !important;
}

.psp-flights__day-divider-icon {
    font-size: 16px !important;
    line-height: 1 !important;
}

/* "Tomorrow" — orange, large, impossible to miss */
.psp-flights__day-divider-label {
    font-family: 'Poppins', sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: #1A747F !important;
}

.psp-flights__day-divider-date {
    font-family: 'Open Sans', sans-serif !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #4b5563 !important;
    margin-left: 2px !important;
}

/* ─── Panel visibility ────────────────────────────────────────────── */
.psp-flights__panel { display: none !important; }
.psp-flights__panel--active { display: block !important; }

/* ─── Empty state ─────────────────────────────────────────────────── */
.psp-flights__empty {
    text-align: center !important;
    padding: 60px 20px !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07),0 1px 2px rgba(0,0,0,0.04) !important;
}

.psp-flights__empty h3 {
    font-family: 'Poppins', sans-serif !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    color: #1a1f2e !important;
    margin: 0 0 8px !important;
}

.psp-flights__empty p { color: #6b7280 !important; margin: 0 !important; }

/* ─── Mobile cards ────────────────────────────────────────────────── */
.psp-flights__cards { display: none !important; }

.psp-flights__card {
    background: #ffffff !important;
    border-radius: 12px !important;
    margin-bottom: 8px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07),0 1px 2px rgba(0,0,0,0.04) !important;
    overflow: hidden !important;
    transition: box-shadow 0.15s;
    border-left: 4px solid #e2e5ea !important;
}

.psp-flights__card[data-status="on-time"],
.psp-flights__card[data-status="arrived"],
.psp-flights__card[data-status="departed"],
.psp-flights__card[data-status="in-flight"],
.psp-flights__card[data-status="boarding"]  { border-left-color: #1A747F !important; }
.psp-flights__card[data-status="delayed"]   { border-left-color: #E98056 !important; }
.psp-flights__card[data-status="cancelled"] { border-left-color: #9b2c2c !important; }

.psp-flights__card-header {
    display: block !important;
    width: 100% !important;
    padding: 16px !important;
    border: none !important;
    background: none !important;
    text-align: left !important;
    cursor: pointer !important;
    color: inherit !important;
    -webkit-tap-highlight-color: transparent !important;
}

.psp-flights__card-header:hover   { background: none !important; background-color: transparent !important; color: inherit !important; }
.psp-flights__card-header:active  { background: rgba(0,0,0,0.02) !important; background-color: rgba(0,0,0,0.02) !important; color: inherit !important; }
.psp-flights__card-header:focus   { outline: none !important; background: none !important; }
.psp-flights__card-header:focus-visible { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #1A747F inset !important; outline: none !important; }

/* Prevent Elementor blue background on card tap (mobile) */
.psp-flights__card:active,
.psp-flights__card:hover { background: #ffffff !important; background-color: #ffffff !important; }

.psp-flights__card-top       { display: flex !important; justify-content: space-between !important; align-items: center !important; margin-bottom: 12px !important; }
.psp-flights__card-airline   { display: flex !important; align-items: center !important; gap: 8px !important; }
.psp-flights__card-main      { margin-bottom: 12px !important; }
.psp-flights__card-flight    { margin-bottom: 4px !important; }
.psp-flights__direction-arrow { display: none !important; }

.psp-flights__card-destination { display: flex !important; align-items: baseline !important; gap: 8px !important; }

.psp-flights__destination-code {
    font-family: 'Poppins', sans-serif !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    color: #1A747F !important;
    letter-spacing: 1px !important;
}

.psp-flights__destination-city { font-size: 14px !important; color: #4b5563 !important; }

.psp-flights__card-bottom { display: flex !important; justify-content: space-between !important; align-items: flex-end !important; }
.psp-flights__card-gate   { text-align: right !important; }

.psp-flights__label {
    display: block !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #6b7280 !important;
    margin-bottom: 2px !important;
}

.psp-flights__card-expand {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding-top: 12px !important;
    margin-top: 10px !important;
    border-top: 1px solid #f0f2f5 !important;
    font-size: 12px !important;
    color: #1A747F !important;
    font-weight: 500 !important;
}

.psp-flights__expand-icon { transition: transform 0.2s; }
.psp-flights__card-header[aria-expanded="true"] .psp-flights__expand-icon { transform: rotate(180deg) !important; }

.psp-flights__card-details {
    padding: 0 16px 16px !important;
    background: #e8f5f6 !important; /* default teal tint */
}

/* Status-aware card detail backgrounds (mobile) */
.psp-flights__card[data-status="delayed"] .psp-flights__card-details {
    background: #fff3ed !important;
}
.psp-flights__card[data-status="cancelled"] .psp-flights__card-details {
    background: #fdf2f2 !important;
}

.psp-flights__day-divider-card { padding: 18px 0 4px !important; background: transparent !important; margin: 0 !important; }

/* ─── Responsive: cards at 900px ─────────────────────────────────── */
@media (max-width: 900px) {
    .psp-flights__table-wrapper { display: none !important; }
    .psp-flights__cards { display: block !important; }
    .psp-flights__day-filter-btn { flex: 1 !important; }
    /* Hide desktop button groups — replaced by native selects on mobile */
    .psp-flights__day-filter  { display: none !important; }
    .psp-flights__sort-toggle { display: none !important; }
}

/* On desktop: row wrappers are transparent to layout (display:contents),
   so all controls sit inline in the parent flex row as before.
   Row 2 (mobile selects) is also hidden. */
.psp-flights__filter-row   { display: contents !important; }
.psp-flights__filter-row--2 { display: none !important; }

/* ─── Mobile: 600px ───────────────────────────────────────────────── */
@media (max-width: 600px) {
    .psp-flights { padding: 0 0 20px !important; }

    .psp-flights__tabs {
        position: sticky !important;
        top: 0 !important;
        z-index: 100 !important;
        border-radius: 0 !important;
        margin-bottom: 12px !important;
    }

    .psp-flights__tab { flex: 1 !important; text-align: center !important; font-size: 15px !important; padding: 12px 0 !important; }

    /* ── Mobile filters: 3 explicit rows ────────────────────────────
       Row 1: Search — full width
       Row 2: All Airlines — full width  (mobile-only select)
       Row 3: All Days (50%) | Sort: Time/City (50%)
       Desktop: row divs use display:contents so all controls stay inline.
    ─────────────────────────────────────────────────────────────── */
    .psp-flights__filters {
        padding: 10px 12px !important;
        border-radius: 0 !important;
        gap: 8px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Each row is a full-width flex container */
    .psp-flights__filter-row {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        width: 100% !important;
    }

    /* Row 1: search full width, hide the desktop airline-wrap */
    .psp-flights__filter-row--1 .psp-flights__search {
        flex: 1 1 100% !important;
        min-width: 0 !important;
    }
    .psp-flights__filter-row--1 .psp-flights__airline-wrap { display: none !important; }

    /* Row 2: airline select full width */
    .psp-flights__filter-row--2 { display: flex !important; }
    .psp-flights__filter-row--2 .psp-flights__mobile-select {
        flex: 1 1 100% !important;
    }

    /* Row 3: days + sort each take equal half */
    .psp-flights__filter-row--3 { display: flex !important; }
    .psp-flights__filter-row--3 .psp-flights__mobile-select {
        flex: 1 1 0 !important;
    }

    /* ── Shared styles: all inputs and selects ───────────────────── */
    .psp-flights__search-input,
    .psp-flights__mobile-select {
        height: 40px !important;
        font-size: 16px !important; /* ≥16px prevents iOS auto-zoom */
        font-family: inherit !important;
        color: #1a1f2e !important;
        background-color: #fafbfc !important;
        border: 1.5px solid #878e98 !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }

    /* Selects: custom chevron arrow */
    .psp-flights__mobile-select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2 4l4 4 4-4z'/%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: right 10px center !important;
        padding: 0 28px 0 10px !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        cursor: pointer !important;
    }

    /* Show mobile-only selects */
    .psp-flights__mobile-select { display: block !important; }

    .psp-flights__mobile-select:focus,
    .psp-flights__search-input:focus {
        outline: none !important;
        border-color: #1A747F !important;
        box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #1A747F !important;
    }

    .psp-flights__card { border-radius: 10px !important; }
    .psp-flights__card-header { padding: 14px !important; }
    .psp-flights__destination-code { font-size: 22px !important; }
    .psp-flights__destination-city { font-size: 13px !important; max-width: 120px !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
    .psp-flights__card-flight .psp-flights__flight-number { font-size: 12px !important; color: #4b5563 !important; }
    .psp-flights__direction-arrow { display: inline !important; font-size: 12px !important; color: #6b7280 !important; }
    .psp-flights__card-main { display: flex !important; align-items: baseline !important; gap: 8px !important; margin-bottom: 10px !important; }
    .psp-flights__card-flight { flex-shrink: 0 !important; margin-bottom: 0 !important; }
    .psp-flights__status { min-width: 130px !important; font-size: 11px !important; padding: 4px 8px !important; }
    .psp-flights__pagination { padding: 13px 18px !important; font-size: 13px !important; }
    .psp-flights__details-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
    .psp-flights__expand-text { display: none !important; }
}
