/* ================================================================
   STATUS PAGE — system status, uptime bars, incidents
   ================================================================ */

/* Overall status banner */
.status-banner {
  background: white;
  border: 1px solid #bbf7d0;
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.status-banner-icon {
  width: 48px;
  height: 48px;
  background: #f0fdf4;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.status-banner-icon svg {
  width: 28px;
  height: 28px;
  color: #22c55e;
}

.status-banner h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #15803d;
  margin-bottom: 0.25rem;
}

.status-banner p {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Service card */
.status-service {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
}

.status-service-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.status-service-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.status-service-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.status-service-uptime {
  font-weight: 700;
  color: #15803d;
}

/* Status dot */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.operational { background: #22c55e; }
.status-dot.degraded { background: #f59e0b; }
.status-dot.major { background: #ef4444; }

/* 90-day bars container */
.status-bars-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}

.status-bars {
  display: flex;
  align-items: stretch;
  gap: 1.5px;
  height: 34px;
  margin-bottom: 0.5rem;
}

.status-bar {
  flex: 1;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.1s ease;
  position: relative;
  min-width: 0;
}

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

.status-bar.operational { background: #22c55e; }
.status-bar.degraded { background: #f59e0b; }
.status-bar.major { background: #ef4444; }
.status-bar.maintenance { background: #3b82f6; }

/* Service summary row */
.status-service-summary {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #9ca3af;
}

/* Tooltip */
.status-tooltip {
  position: fixed;
  z-index: 100;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.06);
  width: 300px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.status-tooltip.visible {
  opacity: 1;
}

.status-tooltip-date {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.125rem;
}

.status-tooltip-service {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.625rem;
}

.status-tooltip-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.375rem;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.status-tooltip-stats dt {
  color: #9ca3af;
}

.status-tooltip-stats dd {
  font-weight: 600;
  color: var(--color-text-primary);
  text-align: right;
}

.status-tooltip-incident {
  border-top: 1px solid var(--color-border);
  padding-top: 0.625rem;
  margin-top: 0.375rem;
}

.status-tooltip-incident-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 0.375rem;
}

.status-tooltip-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.status-tooltip-timeline-entry {
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  font-size: 0.6875rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

/* Past incidents section */
.status-incidents-section {
  margin-top: 2.5rem;
}

.status-incidents-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 1.5rem;
}

.status-incident-group {
  margin-bottom: 2rem;
}

.status-incident-group-date {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.status-incident-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
}

.status-incident-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.status-incident-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.status-incident-resolved-at {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 1rem;
}

/* Timeline */
.status-timeline {
  position: relative;
  padding-left: 1rem;
  border-left: 2px solid var(--color-border);
}

.status-timeline-entry {
  position: relative;
  padding-bottom: 1rem;
  padding-left: 1rem;
}

.status-timeline-entry:last-child {
  padding-bottom: 0;
}

.status-timeline-entry::before {
  content: '';
  position: absolute;
  left: -1.3125rem;
  top: 0.375rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--color-border);
}

.status-timeline-entry.resolved::before { background: #22c55e; box-shadow: 0 0 0 2px #bbf7d0; }
.status-timeline-entry.monitoring::before { background: #3b82f6; box-shadow: 0 0 0 2px #bfdbfe; }
.status-timeline-entry.identified::before { background: #f59e0b; box-shadow: 0 0 0 2px #fde68a; }
.status-timeline-entry.investigating::before { background: #ef4444; box-shadow: 0 0 0 2px #fecaca; }

.status-timeline-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.status-timeline-time {
  font-size: 0.6875rem;
  color: #9ca3af;
}

.status-timeline-message {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-badge-resolved {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.status-badge-monitoring {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.status-badge-identified {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.status-badge-investigating {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.status-badge-maintenance {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* Section divider */
.status-section-divider {
  margin: 2rem 0;
  border: none;
  border-top: 1px solid var(--color-border);
}

/* Responsive */
@media (max-width: 767px) {
  .status-service {
    padding: 1rem;
  }

  .status-service-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .status-service-meta {
    font-size: 0.75rem;
  }

  .status-bars {
    height: 28px;
  }

  .status-tooltip {
    width: 260px;
  }

  .status-incident-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .status-incident-card {
    padding: 1rem;
  }

  .status-banner {
    padding: 1.5rem 1rem;
  }

  .status-banner h1 {
    font-size: 1.25rem;
  }
}
