/* ==========================================================================
   WebUtilities Design System - Themes (CSS Custom Properties)
   Accessible contrast (WCAG AA/AAA), sleek modern palettes.
   ========================================================================== */

:root {
  /* Common Brand Tokens */
  --color-brand-primary: #6366f1;
  --color-brand-primary-hover: #4f46e5;
  --color-brand-primary-light: rgba(99, 102, 241, 0.12);
  --color-brand-secondary: #06b6d4;
  --color-brand-accent: #8b5cf6;
  --color-brand-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);

  /* Border Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, Monaco, Consolas, 'Liberation Mono', monospace;

  /* Transition Speeds */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Elevation Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* --------------------------------------------------------------------------
   LIGHT THEME (Default)
   -------------------------------------------------------------------------- */
:root,
[data-theme="light"] {
  --bg-canvas: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-raised: #ffffff;
  --bg-surface-subtle: #f1f5f9;
  --bg-surface-hover: #e2e8f0;
  --bg-surface-active: #cbd5e1;

  --border-color: #e2e8f0;
  --border-subtle: #edf2f7;
  --border-focus: #6366f1;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --text-inverse: #ffffff;

  --badge-bg: #e0e7ff;
  --badge-text: #4338ca;

  /* Semantic Feedback */
  --color-success: #10b981;
  --color-success-bg: #ecfdf5;
  --color-success-text: #065f46;

  --color-danger: #ef4444;
  --color-danger-bg: #fef2f2;
  --color-danger-text: #991b1b;

  --color-warning: #f59e0b;
  --color-warning-bg: #fffbeb;
  --color-warning-text: #92400e;

  --color-info: #0ea5e9;
  --color-info-bg: #f0f9ff;
  --color-info-text: #0369a1;

  /* Header & Navigation */
  --nav-bg: #ffffff;
  --nav-border: #e2e8f0;

  /* Code Blocks */
  --code-bg: #0f172a;
  --code-text: #e2e8f0;

  /* Diff colors */
  --diff-add-bg: #dcfce7;
  --diff-add-text: #166534;
  --diff-del-bg: #fee2e2;
  --diff-del-text: #991b1b;
}

/* --------------------------------------------------------------------------
   DARK THEME
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
  --bg-canvas: #090d16;
  --bg-surface: #111827;
  --bg-surface-raised: #1f2937;
  --bg-surface-subtle: #1a2234;
  --bg-surface-hover: #26334d;
  --bg-surface-active: #314163;

  --border-color: #243048;
  --border-subtle: #1a2438;
  --border-focus: #818cf8;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --text-inverse: #090d16;

  --badge-bg: rgba(99, 102, 241, 0.2);
  --badge-text: #a5b4fc;

  /* Semantic Feedback */
  --color-success: #10b981;
  --color-success-bg: rgba(16, 185, 129, 0.15);
  --color-success-text: #34d399;

  --color-danger: #f87171;
  --color-danger-bg: rgba(239, 68, 68, 0.15);
  --color-danger-text: #fca5a5;

  --color-warning: #fbbf24;
  --color-warning-bg: rgba(245, 158, 11, 0.15);
  --color-warning-text: #fcd34d;

  --color-info: #38bdf8;
  --color-info-bg: rgba(14, 165, 233, 0.15);
  --color-info-text: #7dd3fc;

  /* Header & Navigation */
  --nav-bg: #090d16;
  --nav-border: #243048;

  /* Code Blocks */
  --code-bg: #030712;
  --code-text: #e2e8f0;

  /* Diff colors */
  --diff-add-bg: rgba(16, 185, 129, 0.2);
  --diff-add-text: #6ee7b7;
  --diff-del-bg: rgba(239, 68, 68, 0.2);
  --diff-del-text: #fca5a5;
}
