/* ══════════════════════════════════════════════════
   tokens.css — Design Token LabelFixer
   Design System: Brick Palette v01 (DS §1-§6)
   Riutilizzabile tra progetti: contiene SOLO variabili
   CSS, nessuna regola di stile.
   ══════════════════════════════════════════════════ */

/* ── Light theme (default) ───────────────────────── */
:root {
  /* Colori — DS §1.1 Brick Colors */
  --color-primary:       #2563EB;   /* Blue Brick — CTA, toggle ON, pill attiva, slider thumb */
  --color-primary-light: #DBEAFE;   /* Blue-100 — sfondo leggero */
  --color-success:       #16A34A;   /* Green Brick — toast successo, privacy badge icon */
  --color-success-light: #DCFCE7;   /* Green-100 — info-box success */
  --color-warning:       #D97706;   /* Amber — warning */
  --color-error:         #DC2626;   /* Red Brick — errori, reset, grazie button */
  --color-error-light:   #FEE2E2;   /* Red-100 — toast errore bg chiaro */

  /* DS §1.2 — Scala Gray (SENZA sottotoni blu) */
  --color-bg:              #F9FAFB; /* Gray-50 — sfondo pagina, aree recesse */
  --color-surface:         #FFFFFF; /* sfondo card, sidebar, drop zone */
  --color-surface-subtle:  #F3F4F6; /* Gray-100 — pulsante secondario, pill group bg */
  --color-border:          #D1D5DB; /* Gray-300 — separatori, bordi card */
  --color-border-hover:    #9CA3AF; /* Gray-400 — bordo hover, drop zone hero */
  --color-text-muted:      #4B5563; /* Gray-600 — placeholder, hint, copyright */
  --color-text-secondary:  #1F2937; /* Gray-800 — quasi primario */
  --color-text:            #111827; /* Gray-900 — testo principale */

  /* Tipografia — DS §3 */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
  --font-size-xs:   0.75rem;   /* 12px */
  --font-size-sm:   0.875rem;  /* 14px */
  --font-size-base: 1rem;      /* 16px */
  --font-size-lg:   1.125rem;  /* 18px */
  --font-size-xl:   1.25rem;   /* 20px */
  --font-size-2xl:  1.5rem;    /* 24px */
  --font-size-3xl:  1.875rem;  /* 30px */

  /* Spacing — DS §2 (8pt grid) */
  --space-xs:  4px;   /* 0.5x */
  --space-sm:  8px;   /* 1x   */
  --space-md:  16px;  /* 2x   */
  --space-lg:  24px;  /* 3x   */
  --space-xl:  32px;  /* 4x   */
  --space-2xl: 48px;  /* 6x   */

  /* Border radius — DS §5 */
  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-full: 9999px;

  /* Ombre — DS §6 */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.08);

  /* Transizioni */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;

  /* A4 ratio (per anteprima) */
  --a4-ratio: 1.4142;

  /* Layout altezze — DS §7 */
  --navbar-height: 48px;  /* DS §7.1 */
  --footer-height: 40px;  /* DS §7.2 */
}

/* ── Dark theme — DS §1.3 ─────────────────────── */
[data-theme="dark"] {
  --color-primary:      #3B82F6;  /* Blue-500 (schiarito di un livello) */
  --color-primary-light: #1E3A5F;
  --color-success:      #22C55E;  /* Green-500 */
  --color-success-light: #14532D;
  --color-warning:      #F59E0B;
  --color-error:        #EF4444;  /* Red-500 */
  --color-error-light:  #7F1D1D;

  --color-bg:              #111827; /* Gray-900 */
  --color-surface:         #1F2937; /* Gray-800 */
  --color-surface-subtle:  #374151; /* Gray-700 */
  --color-border:          #4B5563; /* Gray-600 */
  --color-border-hover:    #6B7280; /* Gray-500 */
  --color-text-muted:      #9CA3AF; /* Gray-400 */
  --color-text-secondary:  #E5E7EB; /* Gray-200 */
  --color-text:            #F9FAFB; /* Gray-50 */

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.4);
}
