/* Status page styles */

.status-hero {
  background: linear-gradient(120deg, #1f3d2a 0%, #2c5b3d 52%, #1d3e2a 100%);
  color: #fdfbf6;
  padding: calc(var(--space-8) + var(--space-4)) 0 var(--space-7);
}

.status-hero__eyebrow {
  color: rgba(255, 255, 255, 0.6);
}

.status-hero__title {
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.2;
  margin: 0 0 var(--space-3);
}

.status-hero__subtitle {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  margin: 0;
  max-width: 520px;
}

.status-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--space-5);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
}

.status-hero__badge--operational {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-hero__badge--degraded {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-hero__badge--down {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-hero__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-hero__dot--operational {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.status-hero__dot--degraded {
  background: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

.status-hero__dot--down {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

/* Service monitor cards */
.status-services {
  padding: var(--space-7) 0;
}

.status-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  background: var(--bg);
  margin-bottom: var(--space-5);
}

.status-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.status-card__name {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.status-card__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
}

.status-card__status--operational {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.status-card__status--degraded {
  background: rgba(251, 191, 36, 0.1);
  color: #d97706;
}

.status-card__status--down {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.status-card__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-card__dot--operational {
  background: #22c55e;
}

.status-card__dot--degraded {
  background: #fbbf24;
}

.status-card__dot--down {
  background: #ef4444;
}

/* 30-day bar chart */
.status-bars {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 34px;
}

.status-bar {
  flex: 1;
  height: 100%;
  border-radius: 3px;
  position: relative;
  cursor: default;
  transition: opacity 0.15s ease;
}

.status-bar:hover {
  opacity: 0.8;
}

.status-bar--operational {
  background: #22c55e;
}

.status-bar--degraded {
  background: #fbbf24;
}

.status-bar--down {
  background: #ef4444;
}

.status-bar--no-data {
  background: var(--border);
}

/* Tooltip */
.status-bar__tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}

.status-bar__tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--text);
}

.status-bar:hover .status-bar__tooltip {
  display: block;
}

.status-bars__legend {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2);
  font-size: 0.75rem;
  color: var(--muted);
}

.status-card__uptime {
  margin-top: var(--space-3);
  font-size: 0.85rem;
  color: var(--muted);
}

.status-card__uptime strong {
  color: var(--text);
  font-weight: 600;
}

/* Incident history */
.status-incidents {
  padding: var(--space-7) 0;
  border-top: 1px solid var(--border);
}

.status-incidents__title {
  font-size: 1.3rem;
  margin: 0 0 var(--space-5);
}

.status-incident {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-4);
  background: var(--bg);
}

.status-incident__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.status-incident__title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
}

.status-incident__date {
  font-size: 0.8rem;
  color: var(--muted);
}

.status-incident__body {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

.status-incident__tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: var(--space-2);
}

.status-incident__tag--resolved {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.status-incident__tag--investigating {
  background: rgba(251, 191, 36, 0.1);
  color: #d97706;
}

.status-no-incidents {
  text-align: center;
  padding: var(--space-6) 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Legend */
.status-legend {
  display: flex;
  gap: var(--space-5);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border);
  margin-top: var(--space-4);
}

.status-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

.status-legend__swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.status-legend__swatch--operational {
  background: #22c55e;
}

.status-legend__swatch--degraded {
  background: #fbbf24;
}

.status-legend__swatch--down {
  background: #ef4444;
}

/* Responsive */
@media (max-width: 700px) {
  .status-card__header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .status-bars {
    gap: 1px;
  }

  .status-legend {
    flex-wrap: wrap;
    gap: var(--space-3);
  }

  .status-incident__header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }
}
