/* Status page additions: banner, pills, history strips, legend, skeleton. */

.overall {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--rule);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
  background: var(--bg-2, transparent);
}

.overall--ok { border-left-color: var(--signal); }
.overall--late,
.overall--stale { border-left-color: var(--signal-2); }

.overall-text {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.overall-meta {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.mono { font-family: var(--mono, "JetBrains Mono", monospace); }

/* Pills */
.pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--rule);
  color: var(--ink);
  white-space: nowrap;
}

.pill--ok {
  border-color: var(--signal);
  color: var(--signal);
}

.pill--late {
  border-color: var(--signal);
  border-style: dashed;
  color: var(--ink-2);
}

.pill--stale {
  background: var(--signal-2);
  border-color: var(--signal-2);
  color: var(--paper);
}

.pill--unknown {
  color: var(--ink-2);
}

/* Dataset table */
.status-table .dataset-label { display: block; font-weight: 500; }
.status-table .dataset-note {
  display: block;
  font-size: 0.8125rem;
  color: var(--ink-2);
  margin-top: 0.25rem;
}
.status-table .schedule-cell { font-size: 0.875rem; color: var(--ink-2); }

/* Error state */
.status-error {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--signal-2);
  border-radius: 8px;
}
.status-error p { margin: 0 0 0.75rem; }

/* History strips */
.history-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.history-label {
  flex: 0 0 12rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.history-strip-wrap {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.history-strip {
  display: flex;
  gap: 2px;
  width: max-content;
}

.history-day {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: 0 0 auto;
  background: var(--rule);
}

.history-day--ok { background: var(--signal); }
.history-day--late { background: var(--signal); opacity: 0.4; }
.history-day--stale { background: var(--signal-2); }
.history-day--unknown { background: var(--rule); }

.history-empty { color: var(--ink-2); }

/* Legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.legend li { display: flex; align-items: center; gap: 0.4rem; }

.legend-swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
  background: var(--rule);
}

.legend-swatch--ok { background: var(--signal); }
.legend-swatch--late { background: var(--signal); opacity: 0.4; }
.legend-swatch--stale { background: var(--signal-2); }
.legend-swatch--unknown { background: var(--rule); }

/* Skeleton */
.skeleton {
  display: block;
  background: var(--rule);
  border-radius: 4px;
}

.skeleton-line {
  height: 1rem;
  width: 100%;
  animation: status-pulse 1.4s ease-in-out infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .skeleton-line { animation: none; }
}

@media (max-width: 640px) {
  .history-row { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .history-label { flex: none; }
  .history-strip-wrap { width: 100%; }
}
