/* BarSidekick Status — Botanical dark theme
   Fonts: Playfair Display (display/brand) + Inter (body)
   Palette derived from design-system.css dark mode tokens */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,400&family=Inter:wght@400;500;600&display=swap');

:root {
  /* Brand */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Dark-mode palette from design-system.css */
  --bg:          #0F0E0E;
  --surface:     rgba(28, 25, 23, 0.80);   /* neutral-900 @ 80% */
  --surface-border: rgba(68, 64, 60, 0.60); /* neutral-700 @ 60% */
  --border:      #44403C;                   /* neutral-700 */
  --text:        #FAFAF9;                   /* neutral-50 */
  --text-dim:    #A8A29E;                   /* neutral-400 */

  /* Status colors — botanical palette */
  --ok:     #7FB069;   /* primary dark-mode — botanical green */
  --warn:   #F4A460;   /* secondary dark-mode — sandy gold */
  --orange: #C77DFF;   /* accent dark-mode — lavender purple (partial outage) */
  --err:    #EF4444;   /* standard red */
  --info:   #A8A29E;   /* neutral */
  --nodata: #44403C;
}

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

body {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

/* ── Header ── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

.brand { display: flex; align-items: baseline; gap: 0.6rem; }

.brand-name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.35rem;
  color: var(--ok);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand-name:hover { color: #A3D18A; }

.brand-sub {
  font-size: 0.775rem;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.header-link {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}
.header-link:hover { color: var(--text); }

/* ── Overall banner ── */
.overall-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  margin: 1.5rem auto;
  max-width: 860px;
  width: calc(100% - 3rem);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s;
}

.overall-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  flex: 1;
}

.overall-updated {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ── Status dot ── */
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-operational { background: var(--ok); }
.dot-degraded    { background: var(--warn); }
.dot-partial_outage { background: var(--orange); }
.dot-major_outage   { background: var(--err); }
.dot-maintenance    { background: var(--info); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 50%, transparent); }
  50%       { box-shadow: 0 0 0 5px transparent; }
}
.pulse { animation: pulse 2.4s ease-in-out infinite; }

/* ── Section headers ── */
.section-header {
  max-width: 860px;
  margin: 0 auto 0.6rem;
  padding: 0 1.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ── Services ── */
.services {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.service-row {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.6rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.service-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.service-info { flex: 1; }
.service-name { font-weight: 600; font-size: 0.95rem; }
.service-desc { font-size: 0.8rem; color: var(--text-dim); margin-top: 0.15rem; }

.service-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.service-latency {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* ── Status pills ── */
.status-pill {
  display: inline-block;
  padding: 0.2em 0.65em;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.status-operational    { background: color-mix(in srgb, var(--ok) 18%, transparent);     color: var(--ok); }
.status-degraded       { background: color-mix(in srgb, var(--warn) 18%, transparent);   color: var(--warn); }
.status-partial_outage { background: color-mix(in srgb, var(--orange) 18%, transparent); color: var(--orange); }
.status-major_outage   { background: color-mix(in srgb, var(--err) 18%, transparent);    color: var(--err); }
.status-maintenance    { background: color-mix(in srgb, var(--info) 18%, transparent);   color: var(--info); }

/* ── Uptime bars ── */
.uptime-wrapper { display: flex; flex-direction: column; gap: 0.3rem; }

.uptime-svg {
  width: 100%;
  height: 28px;
  display: block;
  border-radius: 3px;
  overflow: hidden;
}

.uptime-operational    { fill: var(--ok); }
.uptime-degraded       { fill: var(--warn); }
.uptime-partial_outage { fill: var(--orange); }
.uptime-major_outage   { fill: var(--err); }
.uptime-maintenance    { fill: var(--info); }
.uptime-no_data        { fill: var(--nodata); }

.uptime-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.uptime-pct { font-weight: 600; color: var(--ok); }

/* ── Legend ── */
.uptime-legend {
  max-width: 860px;
  margin: 0.75rem auto 0;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

.legend-label {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ── Tooltip ── */
.uptime-tooltip {
  display: none;
  position: fixed;
  z-index: 9999;
  background: #292524;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  color: var(--text);
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

/* ── Incidents ── */
.incidents {
  max-width: 860px;
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
}

.incident-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.6rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.incident-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.incident-title {
  font-weight: 600;
  font-size: 0.9rem;
  flex: 1;
  min-width: 0;
}

.incident-updates { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }

.incident-update {
  padding: 0.5rem 0.75rem;
  background: rgba(68, 64, 60, 0.35);
  border-radius: 6px;
  border-left: 2px solid var(--border);
}

.update-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.update-status {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ok);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.update-time { font-size: 0.72rem; color: var(--text-dim); }
.update-message { font-size: 0.82rem; }

.no-incidents {
  font-size: 0.85rem;
  color: var(--text-dim);
  padding: 0.5rem 0;
}

/* ── Error banner ── */
.error-banner {
  max-width: 860px;
  margin: 0.75rem auto;
  width: calc(100% - 3rem);
  padding: 0.75rem 1.25rem;
  background: color-mix(in srgb, var(--err) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--err) 30%, transparent);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--err);
}

/* ── Loading ── */
.loading { font-size: 0.85rem; color: var(--text-dim); padding: 0.5rem 0; }

/* ── Footer ── */
.site-footer {
  max-width: 860px;
  margin: 2.5rem auto 0;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .site-header, .services, .uptime-legend, .incidents, .site-footer { padding: 0 1rem; }
  .overall-banner { width: calc(100% - 2rem); padding: 0.875rem 1rem; }
  .section-header { padding: 0 1rem; }
  .service-top { flex-wrap: wrap; }
  .site-footer { flex-direction: column; gap: 0.4rem; text-align: center; }
}
