/* Status page — uses the global design tokens from /assets/css/styles.css */

.status-wrap { max-width: 860px; }
.status-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.status-head .section-title { margin-bottom: 0; }
.status-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── banner ─────────────────────────────────────────────── */
.status-banner {
  --c: var(--text-light);
  --c-bg: var(--bg-subtle);
  --c-border: var(--border);
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px; margin-bottom: 20px;
  background: var(--c-bg); border: 1px solid var(--c-border); border-left: 4px solid var(--c);
  border-radius: var(--radius-lg);
}
.status-banner[data-state="operational"] { --c: var(--green); --c-bg: var(--green-bg); --c-border: var(--green-border); }
.status-banner[data-state="degraded"],
.status-banner[data-state="partial"]     { --c: var(--amber); --c-bg: var(--amber-bg); --c-border: var(--amber-border); }
.status-banner[data-state="outage"]      { --c: var(--red);   --c-bg: var(--red-bg);   --c-border: var(--red-border); }
.status-banner[data-state="maintenance"] { --c: var(--accent); --c-bg: var(--accent-light); --c-border: var(--accent-border); }

.status-dot { position: relative; width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.status-dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--c); opacity: 0; }
.status-banner[data-state="operational"] .status-dot::after { animation: tz-pulse 2.6s ease-out infinite; }
@keyframes tz-pulse { 0% { transform: scale(.6); opacity: .55; } 70%, 100% { transform: scale(1.5); opacity: 0; } }

.status-banner-text { flex: 1; min-width: 0; }
.status-banner-title { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 700; letter-spacing: -.015em; color: var(--text); }
.status-banner-sub { font-size: .875rem; color: var(--text-muted); margin-top: 2px; }
.status-banner-sub:empty { display: none; }
.status-updated { font-family: var(--mono); font-size: .75rem; color: var(--text-muted); text-align: right; white-space: nowrap; }
.status-updated:empty { display: none; }
.status-note { font-size: .875rem; color: var(--text-muted); margin-bottom: 20px; }

/* ── active notices ─────────────────────────────────────── */
.notice { border: 1px solid var(--border); border-left: 4px solid var(--amber); border-radius: var(--radius-lg); background: var(--bg-subtle); padding: 16px 20px; margin-bottom: 14px; }
.notice.is-major { border-left-color: var(--red); }
.notice.is-maint { border-left-color: var(--accent); }
.notice-title { font-weight: 700; font-size: .9375rem; color: var(--text); margin-bottom: 4px; }
.notice-body { font-size: .875rem; color: var(--text-muted); line-height: 1.6; }
.notice-meta { font-family: var(--mono); font-size: .75rem; color: var(--text-light); margin-top: 8px; }

/* ── metrics ────────────────────────────────────────────── */
.status-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 8px; }
.status-metrics[hidden] { display: none; }
.metric { position: relative; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; overflow: hidden; }
.metric-label { font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-light); }
.metric-value { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; color: var(--text); margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.metric-sub { font-size: .75rem; color: var(--text-muted); }
.spark { position: absolute; right: 16px; top: 34px; width: 40%; height: 26px; opacity: .9; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-area { fill: var(--accent-light); stroke: none; }

/* ── services card ──────────────────────────────────────── */
.status-h2 { font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; letter-spacing: -.015em; margin: 36px 0 12px; color: var(--text); }
.status-card { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.status-skeleton { height: 220px; background: linear-gradient(90deg, transparent, var(--bg-muted), transparent); background-size: 220% 100%; animation: tz-shimmer 1.6s linear infinite; }
@keyframes tz-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

.svc { padding: 18px 22px 16px; border-top: 1px solid var(--border); }
.svc:first-child { border-top: 0; }
.svc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.svc-name { font-weight: 600; font-size: .9375rem; color: var(--text); }
.svc-desc { display: block; font-weight: 400; font-size: .75rem; color: var(--text-light); margin-top: 1px; }
.svc-right { display: flex; align-items: center; gap: 12px; }
.svc-pct { font-family: var(--mono); font-size: .75rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.pill { --c: var(--green); display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); background: color-mix(in srgb, var(--c) 10%, transparent); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.pill[data-state="degraded"], .pill[data-state="partial"] { --c: var(--amber); }
.pill[data-state="outage"] { --c: var(--red); }
.pill[data-state="maintenance"] { --c: var(--accent); }
.pill[data-state="unknown"] { --c: var(--text-light); }

.bars { display: flex; gap: 2px; height: 34px; }
.bar { flex: 1 1 0; min-width: 0; border-radius: 3px; background: var(--green); opacity: .88; transition: opacity var(--ease), transform var(--ease); }
.bar:hover, .bar.is-active { opacity: 1; transform: scaleY(1.08); }
.bar.b-deg  { background: #f59e0b; opacity: 1; }
.bar.b-part { background: #f97316; opacity: 1; }
.bar.b-out  { background: var(--red); opacity: 1; }
.bar.b-maint { background: var(--accent); opacity: 1; }
.bar.b-none { background: var(--border-strong); opacity: .45; }
.bars-legend { display: flex; justify-content: space-between; margin-top: 7px; font-family: var(--mono); font-size: .6875rem; color: var(--text-light); }
.bars-legend .mid { flex: 1; text-align: center; }

.status-tip { position: fixed; z-index: 60; pointer-events: none; max-width: 260px; padding: 9px 12px; border-radius: var(--radius); background: var(--text); color: var(--bg); font-size: .75rem; line-height: 1.45; box-shadow: var(--shadow); opacity: 0; transition: opacity .12s ease; }
.status-tip.show { opacity: 1; }
.status-tip b { display: block; font-size: .75rem; margin-bottom: 1px; }
.status-tip span { opacity: .8; }

/* ── incidents ──────────────────────────────────────────── */
.inc-day { margin-bottom: 22px; }
.inc-day-title { font-size: .8125rem; font-weight: 700; letter-spacing: .02em; color: var(--text); padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.inc-none { font-size: .875rem; color: var(--text-light); }
.inc { margin-bottom: 14px; }
.inc-title { font-size: 1rem; font-weight: 700; color: var(--amber); letter-spacing: -.01em; }
.inc.is-major .inc-title { color: var(--red); }
.inc.is-maint .inc-title { color: var(--accent); }
.inc-comps { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 8px; }
.inc-comps span { font-size: .6875rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--bg-muted); color: var(--text-muted); border: 1px solid var(--border); }
.inc-update { font-size: .875rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 8px; }
.inc-update strong { color: var(--text); font-weight: 700; }
.inc-update time { display: block; font-family: var(--mono); font-size: .6875rem; color: var(--text-light); margin-top: 1px; }

.status-foot { margin-top: 36px; font-size: .75rem; color: var(--text-light); max-width: 620px; line-height: 1.6; }
.status-error { padding: 28px 22px; text-align: center; color: var(--text-muted); font-size: .9375rem; }
.status-error .btn { margin-top: 12px; }

@media (max-width: 720px) {
  .status-metrics { grid-template-columns: 1fr; }
  .status-banner { padding: 16px 18px; flex-wrap: wrap; }
  .status-updated { width: 100%; text-align: left; }
  .svc { padding: 16px 16px 14px; }
  .bars { height: 28px; gap: 1px; }
}
@media (prefers-reduced-motion: reduce) {
  .status-banner[data-state="operational"] .status-dot::after, .status-skeleton { animation: none; }
  .bar, .status-tip { transition: none; }
}
