/* ============================================================
   Abomate – Public Status Page Styles
   ============================================================ */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: #f4f6fa;
  color: #1d273b;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

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

.header {
  text-align: center;
  margin-bottom: 2rem;
}

.logo {
  margin-bottom: .75rem;
}

.logo-img {
  height: 28px;
  width: auto;
}

.header h1 {
  font-size: 1rem;
  font-weight: 500;
  color: #667382;
  letter-spacing: .02em;
}

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

.status-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 24px;
  border-radius: 12px;
  color: #fff;
  margin-bottom: 2rem;
  font-weight: 600;
  font-size: 1rem;
}

.status-banner-icon {
  display: flex;
  align-items: center;
}

/* ── Card ──────────────────────────────────────────────────── */

.card {
  background: #fff;
  border: 1px solid #e6e7e9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(24, 36, 51, .04);
}

.card-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid #e6e7e9;
  background: #f8fafc;
}

.card-header h2 {
  font-size: .95rem;
  font-weight: 700;
  color: #1d273b;
  margin: 0;
}

.card-subtitle {
  font-size: .78rem;
  color: #667382;
}

.card-body {
  padding: 20px 24px;
}

/* ── Service Row ───────────────────────────────────────────── */

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

.service-row.border-top {
  border-top: 1px solid #f0f1f3;
}

.service-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.service-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: .9rem;
  color: #1d273b;
}

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

.status-dot.status-up { background: #2fb344; }
.status-dot.status-down { background: #d63939; }
.status-dot.status-degraded { background: #f76707; }
.status-dot.status-unknown { background: #adb5bd; }

.service-status {
  font-size: .78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
}

.service-status-up { color: #2fb344; background: rgba(47, 179, 68, .1); }
.service-status-down { color: #d63939; background: rgba(214, 57, 57, .1); }
.service-status-degraded { color: #f76707; background: rgba(247, 103, 7, .1); }
.service-status-unknown { color: #667382; background: rgba(102, 115, 130, .1); }

/* ── Uptime Bars ───────────────────────────────────────────── */

.uptime-bars {
  display: flex;
  gap: 1.5px;
  height: 28px;
  cursor: default;
}

.uptime-bar {
  flex: 1;
  border-radius: 2px;
  min-width: 2px;
  transition: opacity .15s;
}

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

.bar-up { background: #2fb344; }
.bar-down { background: #d63939; }
.bar-degraded { background: #f76707; }
.bar-nodata { background: #e6e7e9; }

.uptime-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: .72rem;
  color: #667382;
}

.uptime-pct {
  font-weight: 600;
}

/* ── Incidents ─────────────────────────────────────────────── */

.incident {
  padding: 20px 24px;
  border-top: 1px solid #f0f1f3;
}

.incident:first-child {
  border-top: none;
}

.incident-resolved {
  opacity: .7;
}

.incident-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.incident-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: .9rem;
  color: #1d273b;
}

.incident-impact-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.incident-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

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

.incident-badge-investigating { color: #d63939; background: rgba(214, 57, 57, .1); }
.incident-badge-identified { color: #f76707; background: rgba(247, 103, 7, .1); }
.incident-badge-monitoring { color: #066fd1; background: rgba(6, 111, 209, .1); }
.incident-badge-resolved { color: #2fb344; background: rgba(47, 179, 68, .1); }

.incident-date {
  font-size: .75rem;
  color: #667382;
}

/* ── Incident Updates ──────────────────────────────────────── */

.incident-updates {
  margin-top: 14px;
  padding-left: 18px;
  border-left: 2px solid #e6e7e9;
}

.incident-update {
  padding: 10px 0;
}

.incident-update + .incident-update {
  border-top: 1px solid #f5f5f5;
}

.update-status-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}

.update-status-investigating { color: #d63939; }
.update-status-identified { color: #f76707; }
.update-status-monitoring { color: #066fd1; }
.update-status-resolved { color: #2fb344; }

.update-message {
  font-size: .85rem;
  color: #3d4f5f;
  line-height: 1.6;
}

.update-meta {
  font-size: .72rem;
  color: #999;
  margin-top: 4px;
}

/* ── Footer ────────────────────────────────────────────────── */

.footer {
  text-align: center;
  margin-top: 2.5rem;
  font-size: .78rem;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.footer-dot {
  color: #ccc;
}

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

@media (max-width: 640px) {
  .container {
    padding: 24px 16px 40px;
  }

  .status-banner {
    padding: 14px 16px;
    font-size: .9rem;
  }

  .card-header {
    padding: 12px 16px;
  }

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

  .uptime-bars {
    height: 22px;
  }

  .incident {
    padding: 16px;
  }

  .incident-header {
    flex-direction: column;
  }

  .incident-meta {
    margin-top: 4px;
  }
}
