/* Leaday's status page. Same colors and font as the platform (src/index.css) and the legal pages. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --background: #ffffff;
  --foreground: hsl(222 47% 11%);
  --card: #ffffff;
  --muted: hsl(220 14% 96%);
  --muted-foreground: hsl(220 9% 40%);
  --border: hsl(220 13% 91%);
  --primary: hsl(217 91% 50%);
  --ok: hsl(142 71% 36%);
  --minor: hsl(38 92% 48%);
  --major: hsl(0 72% 50%);
  --none: hsl(220 13% 88%);
  color-scheme: light;
}
:root.dark {
  --background: hsl(222 47% 5%);
  --foreground: hsl(210 40% 98%);
  --card: hsl(222 47% 7%);
  --muted: hsl(222 47% 12%);
  --muted-foreground: hsl(215 20% 70%);
  --border: hsl(222 47% 15%);
  --primary: hsl(217 91% 65%);
  --ok: hsl(142 60% 45%);
  --minor: hsl(38 92% 55%);
  --major: hsl(0 75% 60%);
  --none: hsl(222 30% 20%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); }

.head {
  height: 6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px;
}
.head-left { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.head-left a { display: flex; }
.head h1 { margin: 0; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; }
.logo-dark { display: none; }
:root.dark .logo-light { display: none; }
:root.dark .logo-dark { display: block; }
.head-buttons { display: flex; gap: 0.5rem; flex-shrink: 0; }
.head-buttons button {
  font: inherit;
  font-size: 0.875rem;
  height: 2.25rem;
  min-width: 2.25rem;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--background);
  color: var(--foreground);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.head-buttons button:hover { background: var(--muted); }
#theme-button { padding: 0; }
#theme-button svg { width: 1.1rem; height: 1.1rem; }

main { max-width: 860px; margin: 0 auto; padding: 0 16px 2rem; }

.dot { display: inline-block; width: 0.625rem; height: 0.625rem; border-radius: 999px; flex-shrink: 0; }
.dot.big { width: 1rem; height: 1rem; }
.dot.ok { background: var(--ok); }
.dot.degraded { background: var(--minor); }
.dot.down { background: var(--major); }
.dot.unknown { background: var(--none); }

.summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--card);
  margin-bottom: 1.5rem;
}
.summary p { margin: 0; }
.summary-title { font-size: 1.25rem; font-weight: 600; }
.summary-sub { color: var(--muted-foreground); font-size: 0.875rem; }

.alert {
  border: 1px solid var(--border);
  border-left: 4px solid var(--major);
  border-radius: 0.75rem;
  background: var(--card);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.alert.degraded { border-left-color: var(--minor); }
.alert h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.alert p { margin: 0; color: var(--muted-foreground); font-size: 0.875rem; }

.group {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--card);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.group h2 {
  margin: 0;
  padding: 0.875rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
}
.part { padding: 1rem 1.25rem; }
.part + .part { border-top: 1px solid var(--border); }
.part-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.625rem; }
.part-name { font-weight: 500; }
.part-state { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--muted-foreground); white-space: nowrap; }

.bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(90, minmax(0, 1fr));
  gap: 2px;
  height: 2rem;
}
.bars li { border-radius: 2px; background: var(--none); cursor: default; outline: none; }
.bars li.ok { background: var(--ok); }
.bars li.minor { background: var(--minor); }
.bars li.major { background: var(--major); }
.bars li:hover, .bars li:focus-visible { opacity: 0.7; }
.bars li:focus-visible { box-shadow: 0 0 0 2px var(--primary); }
.bars-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.375rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.bars-foot .uptime { color: var(--foreground); font-weight: 500; }
.days-30 { display: none; }

@media (max-width: 640px) {
  .bars { grid-template-columns: repeat(30, minmax(0, 1fr)); }
  .bars li:nth-child(-n + 60) { display: none; }
  .days-90 { display: none; }
  .days-30 { display: inline; }
  .head h1 { font-size: 1.25rem; }
}

.incidents h2 { font-size: 1.125rem; margin: 2rem 0 0.75rem; }
.incident-list { list-style: none; margin: 0; padding: 0; }
.incident-list li {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--card);
  padding: 0.875rem 1.25rem;
  margin-bottom: 0.75rem;
}
.incident-list .empty { color: var(--muted-foreground); }
.incident-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.incident-head strong { font-weight: 600; }
.incident-when { margin: 0.25rem 0 0; font-size: 0.875rem; color: var(--muted-foreground); }
.incident-note { margin: 0.5rem 0 0; white-space: pre-line; }

.foot {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 16px 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 0.875rem;
}
.foot p { margin: 0.25rem 0; }

.tip {
  position: fixed;
  z-index: 10;
  max-width: 240px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card);
  color: var(--foreground);
  font-size: 0.8125rem;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.18);
  pointer-events: none;
}
.tip strong { display: block; margin-bottom: 0.125rem; }
.tip span { display: block; color: var(--muted-foreground); }
