/* AirportMap ops panel (Component/AirportMapOpsPanel.razor): tabs inside the live page's left panel */

.amo {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
}

.amo.is-open {
    flex: 0 1 auto;
}

.amo-tabs {
    display: flex;
    gap: 2px;
    padding: 2px;
    border-radius: 8px;
    background: #f1f5f9;
}

.amo-tab {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    padding: 5px 2px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--am-muted, #64748b);
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.amo-tab:hover {
    color: var(--am-text, #0f172a);
}

.amo-tab.is-on {
    background: var(--am-surface, #fff);
    color: var(--am-primary, #1E429A);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.amo-tab:focus-visible,
.amo-item:focus-visible,
.amo-btn:focus-visible,
.amo-link:focus-visible,
.amo-alert-main:focus-visible,
.amo-rwy-busy:focus-visible {
    outline: 2px solid var(--am-primary, #1E429A);
    outline-offset: 1px;
}

.amo-badge {
    display: inline-block;
    min-width: 16px;
    margin-left: 2px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--am-emg, #dc2626);
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
}

.amo-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 42vh;
    margin: 0 -6px;
    padding: 0 6px 2px;
    overflow-y: auto;
}

.amo-advisory {
    padding: 4px 8px;
    border-radius: 6px;
    background: #fffbeb;
    color: #92400e;
    font-size: 11px;
}

.amo-advisory--replay {
    background: #ede9fe;
    color: #5b21b6;
}

.amo-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 2px;
    color: var(--am-text, #0f172a);
    font-size: 12px;
    font-weight: 600;
}

.amo-head b {
    margin-left: 4px;
    color: var(--am-muted, #64748b);
}

.amo-hint {
    color: var(--am-faint, #94a3b8);
    font-size: 11px;
    font-weight: 500;
    text-align: right;
}

.amo-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.amo-sound {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--am-muted, #64748b);
    font-size: 11px;
    font-weight: 500;
}

.amo-empty,
.amo-foot {
    padding: 6px 2px;
    color: var(--am-muted, #64748b);
    font-size: 12px;
}

.amo-foot {
    font-size: 11px;
}

.amo-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.amo-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 8px;
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--am-border, #e2e8f0);
    border-left: 3px solid var(--am-arr, #1E429A);
    border-radius: 8px;
    background: var(--am-surface, #fff);
    color: var(--am-text, #0f172a);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.amo-item:hover {
    border-color: var(--am-border-strong, #cbd5e1);
    background: var(--am-primary-soft, #eef2fb);
}

.amo-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 6px;
    min-width: 0;
}

.amo-main small,
.amo-meta {
    color: var(--am-muted, #64748b);
    font-size: 11px;
}

.amo-eta {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.amo-meta {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 10px;
}

.amo-gap {
    color: var(--am-text, #0f172a);
}

.amo-chip {
    padding: 0 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
}

.amo-chip--warn { background: #fef3c7; color: #92400e; }
.amo-chip--bad { background: #fee2e2; color: #b91c1c; }

.amo-taxi { border-left-color: var(--am-gnd, #475569); }
.amo-taxi--warn { border-left-color: var(--am-warn, #d97706); background: #fffbeb; }
.amo-taxi--over { border-left-color: var(--am-emg, #dc2626); background: #fef2f2; }

.amo-rwy-use {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: 12px;
}

.amo-rwy-use small {
    color: var(--am-muted, #64748b);
    font-size: 10px;
    font-weight: 600;
}

.amo-weather {
    color: var(--am-faint, #94a3b8);
    font-size: 11px;
}

.amo-rwy-free {
    padding: 6px 8px;
    border-radius: 8px;
    background: #ecfdf5;
    color: var(--am-ok, #059669);
    font-size: 12px;
}

.amo-rwy-busy {
    width: 100%;
    padding: 6px 8px;
    border: 0;
    border-radius: 8px;
    background: #fee2e2;
    color: #991b1b;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: left;
    cursor: pointer;
}

.amo-rwy-busy small {
    font-weight: 500;
}

.amo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.amo-table th {
    position: sticky;
    top: 0;
    padding: 4px;
    background: var(--am-surface, #fff);
    color: var(--am-muted, #64748b);
    font-size: 10px;
    font-weight: 600;
    text-align: left;
    text-transform: uppercase;
}

.amo-table td {
    padding: 4px;
    border-top: 1px solid var(--am-border, #e2e8f0);
    vertical-align: top;
}

.amo-table small,
.amo-faint {
    color: var(--am-faint, #94a3b8);
}

.amo-stand--mismatch td:first-child { box-shadow: inset 3px 0 0 var(--am-warn, #d97706); }
.amo-stand--conflict td:first-child { box-shadow: inset 3px 0 0 var(--am-emg, #dc2626); }
.amo-stand--expected td:first-child { box-shadow: inset 3px 0 0 var(--am-arr, #1E429A); }
.amo-stand--occupied td:first-child { box-shadow: inset 3px 0 0 var(--am-gnd, #475569); }
.amo-stand--focus td { background: rgba(0, 179, 138, 0.14); }
.amo-stand--focus td:first-child b { color: var(--am-accent, #00b38a); }

.amo-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--am-primary, #1E429A);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.amo-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 8px;
    border: 1px solid var(--am-border, #e2e8f0);
    border-left: 3px solid var(--am-faint, #94a3b8);
    border-radius: 8px;
    background: var(--am-surface, #fff);
}

.amo-alert > i {
    margin-top: 2px;
}

.amo-alert--high { border-left-color: var(--am-emg, #dc2626); background: #fef2f2; }
.amo-alert--high > i { color: var(--am-emg, #dc2626); }
.amo-alert--med { border-left-color: var(--am-warn, #d97706); }
.amo-alert--med > i { color: var(--am-warn, #d97706); }
.amo-alert--low > i { color: var(--am-muted, #64748b); }

.amo-alert.is-acked {
    opacity: 0.6;
    background: var(--am-surface, #fff);
}

.amo-alert.is-resolved {
    opacity: 0.55;
    background: var(--am-surface, #fff);
    border-left-style: dashed;
}

.amo-arrivals.is-held {
    outline: 1px dashed var(--am-border, #cbd5e1);
    outline-offset: 2px;
}

.amo-alert-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--am-text, #0f172a);
    font: inherit;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}

.amo-alert-main small {
    color: var(--am-muted, #64748b);
    font-size: 11px;
}

.amo-alert-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    color: var(--am-faint, #94a3b8);
    font-variant-numeric: tabular-nums;
}

.amo-btn {
    padding: 2px 8px;
    border: 1px solid var(--am-border-strong, #cbd5e1);
    border-radius: 6px;
    background: var(--am-surface, #fff);
    color: var(--am-text, #0f172a);
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.amo-btn:hover {
    border-color: var(--am-primary, #1E429A);
    color: var(--am-primary, #1E429A);
}

.amo-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.amo-kpi {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    border: 1px solid var(--am-border, #e2e8f0);
    border-radius: 8px;
}

.amo-kpi small {
    color: var(--am-muted, #64748b);
    font-size: 10px;
}

.amo-kpi b {
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

/* a phone: the ops view takes the panel's room instead of the aircraft list */
@media (max-width: 768px) {
    .am-panel:has(.amo.is-open) > :is(.am-chips, .am-airlines, .am-search, .am-toggles, .am-list-head, .am-list) {
        display: none;
    }

    .amo-body {
        max-height: calc(44vh - 150px);
    }

    .amo-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
