/* =====================================================
   TinyToolWeb - tokens.css
   Design tokens shared by EVERY page (tools, home, static pages, errors).
   Change colours, radii, spacing and shadows HERE only.
   Loaded before all other stylesheets (build.py adds it automatically).
   ===================================================== */

:root {
  /* Brand */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #3b82f6;

  /* Status */
  --success: #10b981;
  --success-hover: #059669;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  /* Status: darker shades (text and borders on light backgrounds) */
  --success-dark: #16a34a;
  --warning-dark: #d97706;
  --error-dark: #dc2626;

  /* Same colours as R, G, B for transparent tints: rgba(var(--primary-rgb), 0.1).
     If you change a colour above, change its -rgb twin too. */
  --primary-rgb: 37, 99, 235;
  --primary-light-rgb: 59, 130, 246;
  --success-rgb: 16, 185, 129;
  --warning-rgb: 245, 158, 11;
  --error-rgb: 239, 68, 68;
  --error-dark-rgb: 220, 38, 38;

  /* Text (Light) */
  --text-dark: #1f2937;
  --text-medium: #4b5563;
  --text-light: #6b7280;
  --text-lighter: #9ca3af;

  /* Surfaces (Light) */
  --bg-body: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f9fafb;
  --bg-light: #f9fafb;
  --bg-lighter: #f3f4f6;

  /* Borders */
  --border: #e5e7eb;
  --border-dark: #d1d5db;
  --border-focus: #2563eb;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px 0 rgba(0,0,0,0.06);
  --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);

  /* Gradient */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 200ms ease-in-out;
  --transition-slow: 300ms ease-in-out;
}

/* Dark mode (OLED) */
.dark,
[data-theme="dark"] {
  --text-dark: #ffffff;
  --text-medium: #e5e7eb;
  --text-light: #a1a1aa;
  --text-lighter: #71717a;

  --bg-body: #000000;
  --bg-surface: #0a0a0a;
  --bg-surface-hover: #171717;
  --bg-light: #0a0a0a;
  --bg-lighter: #171717;

  --border: #262626;
  --border-dark: #404040;
  --border-focus: #3b82f6;

  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.5);
  --shadow: 0 2px 4px 0 rgba(0,0,0,0.6), 0 1px 2px 0 rgba(0,0,0,0.4);
  --shadow-md: 0 4px 8px -1px rgba(0,0,0,0.6), 0 2px 4px -1px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 20px -3px rgba(0,0,0,0.7), 0 4px 6px -2px rgba(0,0,0,0.5);

  --gradient-primary: linear-gradient(135deg, #4c51bf 0%, #6b46c1 100%);
}
