/* ==========================================================================
   Basis-CSS – für alle Vereine gleich (Konzept Kapitel 7, Ebene 2).
   Liest ausschließlich --brand-* aus /theme.css und leitet daraus die
   semantischen Tokens ab. Komponenten nutzen nur diese semantischen Namen.
   Keine Hex-Farbe in dieser Datei (Stylelint-Regel, siehe .stylelintrc.json).
   ========================================================================== */

:root {
  --color-action: var(--brand-primary);
  --color-action-text: var(--brand-on-primary);
  --color-accent: var(--brand-secondary);
  --color-focus: var(--brand-secondary);
  --color-danger: var(--brand-danger);
  --color-success: var(--brand-success);
  --color-warning: var(--brand-warning);
  --color-surface: var(--brand-surface);
  --color-surface-raised: var(--brand-surface-2);
  --color-text: var(--brand-text);
  --color-text-muted: var(--brand-text-muted);
  --color-border: var(--brand-border);
  --gradient-cta: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  --font-heading: var(--brand-font-heading), sans-serif;
  --font-body: var(--brand-font-body), sans-serif;
  --radius: var(--brand-radius);

  /* Brücke für die übernommenen Windmill-Apps (Phase 1): deren alte Namen
     zeigen jetzt auf das Theme. Neue Komponenten nutzen die Namen oben. */
  --red: var(--brand-primary);
  --orange: var(--brand-secondary);
  --grad: var(--gradient-cta);
}

body {
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* Gemeinsame Bausteine für die Server-Seiten (Login, Code, Fehler) */
.jk-seite {
  min-height: calc(100vh - 48px);      /* Platz für die Fußzeile mit der Version */
  display: grid;
  place-items: center;
  padding: 16px;
  box-sizing: border-box;
}
.jk-karte {
  width: 100%;
  max-width: 420px;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius) * 2);
  padding: 28px 24px;
  box-sizing: border-box;
}
.jk-logo { height: 36px; color: var(--color-text); margin-bottom: 18px; }
.jk-logo svg { height: 100%; width: auto; }
.jk-titel { font-family: var(--font-heading); font-size: 1.6rem; margin: 0 0 6px; }
.jk-text { color: var(--color-text-muted); margin: 0 0 20px; line-height: 1.5; }
.jk-fehler { color: var(--color-danger); margin: 0 0 16px; }
.btn-submit, .jk-button {
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-radius: var(--radius);
  padding: 12px 16px;
  font: 600 1rem var(--font-body);
  background: var(--gradient-cta);
  color: var(--color-action-text);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.jk-button--leise {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  margin-top: 10px;
}
.jk-eingabe {
  width: 100%;
  box-sizing: border-box;
  font: 600 1.6rem/1 var(--font-body);
  letter-spacing: 0.4em;
  text-align: center;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  margin-bottom: 14px;
}

/* Leiste „Name · Übersicht · Abmelden“ (shared/runtime.ts) */
/* Fußzeile aller Apps (runtime.ts) und Serverseiten (_seite.html): steht am
   Seitenende im Fluss – verdeckt nie Knöpfe, auch nicht auf Handy und iPad */
.jk-fuss {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 18px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  font: 500 12px/1.4 var(--font-body);
  color: var(--color-text-muted);
  text-align: center;
}
.jk-leiste { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.jk-leiste a { color: var(--color-text); text-decoration: none; font-weight: 600; }
.jk-leiste a:hover { color: var(--color-action); }
.jk-version { font-size: 11px; opacity: 0.75; user-select: text; }
@media print { .jk-fuss { display: none; } }
/* Die Apps sind mindestens bildschirmhoch – um die Fußzeile kürzen, damit sie auf
   kurzen Seiten ohne Scrollen sichtbar ist */
body:has(> .jk-fuss) #root > :first-child { min-height: calc(100vh - 48px); }
