/* BeMeal status page — extends style.css tokens. */

:root {
  --status-up: #34c759; /* green — sage on dark bg, AA-contrast */
  --status-degraded: #d4a044; /* warm gold — distinguishable from brand orange */
  --status-down: #ff453a; /* matches existing --danger */
  --status-rolled-back: #5ac8fa; /* cool blue — "rolled back, investigating" */
}

.status-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  width: 100%;
}

/* ===== Pill ===== */
.status-pill {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-lg);
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}

.status-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 25%, transparent);
}

.status-pill[data-state='up'] {
  border-color: color-mix(in srgb, var(--status-up) 40%, var(--border));
  color: var(--status-up);
}
.status-pill[data-state='up'] .status-dot {
  background-color: var(--status-up);
}

.status-pill[data-state='degraded'] {
  border-color: color-mix(in srgb, var(--status-degraded) 40%, var(--border));
  color: var(--status-degraded);
}
.status-pill[data-state='degraded'] .status-dot {
  background-color: var(--status-degraded);
}

.status-pill[data-state='down'] {
  border-color: color-mix(in srgb, var(--status-down) 50%, var(--border));
  color: var(--status-down);
}
.status-pill[data-state='down'] .status-dot {
  background-color: var(--status-down);
  /* Steady pulse so users notice. */
  animation: status-pulse 1.4s ease-in-out infinite;
}

.status-pill[data-state='rolled-back'] {
  border-color: color-mix(
    in srgb,
    var(--status-rolled-back) 40%,
    var(--border)
  );
  color: var(--status-rolled-back);
}
.status-pill[data-state='rolled-back'] .status-dot {
  background-color: var(--status-rolled-back);
}

@keyframes status-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-pill[data-state='down'] .status-dot {
    animation: none;
  }
}

.status-text {
  flex: 1;
  min-width: 0;
}

.status-label {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.3px;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.status-headline {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.status-meta {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

/* ===== Incidents list ===== */
.incidents-section {
  margin-top: 2.5rem;
}

.incidents-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: -0.2px;
}

.incidents-list {
  list-style: none;
  /* Reset the default ul padding/margin so the bullet-less list aligns
     flush with the heading instead of inheriting browser indent. */
  margin: 0;
  padding: 0;
}

.incidents-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.incidents-list li:last-child {
  border-bottom: none;
}

.incidents-list .incident-headline {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.incidents-list .incident-meta {
  font-size: 0.8rem;
}

.incidents-list .incident-pm-link {
  color: var(--primary-light);
  text-decoration: none;
  margin-left: 0.5rem;
}
.incidents-list .incident-pm-link:hover,
.incidents-list .incident-pm-link:focus {
  text-decoration: underline;
}

.incidents-empty {
  color: var(--text-muted);
  font-style: italic;
}

/* ===== Misc ===== */
.noscript-hint {
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  margin-bottom: 2rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}
.nav-link:hover,
.nav-link:focus {
  color: var(--text);
}

.status-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.status-footer a {
  color: var(--primary-light);
  text-decoration: none;
}
.status-footer a:hover,
.status-footer a:focus {
  text-decoration: underline;
}
