/**
 * Humanjava Design Tokens
 *
 * Dark-first theme. Light mode via [data-theme="light"] override.
 * Each app overrides --color-accent for its brand color.
 */

:root {
  /* Brand */
  --color-brand-purple: #3b0c49;
  --color-voxrelay-blue: #2563eb;

  /* Accent — VoxRelay blue */
  --color-accent: #2563eb;
  --color-accent-hover: #3b82f6;
  --color-accent-muted: rgba(37, 99, 235, 0.08);

  /* Semantic */
  --color-danger: #f87171;
  --color-danger-bg: rgba(248, 113, 113, 0.1);
  --color-warning: #fbbf24;
  --color-warning-bg: rgba(251, 191, 36, 0.1);
  --color-success: #34d399;
  --color-success-bg: rgba(52, 211, 153, 0.1);
  --color-info: #60a5fa;
  --color-info-bg: rgba(96, 165, 250, 0.1);

  /* Surface (dark default) */
  --color-bg: #0f172a;
  --color-surface: #1e293b;
  --color-surface-raised: #263548;
  --color-border: #334155;
  --color-border-subtle: #1e293b;

  /* Text */
  --color-text: #e2e8f0;
  --color-text-muted: #94a3b8;
  --color-text-on-accent: #ffffff;

  /* Input */
  --color-input-bg: #1e293b;
  --color-input-border: #475569;
  --color-input-focus-border: var(--color-accent);
  --color-input-focus-shadow: rgba(37, 99, 235, 0.2);

  /* Sidebar / nav */
  --color-sidebar-bg: #1e293b;
  --color-sidebar-text: #94a3b8;
  --color-sidebar-active-bg: var(--color-accent-muted);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;

  /* Border radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.3);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
}

/* Light theme override */
[data-theme="light"] {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-raised: #f1f5f9;
  --color-border: #e2e8f0;
  --color-border-subtle: #f1f5f9;

  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-text-on-accent: #ffffff;

  --color-input-bg: #ffffff;
  --color-input-border: #cbd5e1;
  --color-input-focus-shadow: rgba(37, 99, 235, 0.15);

  --color-sidebar-bg: #f8fafc;
  --color-sidebar-text: #64748b;

  --color-danger-bg: rgba(248, 113, 113, 0.08);
  --color-warning-bg: rgba(251, 191, 36, 0.08);
  --color-success-bg: rgba(52, 211, 153, 0.08);
  --color-info-bg: rgba(96, 165, 250, 0.08);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0s;
    --transition-normal: 0s;
  }
}
