/* ============================================================
   vaali – Design Tokens
   Generiert aus: vaali App Styleguide (Claude Design)
   Gilt für: Wähler-Kiosk, Wahlleitung, Superadmin
   ============================================================ */

/* Fonts via Google Fonts – in index.html im <head> einbinden:
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap" rel="stylesheet">
*/

:root {

  /* ----------------------------------------------------------
     Farben · Marke & Aktion
     ---------------------------------------------------------- */
  --color-ink:          #232450;  /* Primärbuttons, Kopfzeilen, Titel */
  --color-primary:      #6B4BC4;  /* Akzente, aktive Zustände, Links */
  --color-strong:       #3D2A7A;  /* Hover, betonte Flächen */
  --color-lilac-tint:   #ECE6FA;  /* Auswahl-Hintergrund, Icon-Flächen */

  /* ----------------------------------------------------------
     Farben · Flächen & Text
     ---------------------------------------------------------- */
  --color-bg:           #F2EEE7;  /* Seitenfläche / App-Hintergrund */
  --color-surface:      #FFFFFF;  /* Karten, Eingaben, Dialoge */
  --color-border:       #E7E1D7;  /* Standard-Rahmen */
  --color-border-strong:#D8CFE8;  /* Betonter Rahmen, Hover */
  --color-text:         #232450;  /* Fließtext, Überschriften */
  --color-muted:        #5C5478;  /* Sekundärtext, Labels */
  --color-subtle:       #8478A0;  /* Hints, Platzhalter */

  /* ----------------------------------------------------------
     Farben · Status & Semantik
     ---------------------------------------------------------- */
  --color-success:      #1F8A5B;  /* Wahlgang läuft / gültig */
  --color-success-tint: #E9F7EF;
  --color-warning:      #B07D1A;  /* 2. Wahlgang / Achtung */
  --color-warning-tint: #FBF1DC;
  --color-error:        #C2415A;  /* Fehler / ungültig / doppelt */
  --color-error-tint:   #FBE9ED;
  --color-neutral:      #8478A0;  /* Gesperrt / geschlossen / inaktiv */
  --color-neutral-tint: #EFEAF2;

  /* ----------------------------------------------------------
     Typografie
     ---------------------------------------------------------- */
  --font-ui:            'Quicksand', sans-serif;
  --font-mono:          'Space Mono', monospace;

  /* Schriftgrößen */
  --text-display:       38px;   /* Quicksand 700, ls -.025em · Screen-Titel */
  --text-h1:            28px;   /* Quicksand 700, ls -.01em · Bereichstitel */
  --text-h2:            23px;   /* Quicksand 700 · Karten-/Sektionstitel */
  --text-h3:            19px;   /* Quicksand 600 · Listen-/Zeilentitel */
  --text-body-l:        17px;   /* Quicksand 500 · Kiosk, hervorgehoben */
  --text-body:          15px;   /* Quicksand 500 · Standardtext, Formulare */
  --text-small:         13px;   /* Quicksand 500 · Hilfetext, Meta */
  --text-caption:       11px;   /* Quicksand 600, ls .14em, uppercase · Labels */
  --text-mono:          18px;   /* Space Mono 700 · Token, Codes, Zahlen */

  /* ----------------------------------------------------------
     Abstands-Raster · 4px-Basis
     ---------------------------------------------------------- */
  --space-xs:    4px;
  --space-sm:    8px;
  --space-md:   12px;
  --space-lg:   16px;
  --space-xl:   24px;
  --space-2xl:  32px;
  --space-3xl:  48px;
  --space-4xl:  64px;

  /* ----------------------------------------------------------
     Radien
     ---------------------------------------------------------- */
  --radius-sm:   8px;   /* Buttons, Inputs, Chips */
  --radius-md:  12px;   /* Karten, Dialoge */
  --radius-lg:  16px;   /* große Container */
  --radius-pill: 999px; /* Tags, Badges */

  /* ----------------------------------------------------------
     Elevation / Schatten
     ---------------------------------------------------------- */
  --shadow-sm:  0 1px 3px rgba(35, 36, 80, 0.08);
  --shadow-md:  0 4px 12px rgba(35, 36, 80, 0.10);
  --shadow-lg:  0 8px 24px rgba(35, 36, 80, 0.12);
}


