/* Statusseite status.aschauer.it - Farben und Maße aus dem ASCHAUER.IT-Designsystem (Werte wie in
   src/website/src/styles/index.css). Hell/Dunkel: Systemeinstellung, außer das gemeinsame Cookie
   "asit-theme" legt etwas fest - dann setzt der Server class="light" bzw. "dark" auf <html>. */

@font-face { font-family: "Titillium Web"; font-weight: 400; font-display: swap; src: url("fonts/titillium-web-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Titillium Web"; font-weight: 600; font-display: swap; src: url("fonts/titillium-web-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Titillium Web"; font-weight: 700; font-display: swap; src: url("fonts/titillium-web-latin-700-normal.woff2") format("woff2"); }

:root {
  --background: #F6F6F5;
  --foreground: #17191C;
  --card: #FFFFFF;
  --muted: #ECECEA;
  --muted-foreground: #5F6268;
  --border: #DCDCD8;
  --primary: #C94A11;
  --brand: #EB5E21;
  --success: #1E7A44;
  --success-soft: #E1F2E7;
  --warning: #9A6700;
  --warning-soft: #FBF1D6;
  --destructive: #C0262D;
  --destructive-soft: #FBE3E3;
  --bar-empty: #E2E2DF;
  --radius: 0.375rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --background: #111214;
    --foreground: #EDEDEC;
    --card: #18191C;
    --muted: #212226;
    --muted-foreground: #9A9CA3;
    --border: #2D2E33;
    --primary: #F07038;
    --brand: #F07038;
    --success: #4FC482;
    --success-soft: #12301F;
    --warning: #E8B32E;
    --warning-soft: #332A0E;
    --destructive: #F2555A;
    --destructive-soft: #3A1517;
    --bar-empty: #2A2B30;
    color-scheme: dark;
  }
}

:root.dark {
  --background: #111214;
  --foreground: #EDEDEC;
  --card: #18191C;
  --muted: #212226;
  --muted-foreground: #9A9CA3;
  --border: #2D2E33;
  --primary: #F07038;
  --brand: #F07038;
  --success: #4FC482;
  --success-soft: #12301F;
  --warning: #E8B32E;
  --warning-soft: #332A0E;
  --destructive: #F2555A;
  --destructive-soft: #3A1517;
  --bar-empty: #2A2B30;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Titillium Web", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.page { max-width: 880px; margin: 0 auto; padding: 32px 16px 48px; }

header.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
header.top img { height: 28px; width: auto; display: block; }
header.top .label { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-foreground); }

.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not(.light) .logo-light { display: none !important; }
  :root:not(.light) .logo-dark { display: block !important; }
}
:root.dark .logo-light { display: none !important; }
:root.dark .logo-dark { display: block !important; }

h1 { font-size: 26px; font-weight: 700; line-height: 1.2; margin: 0 0 6px; }
.lead { color: var(--muted-foreground); margin: 0 0 24px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 2);
  margin-bottom: 20px;
}

.banner { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.banner .dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.banner strong { display: block; font-size: 17px; font-weight: 700; }
.banner span { color: var(--muted-foreground); font-size: 13px; }
.banner.ok { border-color: color-mix(in srgb, var(--success) 35%, var(--border)); }
.banner.ok .dot { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.banner.down { border-color: color-mix(in srgb, var(--destructive) 45%, var(--border)); background: var(--destructive-soft); }
.banner.down .dot { background: var(--destructive); box-shadow: 0 0 0 4px color-mix(in srgb, var(--destructive) 20%, transparent); }

.group > h2 {
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted-foreground); margin: 0; padding: 14px 20px 10px; border-bottom: 1px solid var(--border);
}

.check { padding: 14px 20px; border-bottom: 1px solid var(--border); }
.check:last-child { border-bottom: 0; }
.check .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.check .name { font-weight: 600; }
.check .meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted-foreground); }
.uptime { font-variant-numeric: tabular-nums; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.up { color: var(--success); background: var(--success-soft); }
.pill.down { color: var(--destructive); background: var(--destructive-soft); }
.pill.pending { color: var(--muted-foreground); background: var(--muted); }

.bars { display: flex; gap: 2px; margin-top: 10px; height: 28px; }
.bars span { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: var(--bar-empty); }
.bars span.up { background: var(--success); }
.bars span.partial { background: var(--warning); }
.bars span.down { background: var(--destructive); }
.bars-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted-foreground); margin-top: 4px; }
.bars-legend .short { display: none; }

/* Schmale Bildschirme: nur die letzten 30 Tage */
@media (max-width: 640px) {
  .bars span:nth-child(-n+60) { display: none; }
  .bars-legend .long { display: none; }
  .bars-legend .short { display: inline; }
  h1 { font-size: 22px; }
}

.incidents { padding: 6px 20px 8px; }
.incidents h2 { font-size: 15px; font-weight: 600; margin: 10px 0 6px; }
.incidents ul { list-style: none; margin: 0; padding: 0; }
.incidents li { padding: 10px 0; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.incidents li:first-of-type { border-top: 0; }
.incidents .when { color: var(--muted-foreground); font-size: 13px; font-variant-numeric: tabular-nums; }
.incidents .empty { color: var(--muted-foreground); padding: 4px 0 10px; }

footer { margin-top: 28px; font-size: 13px; color: var(--muted-foreground); }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; }
footer a { color: var(--muted-foreground); }
footer a:hover { color: var(--foreground); }
