/* Live flight card. The extra class isolates it from the legacy map panel rules. */
#map .map-info-box.tfv-flight-card {
    --flight-ink: #172b3d;
    --flight-muted: #718292;
    --flight-line: #e7edf2;
    --flight-accent: #c7192b;
    position: absolute;
    z-index: 1100;
    top: 12px;
    right: auto;
    bottom: auto !important;
    left: 12px;
    width: 348px;
    max-width: calc(100% - 24px);
    height: auto !important;
    min-height: 0 !important;
    max-height: none;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible;
    background: #fff !important;
    border: 1px solid rgba(20, 45, 65, .12) !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 35px rgba(12, 33, 50, .24);
    color: var(--flight-ink);
    font-family: inherit;
    line-height: 1.4;
    text-align: left;
}

#map .map-info-box.tfv-flight-card > div,
#map .map-info-box.tfv-flight-card > header {
    max-width: none !important;
    margin: 0;
    padding: 0 !important;
}

#map .tfv-flight-card,
#map .tfv-flight-card * { box-sizing: border-box; }

#map .map-info-box.tfv-flight-card.map-info-box--dismissed { display: none !important; }

#map .map-info-box.tfv-flight-card .map-info-close {
    position: absolute;
    z-index: 5;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(20, 45, 65, .12);
    border-radius: 50%;
    box-shadow: 0 2px 7px rgba(20, 45, 65, .08);
    color: #304a5e;
    font-family: Arial, sans-serif;
    font-size: 23px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transform: none;
}

#map .map-info-box.tfv-flight-card .map-info-close:hover {
    background: #fff;
    color: var(--flight-accent);
    transform: none;
}

#map .tfv-flight-card a:focus-visible,
#map .tfv-flight-card button:focus-visible {
    outline: 2px solid #176aab;
    outline-offset: 3px;
}

#map .tfv-flight-card .tfv-flight-card__hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #edf4f9;
    border-bottom: 1px solid var(--flight-line);
    border-radius: 13px 13px 0 0;
}

#map .tfv-flight-card .tfv-flight-card__aircraft-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    object-fit: cover;
    object-position: center 40%;
}

#map .tfv-flight-card .tfv-flight-card__live {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: rgba(255, 255, 255, .95);
    border: 1px solid rgba(20, 45, 65, .07);
    border-radius: 5px;
    color: #365066;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .025em;
    line-height: 1;
}

#map .tfv-flight-card .tfv-flight-card__live > span {
    width: 5px;
    height: 5px;
    background: #16a378;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(22, 163, 120, .12);
}

#map .tfv-flight-card .tfv-flight-card__hero--empty {
    flex-direction: column;
    gap: 9px;
    background: linear-gradient(150deg, #f2f7fa, #deebf3);
}

#map .tfv-flight-card .tfv-flight-card__hero--empty > i,
#map .tfv-flight-card .tfv-flight-card__image-error > i {
    color: #92b0c4;
    font-size: 46px;
}

#map .tfv-flight-card .tfv-flight-card__empty-model,
#map .tfv-flight-card .tfv-flight-card__image-error > span {
    max-width: 85%;
    color: #567084;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

#map .tfv-flight-card .tfv-flight-card__image-error { display: none; }
#map .tfv-flight-card .tfv-flight-card__hero.has-image-error .tfv-flight-card__aircraft-image { display: none; }
#map .tfv-flight-card .tfv-flight-card__hero.has-image-error .tfv-flight-card__image-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    height: 100%;
}

#map .map-info-box.tfv-flight-card > .tfv-flight-card__identity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px !important;
    border-bottom: 1px solid var(--flight-line);
    background: #fff;
}

#map .tfv-flight-card .tfv-flight-card__flight { min-width: 0; }
#map .tfv-flight-card .tfv-flight-card__airline {
    display: block;
    color: var(--flight-muted);
    font-size: 10px;
    font-weight: 500;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

#map .tfv-flight-card .tfv-flight-card__ident {
    margin: 3px 0 0;
    color: var(--flight-ink);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

#map .tfv-flight-card .tfv-flight-card__airline-logo {
    flex: 0 0 auto;
    width: 76px;
    height: 30px;
    max-width: 76px;
    max-height: 38px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    object-fit: contain;
}

#map .map-info-box.tfv-flight-card > .tfv-flight-card__body { padding: 12px 14px 14px !important; }

#map .tfv-flight-card .tfv-flight-card__route {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
    align-items: start;
    gap: 3px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--flight-line);
}

#map .tfv-flight-card .tfv-flight-card__airport { min-width: 0; }
#map .tfv-flight-card .tfv-flight-card__airport--arrival { text-align: right; }
#map .tfv-flight-card .tfv-flight-card__label {
    display: block;
    color: var(--flight-muted);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .065em;
    line-height: 1.3;
    text-transform: uppercase;
}

#map .tfv-flight-card .tfv-flight-card__airport-code {
    display: block;
    margin-top: 2px;
    color: var(--flight-ink);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1.2;
    text-decoration: none;
}

#map .tfv-flight-card .tfv-flight-card__airport-code:hover { color: var(--flight-accent); }
#map .tfv-flight-card .tfv-flight-card__airport-name {
    display: block;
    min-height: 0;
    margin-top: 2px;
    color: #71808d;
    font-size: 9px;
    font-weight: 400;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

#map .tfv-flight-card .tfv-flight-card__time {
    display: block;
    margin-top: 3px;
    color: #334d62;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
}

