/* 
 * Design Tokens
 * CSS custom properties for the entire app.
 * Light theme (default) and dark theme.
 */

:root {
  /* Surfaces */
  --surface-primary: #ffffff;
  --surface-secondary: #f5f5f5;
  --surface-tertiary: #ebebeb;
  --surface-elevated: #ffffff;
  --surface-overlay: rgba(0, 0, 0, 0.5);
  
  /* Text */
  --text-primary: #222222;
  --text-secondary: #555555;
  --text-muted: #888888;
  --text-disabled: #bbbbbb;
  --text-link: #1a0dab;        /* Google/DDG search result blue */
  --text-link-visited: #681da8;
  --text-url: #006621;          /* Green URL like DDG */
  
  /* Accent */
  --accent-primary: #3969ef;    /* Primary action blue */
  --accent-primary-hover: #2b56cc;
  --accent-primary-text: #ffffff;
  --accent-danger: #de4848;
  --accent-danger-hover: #c53030;
  --accent-success: #34a853;
  --accent-warning: #f5a623;
  
  /* Borders */
  --border-default: #dddddd;
  --border-subtle: #eeeeee;
  --border-strong: #cccccc;
  --border-focus: #3969ef;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-xl: 0 8px 32px rgba(0,0,0,0.16);
  
  /* Spacing scale (4px base) */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  
  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
  
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 36px;
  
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;
  
  --tracking-tight: -0.015em;
  --tracking-normal: 0;
  --tracking-wide: 0.02em;
  
  /* Font weights */
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  
  /* Transitions */
  --transition-fast: 100ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 350ms ease;
  
  /* Z-index scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal-backdrop: 300;
  --z-modal: 400;
  --z-toast: 500;
  --z-tooltip: 600;
  
  /* Layout */
  --content-max-width: 780px;     /* Search results max width like DDG */
  --sidebar-width: 340px;          /* Right sidebar for Wikipedia cards */
  --header-height: 56px;
  --search-bar-height: 44px;
}

/* Dark theme */
[data-theme="dark"], .dark {
  --surface-primary: #1c1c1e;
  --surface-secondary: #2c2c2e;
  --surface-tertiary: #3a3a3c;
  --surface-elevated: #252528;
  --surface-overlay: rgba(0, 0, 0, 0.7);
  
  --text-primary: #e5e5e7;
  --text-secondary: #a1a1a6;
  --text-muted: #6e6e73;
  --text-disabled: #48484a;
  --text-link: #96b5ff;
  --text-link-visited: #c9a0ff;
  --text-url: #78d97c;
  
  --accent-primary: #5b8def;
  --accent-primary-hover: #7ba3f7;
  --accent-primary-text: #ffffff;
  --accent-danger: #ff6b6b;
  --accent-danger-hover: #ff4444;
  --accent-success: #4ade80;
  --accent-warning: #fbbf24;
  
  --border-default: #38383a;
  --border-subtle: #2c2c2e;
  --border-strong: #48484a;
  --border-focus: #5b8def;
  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-xl: 0 8px 32px rgba(0,0,0,0.6);
}
