/* System Health Monitor — Status Page Styles
   AWS-style health dashboard theme */

/* ─── Reset & Base ─────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1a1a1a;
  background-color: #f5f5f5;
}

/* ─── Header ───────────────────────────────────────────────────── */

.header {
  background-color: #232f3e;
  color: #ffffff;
  padding: 16px 24px;
}

.header h1 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.header p {
  font-size: 13px;
  color: #d5dbdb;
}

/* ─── Overall Status Banner ────────────────────────────────────── */

.overall-status {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}

.overall-status.status-healthy {
  background-color: #22c55e;
}

.overall-status.status-degraded {
  background-color: #eab308;
  color: #1a1a1a;
}

.overall-status.status-unhealthy {
  background-color: #ef4444;
}

/* ─── Main Content ─────────────────────────────────────────────── */

.container {
  max-width: 960px;
  margin: 24px auto;
  padding: 0 24px;
}

/* ─── Data Unavailable Warning Banner ──────────────────────────── */

.warning-banner,
.data-unavailable-banner {
  background-color: #fef3cd;
  border: 1px solid #f0c36d;
  color: #664d03;
  padding: 10px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.data-unavailable-banner[hidden] {
  display: none;
}

.banner-icon {
  font-size: 16px;
}

/* ─── Status Table ─────────────────────────────────────────────── */

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

.status-table thead {
  background-color: #fafafa;
}

.status-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #555555;
  border-bottom: 2px solid #e0e0e0;
  white-space: nowrap;
}

.status-table td {
  padding: 10px 16px;
  border-bottom: 1px solid #eeeeee;
  vertical-align: middle;
}

.status-table tbody tr:nth-child(even) {
  background-color: #fafafa;
}

.status-table tbody tr:hover {
  background-color: #f0f4ff;
}

/* ─── Status Circles ───────────────────────────────────────────── */

.status-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.status-indicator.status-healthy {
  background-color: #22c55e;
}

.status-indicator.status-degraded {
  background-color: #eab308;
}

.status-indicator.status-unhealthy {
  background-color: #ef4444;
}

/* ─── Sparkline Container ──────────────────────────────────────── */

.sparkline,
.sparkline-cell {
  display: inline-block;
  vertical-align: middle;
}

.sparkline-cell svg {
  display: block;
  border-radius: 2px;
}

/* ─── Category Header Rows ─────────────────────────────────────── */

.category-header td {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #555555;
  background-color: #f0f0f0;
  padding: 6px 16px;
  border-bottom: 1px solid #e0e0e0;
}

/* ─── Component Name ───────────────────────────────────────────── */

.component-name {
  font-weight: 500;
}

/* ─── Status Text ──────────────────────────────────────────────── */

.status-text {
  font-size: 13px;
  color: #555555;
}

/* ─── Empty State ──────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  color: #999999;
  padding: 24px 16px;
  font-style: italic;
}

/* ─── Footer / Last Updated ────────────────────────────────────── */

.last-updated {
  margin-bottom: 12px;
  font-size: 12px;
  color: #777777;
  text-align: right;
}

/* ─── Responsive ───────────────────────────────────────────────── */

@media (max-width: 768px) {
  .header {
    padding: 12px 16px;
  }

  .overall-status {
    padding: 10px 16px;
    font-size: 14px;
  }

  .container {
    margin: 16px auto;
    padding: 0 8px;
  }

  .status-table th,
  .status-table td {
    padding: 8px 12px;
  }

  .sparkline {
    width: 140px;
  }
}
