/* ============================================================
   css/themes/dark.css
   Zolto v8.1.0 — Dark Theme Token Overrides
   ============================================================
   Purpose:
   - Override CSS custom properties for the Dark theme
   - This is the default/baseline theme — values here match
     the defaults declared in variables.css
   - Explicitly listed so the theme can be forked cleanly
   - Only :root / [data-theme] selectors — no component rules
   ============================================================ */

[data-theme="dark"],
:root {

  /* ── Accent ── */
  --accent-primary:          #6366f1;
  --accent-primary-hover:    #818cf8;
  --accent-primary-active:   #4f46e5;
  --accent-primary-subtle:   rgba(99, 102, 241, 0.12);
  --accent-primary-border:   rgba(99, 102, 241, 0.35);

  --accent-secondary:        #8b5cf6;
  --accent-secondary-hover:  #a78bfa;
  --accent-secondary-subtle: rgba(139, 92, 246, 0.12);

  --accent-tertiary:         #ec4899;
  --accent-tertiary-hover:   #f472b6;
  --accent-tertiary-subtle:  rgba(236, 72, 153, 0.12);

  /* ── Background ── */
  --bg-app:          #0a0a0f;
  --bg-canvas:       #111118;
  --bg-panel:        #16161f;
  --bg-surface:      #1c1c28;
  --bg-surface-2:    #222233;
  --bg-surface-3:    #2a2a3d;
  --bg-overlay:      rgba(0, 0, 0, 0.72);
  --bg-tooltip:      #2a2a3d;
  --bg-dropdown:     #1c1c28;
  --bg-input:        #16161f;
  --bg-code:         #0f0f18;
  --bg-selection:    rgba(99, 102, 241, 0.22);

  /* ── Surface ── */
  --surface-0:          #111118;
  --surface-1:          #1c1c28;
  --surface-2:          #222233;
  --surface-3:          #2a2a3d;
  --surface-glass:      rgba(28, 28, 40, 0.72);
  --surface-glass-blur: 12px;

  /* ── Text ── */
  --text-main:    #f1f5f9;
  --text-mute:    #94a3b8;
  --text-faint:   #475569;
  --text-invert:  #0f172a;
  --text-link:    #818cf8;
  --text-link-hover: #a5b4fc;
  --text-code:    #e2e8f0;
  --text-heading: #f8fafc;
  --text-accent:  #6366f1;
  --text-error:   #fca5a5;
  --text-success: #86efac;
  --text-warning: #fcd34d;

  /* ── Border ── */
  --border-faint:   rgba(255, 255, 255, 0.04);
  --border-subtle:  rgba(255, 255, 255, 0.08);
  --border-normal:  rgba(255, 255, 255, 0.12);
  --border-heavy:   rgba(255, 255, 255, 0.20);
  --border-accent:  rgba(99, 102, 241, 0.35);
  --border-focus:   #6366f1;
  --border-error:   rgba(239, 68, 68, 0.50);
  --border-success: rgba(34, 197, 94, 0.40);
  --border-warning: rgba(245, 158, 11, 0.40);

  /* ── Intent ── */
  --intent-primary:        #6366f1;
  --intent-primary-bg:     rgba(99, 102, 241, 0.10);
  --intent-primary-border: rgba(99, 102, 241, 0.30);
  --intent-primary-text:   #a5b4fc;

  --intent-success:        #22c55e;
  --intent-success-bg:     rgba(34, 197, 94, 0.10);
  --intent-success-border: rgba(34, 197, 94, 0.30);
  --intent-success-text:   #86efac;

  --intent-warning:        #f59e0b;
  --intent-warning-bg:     rgba(245, 158, 11, 0.10);
  --intent-warning-border: rgba(245, 158, 11, 0.30);
  --intent-warning-text:   #fcd34d;

  --intent-danger:         #ef4444;
  --intent-danger-bg:      rgba(239, 68, 68, 0.10);
  --intent-danger-border:  rgba(239, 68, 68, 0.30);
  --intent-danger-text:    #fca5a5;

  --intent-info:           #0ea5e9;
  --intent-info-bg:        rgba(14, 165, 233, 0.10);
  --intent-info-border:    rgba(14, 165, 233, 0.30);
  --intent-info-text:      #7dd3fc;

  --intent-neutral:        #64748b;
  --intent-neutral-bg:     rgba(100, 116, 139, 0.10);
  --intent-neutral-border: rgba(100, 116, 139, 0.30);
  --intent-neutral-text:   #94a3b8;

  /* ── Syntax ── */
  --syntax-bg:          #0f0f18;
  --syntax-text:        #e2e8f0;
  --syntax-comment:     #64748b;
  --syntax-keyword:     #818cf8;
  --syntax-string:      #86efac;
  --syntax-number:      #fcd34d;
  --syntax-function:    #7dd3fc;
  --syntax-class:       #f9a8d4;
  --syntax-operator:    #f1f5f9;
  --syntax-punctuation: #94a3b8;
  --syntax-property:    #a5b4fc;
  --syntax-constant:    #fca5a5;
  --syntax-variable:    #e2e8f0;
  --syntax-tag:         #818cf8;
  --syntax-attr:        #fcd34d;
  --syntax-line-hl:     rgba(99, 102, 241, 0.12);
  --syntax-line-add:    rgba(34, 197, 94,  0.10);
  --syntax-line-del:    rgba(239, 68, 68,  0.10);

  /* ── Scrollbar ── */
  --scrollbar-thumb:       rgba(255, 255, 255, 0.12);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.22);

  /* ── Focus ── */
  --focus-ring-color: #6366f1;

  /* ── Topbar ── */
  --topbar-bg:     rgba(10, 10, 15, 0.92);
  --topbar-border: rgba(255, 255, 255, 0.07);

  /* ── Diagram ── */
  --diagram-bg:         #111118;
  --diagram-grid-color: rgba(255, 255, 255, 0.03);

  /* ── Math ── */
  --math-block-bg:    rgba(28, 28, 40, 0.6);
  --math-block-border: rgba(255, 255, 255, 0.07);
  --math-plot-bg:      #0f0f18;
  --math-plot-grid:    rgba(255, 255, 255, 0.04);

  /* ── Card ── */
  --card-bg:     #1c1c28;
  --card-border: rgba(255, 255, 255, 0.08);
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.20);

  /* ── Editor ── */
  --editor-bg:       #111118;
  --editor-text:     #f1f5f9;
  --editor-caret:    #6366f1;
  --editor-line-hl:  rgba(255, 255, 255, 0.025);

  /* ── Preview ── */
  --preview-bg:              #111118;
  --preview-code-bg:         #0f0f18;
  --preview-blockquote-border: #6366f1;
  --preview-hr:              rgba(255, 255, 255, 0.08);
  --preview-table-border:    rgba(255, 255, 255, 0.08);
  --preview-table-header-bg: #1c1c28;
  --preview-table-stripe:    rgba(255, 255, 255, 0.02);

  /* ── Sidebar ── */
  --sidebar-bg:          #16161f;
  --sidebar-border:      rgba(255, 255, 255, 0.06);
  --sidebar-text:        #64748b;
  --sidebar-text-active: #f1f5f9;
  --sidebar-hover-bg:    rgba(255, 255, 255, 0.04);
  --sidebar-active-bg:   rgba(255, 255, 255, 0.07);

  /* ── Toolbar ── */
  --toolbar-bg:     #16161f;
  --toolbar-border: rgba(255, 255, 255, 0.06);

  /* ── Palette ── */
  --palette-bg:     #1c1c28;
  --palette-border: rgba(255, 255, 255, 0.12);
  --palette-shadow:
    0 25px 50px rgba(0, 0, 0, 0.60),
    0 0 0 1px rgba(255, 255, 255, 0.06);

  /* ── Dropdown ── */
  --dropdown-bg:     #1c1c28;
  --dropdown-border: rgba(255, 255, 255, 0.10);

  /* ── Toast ── */
  --toast-bg:     #222233;
  --toast-border: rgba(255, 255, 255, 0.10);
}
