/* ==========================================================================
   pages/status.css — the full status page

   The service list itself comes from content.css. This file only adds the
   banner, the panel wrapper and the incident list.
   ========================================================================== */

.status-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(30rem 14rem at 0% 50%, var(--accent-wash), transparent 70%),
    var(--surface-1);
}

.status-banner__main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  min-width: 0;
}

.status-banner__note {
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  color: var(--text-mute);
}

/* A plain surface to sit the service list on. */
.panel {
  padding: var(--space-2) var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-1);
}

.status-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-4);
  color: var(--text-mute);
  font-size: var(--fs-xs);
  line-height: var(--lh-snug);
}

.status-note svg {
  flex: none;
  margin-top: 0.15rem;
}

/* The text is a single flex item. min-width:0 lets it shrink and wrap
   instead of forcing the page wider than the viewport. */
.status-note > span {
  min-width: 0;
}

/* Refresh button spins while a request is in flight. */
#status-refresh.is-loading svg {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  #status-refresh.is-loading svg {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   Incidents
   -------------------------------------------------------------------------- */

.incidents {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  list-style: none;
  padding: 0;
  margin: 0;
}

.incident {
  display: grid;
  grid-template-columns: minmax(0, 9rem) minmax(0, 1fr);
  gap: var(--space-4) var(--space-6);
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-1);
}

.incident__side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}

.incident__date {
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  color: var(--text-mute);
}

.incident__title {
  font-size: var(--fs-md);
}

.incident__body {
  margin-top: var(--space-2);
  color: var(--text-dim);
  font-size: var(--fs-sm);
}

@media (max-width: 40rem) {
  .incident {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
  }

  .incident__side {
    flex-direction: row;
    align-items: center;
    gap: var(--space-3);
  }

  .status-banner {
    flex-direction: column;
    align-items: stretch;
  }
}
