/* ═══════════════════════════════════════════════════
   HIDE — Status Page Styles
   ═══════════════════════════════════════════════════ */

/* Alert bar — full-width banner at top for outages */
.alert-bar {
  display: none;
  width: 100%;
  padding: 12px 24px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 50;
  position: relative;
  animation: alertPulse 2s ease-in-out infinite;
}

.alert-bar.outage {
  display: block;
  background: rgba(229, 57, 53, 0.15);
  border-bottom: 1px solid rgba(229, 57, 53, 0.3);
  color: #E53935;
}

.alert-bar.degraded {
  display: block;
  background: rgba(255, 111, 0, 0.1);
  border-bottom: 1px solid rgba(255, 111, 0, 0.25);
  color: #FF6F00;
}

@keyframes alertPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@media (min-width: 768px) {
  .alert-bar {
    font-size: 0.85rem;
    padding: 14px 32px;
  }
}

.status-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid rgba(76, 175, 80, 0.2);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-top: 32px;
  margin-bottom: 32px;
  animation: cardIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-banner.degraded {
  border-color: rgba(255, 111, 0, 0.3);
}

.status-banner.outage {
  border-color: rgba(229, 57, 53, 0.3);
}

.status-banner.maintenance {
  border-color: rgba(30, 136, 229, 0.3);
}

/* Active incidents pinned under banner */
.active-incident-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 10px;
}

.active-incident-card.severity-outage {
  border: 1px solid rgba(229, 57, 53, 0.25);
}

.active-incident-card.severity-degraded {
  border: 1px solid rgba(255, 111, 0, 0.25);
}

.active-incident-card.severity-maintenance {
  border: 1px solid rgba(30, 136, 229, 0.25);
}

.active-inc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.active-inc-badge {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.active-inc-badge.outage { background: rgba(229,57,53,0.12); color: #E53935; }
.active-inc-badge.degraded { background: rgba(255,111,0,0.12); color: #FF6F00; }
.active-inc-badge.maintenance { background: rgba(30,136,229,0.12); color: #1E88E5; }
.active-inc-badge.investigating { background: rgba(255,111,0,0.12); color: #FF6F00; }
.active-inc-badge.ongoing { background: rgba(229,57,53,0.12); color: #E53935; }

.active-inc-header h4 {
  font-size: 0.9rem;
  font-weight: 600;
  flex: 1;
}

.active-inc-date {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.active-inc-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.active-inc-services {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.active-inc-svc-chip {
  font-size: 0.65rem;
  padding: 2px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
}

#activeIncidents:empty {
  display: none;
}

#activeIncidents:not(:empty) {
  margin-bottom: 24px;
}

.status-banner h2 {
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.status-banner p {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Services */
.services-section,
.uptime-section,
.incidents-section {
  margin-bottom: 32px;
}

.services-section h3,
.uptime-section h3,
.incidents-section h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.services-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius-md);
  transition: border-color 0.2s;
}

.service-row:hover {
  border-color: rgba(255,255,255,0.08);
}

.service-name {
  font-size: 0.85rem;
  font-weight: 500;
}

.service-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-dot.operational {
  background: var(--green);
  box-shadow: 0 0 8px var(--green-glow);
}

.status-dot.degraded {
  background: var(--orange);
  box-shadow: 0 0 8px rgba(255, 111, 0, 0.4);
}

.status-dot.outage {
  background: var(--red);
  box-shadow: 0 0 8px rgba(229, 57, 53, 0.4);
  animation: pulseDot 1.5s ease-in-out infinite;
}

.status-dot.maintenance {
  background: var(--blue);
  box-shadow: 0 0 8px rgba(30, 136, 229, 0.4);
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.status-text.operational { color: var(--green); }
.status-text.degraded { color: var(--orange); }
.status-text.outage { color: var(--red); }
.status-text.maintenance { color: var(--blue); }

/* Uptime bars */
.uptime-bars {
  display: flex;
  gap: 2px;
  height: 32px;
  align-items: stretch;
}

.uptime-bar {
  flex: 1;
  border-radius: 2px;
  min-width: 2px;
  transition: opacity 0.15s;
  cursor: default;
  position: relative;
}

.uptime-bar.up { background: var(--green); opacity: 0.7; }
.uptime-bar.degraded { background: var(--orange); opacity: 0.8; }
.uptime-bar.down { background: var(--red); opacity: 0.9; }
.uptime-bar.no-data { background: var(--bg-elevated); opacity: 0.4; }

.uptime-bar:hover { opacity: 1; }

.uptime-bar:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
  font-size: 0.65rem;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}

.uptime-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Incidents */
.incident-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 10px;
}

.incident-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.incident-header h4 {
  font-size: 0.85rem;
  font-weight: 600;
  flex: 1;
}

.incident-date {
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.incident-type {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.incident-type.resolved {
  background: rgba(76, 175, 80, 0.12);
  color: var(--green);
}

.incident-type.investigating {
  background: rgba(255, 111, 0, 0.12);
  color: var(--orange);
}

.incident-type.ongoing {
  background: rgba(229, 57, 53, 0.12);
  color: var(--red);
}

.incident-body {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.incident-updates {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.incident-update {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.75rem;
}

.incident-update:last-child {
  margin-bottom: 0;
}

.incident-update-time {
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 50px;
}

.incident-update-text {
  color: var(--text-secondary);
}

.no-incidents {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Desktop — centered status content */
@media (min-width: 768px) {
  .status-banner {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    padding: 24px 32px;
  }

  #activeIncidents,
  .services-section,
  .uptime-section,
  .incidents-section {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
  }

  .service-row {
    padding: 16px 20px;
  }

  .service-name {
    font-size: 0.9rem;
  }

  .uptime-bars {
    height: 40px;
    gap: 3px;
  }
}

@media (min-width: 1024px) {
  #activeIncidents,
  .services-section,
  .uptime-section,
  .incidents-section,
  .status-banner {
    max-width: 720px;
  }
}
