/* The admin console's live updates (admin-live.js, docs/ADMIN_LIVE.md):
   the Live indicator, a changed row or value flashing, the Refresh button
   with its "Updated" time, and the live bits pages add (campaign cards,
   Overview alerts, the carrier strip, the running SIP capture). */

/* Live indicator: the same look as the Leads page's (.ll-ind). */
.lv-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; padding: 3px 10px;
  border-radius: var(--pill); background: var(--pause-soft); color: var(--pause-text); white-space: nowrap; }
.lv-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.lv-badge[data-state="live"] { background: var(--ok-soft); color: var(--ok-text); }
.lv-badge[data-state="live"]::before { background: var(--ok); animation: ll-pulse 1.6s ease-in-out infinite; }
.lv-badge[data-state="error"] { background: var(--warn-soft); color: var(--warn-text); }
.lv-badge[hidden] { display: none; }
.page-actions .lv-badge { align-self: center; }

/* A row, tile or value that changed. */
tr.lv-flash > td, .lv-flash:not(tr) { animation: lv-flash 1.2s ease-out; }
@keyframes lv-flash { 0% { background: var(--accent-soft); } 100% { } }

/* Refresh on demand. */
.lv-refresh-box { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lv-updated { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Campaigns: the card's live line. */
.camp-live { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--muted); font-weight: 700; }
.camp-live b { color: var(--text); font-variant-numeric: tabular-nums; font-family: var(--mono); font-weight: 700; }
.camp-live .camp-live-today { flex-basis: 100%; }

/* Overview: active alerts. */
.ov-alerts .ov-list { margin: 0; }
.ov-alert-sev { flex: none; }

/* Lead drawer: the lead's call now. */
.le-live { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; margin: 0 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2); }
.le-live[data-ll] { box-shadow: inset 4px 0 0 var(--c, var(--pause)); }
.le-live .le-live-text { font-weight: 800; }
.le-live[hidden] { display: none; }

/* Carrier failures: the last 15 minutes. */
.cf-recent { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; }
.cf-recent .cf-recent-k { font-size: 13px; color: var(--muted); font-weight: 700; }
.cf-recent .cf-recent-v { font-family: var(--mono); font-size: 18px; font-variant-numeric: tabular-nums; }
.cf-recent-codes { display: flex; gap: 6px; flex-wrap: wrap; }

/* Diagnostics: the running capture's messages. */
.diag-live-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; }

@media (prefers-reduced-motion: reduce) {
  .lv-badge::before, tr.lv-flash > td, .lv-flash { animation: none !important; }
}