/* ============================================================
   Basis-Reset & Body
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family:        var(--font-ui);
  font-size:          var(--text-body);
  font-weight:        500;
  color:              var(--color-text);
  background:         var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ============================================================
   Typografie-Helfer
   ============================================================ */
.vaali-display {
  font-family:  var(--font-ui);
  font-size:    var(--text-display);
  font-weight:  700;
  letter-spacing: -.025em;
  color:        var(--color-text);
}

.vaali-h1 {
  font-family:  var(--font-ui);
  font-size:    var(--text-h1);
  font-weight:  700;
  letter-spacing: -.01em;
  color:        var(--color-text);
}

.vaali-h2 {
  font-family:  var(--font-ui);
  font-size:    var(--text-h2);
  font-weight:  700;
  color:        var(--color-text);
}

.vaali-h3 {
  font-family:  var(--font-ui);
  font-size:    var(--text-h3);
  font-weight:  600;
  color:        var(--color-text);
}

.vaali-body-l {
  font-family:  var(--font-ui);
  font-size:    var(--text-body-l);
  font-weight:  500;
}

.vaali-caption {
  font-family:    var(--font-ui);
  font-size:      var(--text-caption);
  font-weight:    600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color:          var(--color-muted);
}

/* Space Mono – Tagestoken, Kontrollcodes, Stimmzahlen */
.vaali-mono,
.vaali-token,
.vaali-code {
  font-family:  var(--font-mono);
  font-weight:  700;
  font-size:    var(--text-mono);
  letter-spacing: .02em;
  color:        var(--color-text);
}


/* ============================================================
   Komponenten
   ============================================================ */

/* Karte / Surface */
.vaali-card {
  background:    var(--color-surface);
  border:        1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding:       var(--space-xl);
  box-shadow:    var(--shadow-sm);
}

/* Primär-Button */
.vaali-btn {
  display:        inline-flex;
  align-items:    center;
  justify-content: center;
  gap:            var(--space-sm);
  font-family:    var(--font-ui);
  font-size:      var(--text-body);
  font-weight:    600;
  padding:        var(--space-md) var(--space-xl);
  border-radius:  var(--radius-sm);
  border:         none;
  cursor:         pointer;
  transition:     background .15s ease, opacity .15s ease;
}

.vaali-btn-primary {
  background: var(--color-ink);
  color:      #ffffff;
}
.vaali-btn-primary:hover {
  background: var(--color-strong);
}

.vaali-btn-secondary {
  background: var(--color-lilac-tint);
  color:      var(--color-primary);
}
.vaali-btn-secondary:hover {
  background: var(--color-border-strong);
}

.vaali-btn:disabled {
  opacity: 0.45;
  cursor:  not-allowed;
}

/* Status-Badges */
.vaali-badge {
  display:        inline-flex;
  align-items:    center;
  gap:            var(--space-xs);
  font-family:    var(--font-ui);
  font-size:      var(--text-small);
  font-weight:    600;
  padding:        3px var(--space-sm);
  border-radius:  var(--radius-pill);
}

.vaali-badge-success {
  background: var(--color-success-tint);
  color:      var(--color-success);
}
.vaali-badge-warning {
  background: var(--color-warning-tint);
  color:      var(--color-warning);
}
.vaali-badge-error {
  background: var(--color-error-tint);
  color:      var(--color-error);
}
.vaali-badge-neutral {
  background: var(--color-neutral-tint);
  color:      var(--color-neutral);
}

/* Input-Felder */
.vaali-input {
  font-family:    var(--font-ui);
  font-size:      var(--text-body);
  font-weight:    500;
  color:          var(--color-text);
  background:     var(--color-surface);
  border:         1px solid var(--color-border);
  border-radius:  var(--radius-sm);
  padding:        var(--space-md) var(--space-lg);
  width:          100%;
  transition:     border-color .15s ease;
  outline:        none;
}
.vaali-input:focus {
  border-color: var(--color-primary);
  box-shadow:   0 0 0 3px rgba(107, 75, 196, 0.12);
}
.vaali-input::placeholder {
  color: var(--color-subtle);
}

/* Token-Eingabe (Kiosk – großes Feld) */
.vaali-token-input {
  font-family:    var(--font-mono);
  font-size:      24px;
  font-weight:    700;
  letter-spacing: .1em;
  text-align:     center;
  text-transform: uppercase;
}
