/* ==========================================================================
   BioTools - Design Tokens (variables.css)
   Complete design token system for theming, typography, spacing, and layout.
   ========================================================================== */

/* --------------------------------------------------------------------------
   ROOT DEFAULTS (Dark Theme as default)
   -------------------------------------------------------------------------- */
:root {
  /* --- Primary Palette --- */
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --primary-rgb: 99, 102, 241;

  /* --- Accent & Semantic Colors --- */
  --accent: #06b6d4;
  --accent-light: #22d3ee;
  --accent-dark: #0891b2;
  --accent-rgb: 6, 182, 212;

  --success: #10b981;
  --success-light: #34d399;
  --success-dark: #059669;
  --success-rgb: 16, 185, 129;

  --warning: #f59e0b;
  --warning-light: #fbbf24;
  --warning-dark: #d97706;
  --warning-rgb: 245, 158, 11;

  --danger: #ef4444;
  --danger-light: #f87171;
  --danger-dark: #dc2626;
  --danger-rgb: 239, 68, 68;

  --info: #3b82f6;
  --info-light: #60a5fa;
  --info-dark: #2563eb;
  --info-rgb: 59, 130, 246;

  /* --- Typography Scale --- */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  --font-size-xs: 0.6875rem;   /* 11px */
  --font-size-sm: 0.8125rem;   /* 13px */
  --font-size-base: 0.9375rem; /* 15px */
  --font-size-md: 1rem;        /* 16px */
  --font-size-lg: 1.125rem;    /* 18px */
  --font-size-xl: 1.3125rem;   /* 21px */
  --font-size-2xl: 1.625rem;   /* 26px */
  --font-size-3xl: 2.125rem;   /* 34px */

  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;
  --letter-spacing-wider: 0.05em;

  /* --- Spacing Scale (4px base) --- */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */

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

  /* --- Transitions --- */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-spring: 350ms cubic-bezier(0.34, 1.56, 0.64, 1);

  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* --- Z-Index Scale --- */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 150;
  --z-modal: 200;
  --z-toast: 300;
  --z-tooltip: 400;
  --z-overlay: 500;

  /* --- Layout --- */
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 72px;
  --header-height: 64px;
  --content-max-width: 1440px;
  --form-max-width: 720px;

  /* --- Borders --- */
  --border-width: 1px;
  --border-width-thick: 2px;
}

/* --------------------------------------------------------------------------
   DARK THEME (Softened, elegant deep slate, avoiding pure black)
   -------------------------------------------------------------------------- */
[data-theme='dark'] {
  --bg-primary: #1e293b; /* Slate 800 */
  --bg-secondary: #0f172a; /* Slate 900 - Sidebar/Header */
  --bg-tertiary: #334155; /* Slate 700 */
  --bg-elevated: #1e293b;
  --bg-hover: rgba(99, 102, 241, 0.15);
  --bg-active: rgba(99, 102, 241, 0.25);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-strong: rgba(255, 255, 255, 0.15);
  --border-color-focus: var(--primary);

  --shadow-color: 0, 0, 0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.5);

  --glass-bg: rgba(30, 41, 59, 0.75);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 24px;

  --input-bg: rgba(15, 23, 42, 0.6);
  --input-border: rgba(255, 255, 255, 0.12);
  --input-focus-border: var(--primary-light);
  --input-focus-glow: 0 0 0 4px rgba(var(--primary-rgb), 0.25);

  --scrollbar-track: transparent;
  --scrollbar-thumb: rgba(255, 255, 255, 0.1);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.2);

  --selection-bg: rgba(var(--primary-rgb), 0.4);
  --selection-text: #fff;

  --sidebar-bg: #0f172a;
  --sidebar-item-hover: rgba(255, 255, 255, 0.05);
  --sidebar-item-active: rgba(99, 102, 241, 0.15);
  --sidebar-active-border: var(--primary);
  --sidebar-text: #cbd5e1;
  --sidebar-text-hover: #ffffff;

  --header-bg: rgba(15, 23, 42, 0.85);
  --header-border: rgba(255, 255, 255, 0.08);

  --overlay-bg: rgba(15, 23, 42, 0.8);

  --card-bg: #1e293b;
  --card-border: rgba(255, 255, 255, 0.06);
  --card-hover-border: rgba(99, 102, 241, 0.4);
}

/* --------------------------------------------------------------------------
   LIGHT THEME (Ultra Clean, Premium SaaS)
   -------------------------------------------------------------------------- */
[data-theme='light'] {
  --bg-primary: #f8fafc; /* Very light slate for app background */
  --bg-secondary: #ffffff; /* Pure white for cards/panels */
  --bg-tertiary: #f1f5f9; /* Slightly darker slate for hovers/inputs */
  --bg-elevated: #ffffff;
  --bg-hover: #f1f5f9;
  --bg-active: #e2e8f0;

  --text-primary: #0f172a; /* Slate 900 */
  --text-secondary: #475569; /* Slate 600 */
  --text-muted: #94a3b8; /* Slate 400 */
  --text-inverse: #ffffff;

  --border-color: #e2e8f0; /* Slate 200 */
  --border-color-strong: #cbd5e1; /* Slate 300 */
  --border-color-focus: var(--primary);

  --shadow-color: 15, 23, 42;
  --shadow-sm: 0 1px 2px rgba(var(--shadow-color), 0.05);
  --shadow-md: 0 4px 12px rgba(var(--shadow-color), 0.05), 0 1px 3px rgba(var(--shadow-color), 0.03);
  --shadow-lg: 0 12px 32px rgba(var(--shadow-color), 0.08), 0 4px 8px rgba(var(--shadow-color), 0.04);
  --shadow-xl: 0 24px 64px rgba(var(--shadow-color), 0.12), 0 8px 16px rgba(var(--shadow-color), 0.06);

  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: #e2e8f0;
  --glass-blur: 24px;

  --input-bg: #ffffff;
  --input-border: #cbd5e1;
  --input-focus-border: var(--primary);
  --input-focus-glow: 0 0 0 4px rgba(var(--primary-rgb), 0.15);

  --scrollbar-track: transparent;
  --scrollbar-thumb: rgba(148, 163, 184, 0.4);
  --scrollbar-thumb-hover: rgba(148, 163, 184, 0.6);

  --selection-bg: rgba(var(--primary-rgb), 0.15);
  --selection-text: var(--primary-dark);

  --sidebar-bg: #ffffff;
  --sidebar-item-hover: #f1f5f9;
  --sidebar-item-active: #eff6ff; /* Blue 50 */
  --sidebar-active-border: var(--primary);
  --sidebar-text: #475569;
  --sidebar-text-hover: #0f172a;

  --header-bg: rgba(255, 255, 255, 0.9);
  --header-border: #e2e8f0;

  --overlay-bg: rgba(15, 23, 42, 0.4);

  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-hover-border: #cbd5e1;
}
