/* VetConnect Design Tokens
   Source: analysis/12-design-direction.md
   Colors, spacing, typography, shadows, borders */

:root {
  /* === PRIMARY PALETTE === */
  --color-primary: #1B7A4A;
  --color-primary-dark: #0D5C34;
  --color-primary-light: #4CAF7D;
  --color-primary-50: #ECFDF5;
  --color-primary-100: #D1FAE5;
  --color-primary-200: #A7F3D0;

  /* === SECONDARY === */
  --color-secondary: #1565C0;
  --color-secondary-dark: #0D47A1;
  --color-secondary-light: #42A5F5;

  /* === SEMANTIC === */
  --color-accent: #F59E0B;
  --color-accent-dark: #B45309;
  --color-error: #DC2626;
  --color-error-dark: #B91C1C;
  --color-error-light: #FEE2E2;
  --color-success: #16A34A;
  --color-success-light: #DCFCE7;
  --color-warning: #F59E0B;
  --color-warning-light: #FEF3C7;
  --color-info: #1565C0;
  --color-info-light: #DBEAFE;

  /* === SEVERITY === */
  --severity-green: #16A34A;
  --severity-green-bg: #DCFCE7;
  --severity-orange: #F59E0B;
  --severity-orange-bg: #FEF3C7;
  --severity-red: #DC2626;
  --severity-red-bg: #FEE2E2;

  /* === NEUTRALS === */
  --color-neutral-900: #1A1A2E;
  --color-neutral-800: #2D2D3F;
  --color-neutral-700: #4A4A5A;
  --color-neutral-600: #6B7280;
  --color-neutral-500: #9CA3AF;
  --color-neutral-400: #D1D5DB;
  --color-neutral-300: #E5E7EB;
  --color-neutral-200: #F3F4F6;
  --color-neutral-100: #F9FAFB;

  /* === TEXT (aliases for semantic use) === */
  --text-primary: var(--color-neutral-900);
  --text-secondary: var(--color-neutral-600);
  --color-neutral-50: #FAFBFC;
  --color-surface: #FFFFFF;
  --color-background: #F9FAFB;

  /* === TYPOGRAPHY === */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.8125rem;   /* 13px - caption */
  --text-base: 1rem;      /* 16px - body */
  --text-md: 1.125rem;    /* 18px - card title */
  --text-lg: 1.375rem;    /* 22px - section header */
  --text-xl: 1.75rem;     /* 28px - page title */
  --text-2xl: 2rem;       /* 32px - KPI number */
  --text-3xl: 2.5rem;     /* 40px - hero */

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

  --leading-tight: 1.1;
  --leading-snug: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.6;

  /* === SPACING === */
  --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-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;
  --radius-circle: 50%;

  /* === SHADOWS (Dribbble-inspired layered shadows) === */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.04), 0 8px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.04), 0 12px 24px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 8px 16px rgba(0, 0, 0, 0.06), 0 20px 40px rgba(0, 0, 0, 0.1);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.06), 0 16px 32px rgba(0, 0, 0, 0.08);
  --shadow-focus: 0 0 0 3px rgba(27, 122, 74, 0.25);
  --shadow-error-focus: 0 0 0 3px rgba(220, 38, 38, 0.25);

  /* === TRANSITIONS === */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

  /* === Z-INDEX === */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal-backdrop: 300;
  --z-modal: 400;
  --z-toast: 500;
  --z-tooltip: 600;

  /* === TOUCH TARGETS === */
  --touch-min: 48px;
  --touch-field: 56px;

  /* === LAYOUT === */
  --sidebar-width: 260px;
  --navbar-height: 64px;
  --bottom-nav-height: 64px;
  --content-max-width: 1200px;
}

/* === HIGH CONTRAST FIELD MODE === */
[data-field-mode="true"] {
  --color-primary: #15803D;
  --color-background: #FFFFFF;
  --color-neutral-900: #0F172A;
  --color-error: #B91C1C;
  --color-info: #1E40AF;
  --color-accent: #B45309;
  --color-surface: #F0FDF4;
  --touch-min: 56px;
  --touch-field: 64px;
  --text-base: 1.125rem;
  --font-regular: 500;
}

/* === DARK MODE === */
[data-theme="dark"] {
  --color-background: #111827;
  --color-surface: #1F2937;
  --color-neutral-900: #F3F4F6;
  --color-neutral-800: #E5E7EB;
  --color-neutral-700: #D1D5DB;
  --color-neutral-600: #9CA3AF;
  --color-neutral-300: #374151;
  --color-neutral-200: #1F2937;
  --color-neutral-100: #111827;
  --color-primary: #4ADE80;
  --color-primary-dark: #22C55E;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
}