#map .tfv-flight-card .tfv-flight-card__route-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 18px;
    margin-top: 19px;
    color: var(--flight-accent);
    font-size: 14px;
}

#map .tfv-flight-card .tfv-flight-card__progress {
    --flight-progress: 0%;
    padding: 17px 0 11px;
    border-bottom: 1px solid var(--flight-line);
}

#map .tfv-flight-card .tfv-flight-card__progress-track {
    position: relative;
    height: 4px;
    margin: 0 10px;
    background: #dce3e9;
    border-radius: 4px;
}

#map .tfv-flight-card .tfv-flight-card__progress-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--flight-progress);
    background: var(--flight-accent);
    border-radius: inherit;
    transition: width 1.2s ease;
}

#map .tfv-flight-card .tfv-flight-card__progress-plane {
    position: absolute;
    top: 50%;
    left: var(--flight-progress);
    width: 22px;
    height: 22px;
    color: #526577;
    transform: translate(-50%, -50%);
    transition: left 1.2s ease;
}

#map .tfv-flight-card .tfv-flight-card__progress-summary {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 10px;
    color: #63788a;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
}

#map .tfv-flight-card .tfv-flight-card__progress-summary > span { white-space: nowrap; }
#map .tfv-flight-card .tfv-flight-card__progress-summary > span:last-child { margin-left: auto; text-align: right; }
#map .tfv-flight-card .tfv-flight-card__progress[data-state="unavailable"] .tfv-flight-card__progress-plane { visibility: hidden; }
#map .tfv-flight-card .tfv-flight-card__progress[data-reset] .tfv-flight-card__progress-fill,
#map .tfv-flight-card .tfv-flight-card__progress[data-reset] .tfv-flight-card__progress-plane { transition: none; }

@media (prefers-reduced-motion: reduce) {
    #map .tfv-flight-card .tfv-flight-card__progress-fill,
    #map .tfv-flight-card .tfv-flight-card__progress-plane { transition: none; }
}

#map .tfv-flight-card .tfv-flight-card__details {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 8px 12px;
    margin: 11px 0;
    padding: 0;
}

#map .tfv-flight-card .tfv-flight-card__detail { min-width: 0; }
#map .tfv-flight-card .tfv-flight-card__detail--pilot { grid-column: 1 / -1; display: flex; gap: 6px; align-items: baseline; }
#map .tfv-flight-card .tfv-flight-card__detail--pilot dd { margin-top: 0; }
#map .tfv-flight-card .tfv-flight-card__details dt,
#map .tfv-flight-card .tfv-flight-card__telemetry dt {
    margin: 0;
    padding: 0;
    color: var(--flight-muted);
    font-size: 9px;
    font-weight: 500;
    line-height: 1.35;
}

#map .tfv-flight-card .tfv-flight-card__details dd {
    margin: 3px 0 0;
    padding: 0;
    color: #283f52;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

#map .tfv-flight-card .tfv-flight-card__pilot-ident {
    margin-right: 5px;
    color: #436980;
    font-weight: 700;
}

#map .tfv-flight-card .tfv-flight-card__telemetry {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    padding: 1px;
    overflow: hidden;
    background: var(--flight-line);
    border: 1px solid var(--flight-line);
    border-radius: 8px;
}

#map .tfv-flight-card .tfv-flight-card__metric {
    min-width: 0;
    padding: 9px 8px;
    background: #f8fafc;
}

#map .tfv-flight-card .tfv-flight-card__metric dd {
    margin: 2px 0 0;
    padding: 0;
    color: #203b50;
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

#map .tfv-flight-card .tfv-flight-card__metric dd small {
    color: #81909d;
    font-size: 9px;
    font-weight: 500;
}

#map .tfv-flight-card .tfv-flight-card__metric--distance { grid-column: span 2; }
#map .tfv-flight-card .tfv-flight-card__metric--distance dd { font-size: 13px; }
#map .tfv-flight-card .tfv-flight-card__divider { padding: 0 4px; color: #a0acb6; font-weight: 400; }
#map .tfv-flight-card .tfv-flight-card__premium {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #9c6e30;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

#map .tfv-flight-card .tfv-flight-card__premium i { font-size: 9px; }
#map .tfv-flight-card .tfv-flight-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 11px;
}

#map .tfv-flight-card .tfv-flight-card__status { min-width: 0; }
#map .tfv-flight-card .tfv-flight-card__status .tfv-flight-card__label { font-size: 8px; }
#map .tfv-flight-card .tfv-flight-card__status strong {
    display: block;
    margin-top: 3px;
    color: #334f64;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

#map .tfv-flight-card .tfv-flight-card__report {
    flex-shrink: 0;
    color: var(--flight-accent);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}

#map .tfv-flight-card .tfv-flight-card__report:hover { text-decoration: underline; }
#map .tfv-flight-card .tfv-flight-card__report > span { padding-left: 2px; }

@media (max-width: 575.98px) {
    #map .map-info-box.tfv-flight-card {
        top: 8px;
        left: 8px;
        width: 304px;
        max-width: calc(100% - 16px);
        max-height: none;
        padding: 0 !important;
        border-radius: 11px !important;
    }

    #map .tfv-flight-card .tfv-flight-card__hero { border-radius: 10px 10px 0 0; }
    #map .map-info-box.tfv-flight-card > .tfv-flight-card__identity { padding: 12px !important; }
    #map .map-info-box.tfv-flight-card > .tfv-flight-card__body { padding: 12px 12px 14px !important; }
}
