/**
 * Transport Live — TL-P3 telemetry status styles.
 *
 * Visuals for the overlay status line injected by transport-live-telemetry.js.
 * Scoped under .sris-tl-status* so it never touches TL-P2 or legacy styles.
 *
 * Two states only — green "Live" or grey "Last active {X}". No red. No
 * negative-state colors anywhere (drivers are humans, not shops).
 */

.sris-tl-status {
    margin: 0;
    font-size: 13px;
    line-height: 1.3;
}

/* Visitor visibility: a card whose place_id is absent from drivers_public.json
   is hidden entirely (added by transport-live-telemetry.js for non-admins only).
   Separate from the TL-P2 category filter's [hidden] attribute, so a card is
   shown only when it has neither. !important guards against the card's own
   display rule. */
.sris-tl-card.sris-tl-no-telemetry {
    display: none !important;
}

/* 🟢 Live — calm green, never red. */
.sris-tl-status-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #1a7f37;
}

.sris-tl-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #2bbf4a;
    display: inline-block;
    flex: 0 0 auto;
}

/* Last active {X} — soft, muted, no badge. */
.sris-tl-status-last {
    color: #6c757d;
}

/* ── Admin-only debug overlay (manage_options) ───────────────────────────
   Injected only for admins by transport-live-telemetry.js; visitors never
   receive this DOM, so these rules never match for them. Scoped under
   .sris-tl-debug so it can't touch TL-P2, the status line, or legacy styles. */
.sris-tl-debug {
    margin-top: 10px;
    border-top: 1px dashed #ccd2d8;
    padding-top: 8px;
    font-size: 12px;
    color: #495057;
}

.sris-tl-debug > summary {
    cursor: pointer;
    font-weight: 600;
    color: #6c757d;
}

.sris-tl-debug-body {
    margin-top: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    line-height: 1.45;
    word-break: break-word;
}

.sris-tl-debug-row {
    display: flex;
    gap: 8px;
}

.sris-tl-debug-key {
    flex: 0 0 132px;
    color: #868e96;
}

.sris-tl-debug-val {
    flex: 1 1 auto;
}

.sris-tl-debug-history {
    margin-top: 2px;
    padding-left: 8px;
    border-left: 2px solid #e9ecef;
}

/* Reason text — rendered verbatim from drivers_debug.json with line breaks
   preserved (white-space: pre-wrap), monospace, so the on-screen reason matches
   the file exactly. Admin debug panel only. */
.sris-tl-debug-explain {
    margin: 4px 0 8px;
    padding: 6px 8px;
    background: #f6f8fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11.5px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.sris-tl-debug-maprow {
    margin-top: 4px;
}

/* Small outline "MAP" button (admin debug panel only — never shown to visitors). */
.sris-tl-debug-map {
    display: inline-block;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    color: #0c7c91;
    text-decoration: none;
    border: 1px solid #17a2b8;
    border-radius: 4px;
}

.sris-tl-debug-map:hover,
.sris-tl-debug-map:focus {
    background: #17a2b8;
    color: #fff;
}

.sris-tl-debug-hint {
    margin-top: 6px;
    color: #868e96;
    font-style: italic;
}
