/*
 * Fischerei Bestellportal – Design-Tokens
 *
 * Zentraler Ort fuer alle Design-Entscheidungen: Farben, Abstaende,
 * Radien, Schatten, Schriften, Uebergaenge.
 *
 * Aufbau:
 *   :root              = Standard-Theme (Dark, wie im PDF-Flipbook)
 *   [data-theme="light"] = helles Theme
 *
 * Die Werte werden NUR hier gepflegt. Alle Komponenten
 * (components.css) und das Layout (layout.css) greifen ausschliesslich
 * ueber var(--token) darauf zu. Dadurch genuegt ein Wechsel des
 * data-theme-Attributs am <html>, um die ganze Seite umzuschalten.
 *
 * Primärfarbe ist Blau (RGB 0,34,158 = #00229e). Im Dark Mode wird ein
 * hellerer Blauton (#4d6eff) benutzt, weil dunkles Blau auf dunklem
 * Grund zu wenig Kontrast haette.
 */

:root {
  /* ---------- Farben: Flaechen & Text (Dark = Standard) ---------- */
  --color-bg: #0f1116;
  --color-bg-soft: #161922;
  --color-panel: #1b1f29;
  --color-panel-2: #212631;
  --color-line: rgba(255, 255, 255, 0.08);
  --color-line-strong: rgba(255, 255, 255, 0.16);
  --color-text: #e8eaf1;
  --color-text-strong: #ffffff;
  --color-muted: #9aa3b3;

  /* ---------- Farben: Akzent (Blau) ---------- */
  --color-accent: #4d6eff;
  --color-accent-hover: #6d87ff;
  --color-accent-soft: rgba(77, 110, 255, 0.18);
  --color-accent-line: rgba(77, 110, 255, 0.4);
  --color-accent-contrast: #000000;

  /* ---------- Farben: Status ---------- */
  --color-gold: #d8b45c;
  --color-danger: #ff6b6b;
  --color-danger-soft: rgba(255, 107, 107, 0.14);
  --color-success: #4fd18b;
  --color-success-soft: rgba(79, 209, 139, 0.14);
  --color-warning: #f5b301;
  --color-warning-soft: rgba(245, 179, 1, 0.14);

  /* ---------- Radien ---------- */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-pill: 999px;

  /* ---------- Schatten ---------- */
  --shadow-sm: 0 4px 18px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.55);

  /* ---------- Abstaende ---------- */
  --space-1: 4px;
  --space-6: 24px;

  /* ---------- Bedienelement-Groessen ---------- */
  --control-h: 38px;

  /* ---------- Schriften ---------- */
  --font-ui: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --font-size: 17px;
  --line-height: 1.6;

  /* ---------- Uebergaenge ---------- */
  --transition-fast: 150ms ease;
  --transition: 250ms ease;

  /* ---------- Ebenen (z-index) ---------- */
  --z-header: 20;
  --z-dropdown: 45;
  --z-modal: 100;
  --z-toast: 120;

  /* ---------- Seitenrand ---------- */
  --wrap-pad: 18px;
  --wrap-max: 1180px;

  /* ---------- Fokus-Ring ---------- */
  --focus-ring: 0 0 0 3px var(--color-accent-soft);
}

/* ============================================================
   Helles Theme
   ============================================================ */

[data-theme="light"] {
  /* ---------- Flaechen & Text ---------- */
  --color-bg: #f6f7f4;
  --color-bg-soft: #eef0ec;
  --color-panel: #ffffff;
  --color-panel-2: #f0f1ef;
  --color-line: #d9ded9;
  --color-line-strong: #c3cac4;
  --color-text: #1f2d24;
  --color-text-strong: #101a13;
  --color-muted: #5c6660;

  /* ---------- Akzent (Blau RGB 0,34,158) ---------- */
  --color-accent: #00229e;
  --color-accent-hover: #002dd5;
  --color-accent-soft: rgba(0, 34, 158, 0.12);
  --color-accent-line: rgba(0, 34, 158, 0.4);
  --color-accent-contrast: #ffffff;

  /* ---------- Status ---------- */
  --color-gold: #8a6d1f;
  --color-danger: #a32b1f;
  --color-danger-soft: rgba(163, 43, 31, 0.1);
  --color-success: #1f7a4d;
  --color-success-soft: rgba(31, 122, 77, 0.12);
  --color-warning: #8a6d1f;
  --color-warning-soft: rgba(138, 109, 31, 0.14);

  /* ---------- Schatten (weicher im Hellen) ---------- */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 26px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.18);

  --focus-ring: 0 0 0 3px var(--color-accent-soft);
}

/* Sehr schmale Geraete (kleine iPhones, Splitview-Fenster). */
@media (max-width: 360px) {
  :root {
    --wrap-pad: 14px;
  }
}
