/* app/static/design-system.css */
/* This file will be the single source of truth for all design tokens */

:root {
  /* === COLORS === */
  /* Primary Brand Colors */
  --brand-primary-50: #f0f9ff;
  --brand-primary-100: #e0f2fe;
  --brand-primary-200: #bae6fd;
  --brand-primary-300: #7dd3fc;
  --brand-primary-400: #38bdf8;
  --brand-primary-500: #0ea5e9;
  --brand-primary-600: #0284c7;
  --brand-primary-700: #0369a1;
  --brand-primary-800: #075985;
  --brand-primary-900: #0c4a6e;

  /* Secondary Colors */
  --brand-secondary-50: #fafafa;
  --brand-secondary-100: #f4f4f5;
  --brand-secondary-200: #e4e4e7;
  --brand-secondary-300: #d4d4d8;
  --brand-secondary-400: #a1a1aa;
  --brand-secondary-500: #71717a;
  --brand-secondary-600: #52525b;
  --brand-secondary-700: #3f3f46;
  --brand-secondary-800: #27272a;
  --brand-secondary-900: #18181b;

  /* Semantic Colors */
  --color-success-light: #dcfce7;
  --color-success: #16a34a;
  --color-success-dark: #15803d;
  
  --color-warning-light: #fef3c7;
  --color-warning: #f59e0b;
  --color-warning-dark: #d97706;
  
  --color-error-light: #fecaca;
  --color-error: #dc2626;
  --color-error-dark: #b91c1c;
  
  --color-info-light: #dbeafe;
  --color-info: #2563eb;
  --color-info-dark: #1d4ed8;

  /* Neutral/Gray Scale */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* === TYPOGRAPHY === */
  /* Font Families */
  --font-family-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --font-family-secondary: 'Inter', system-ui, -apple-system, sans-serif;
  --font-family-mono: 'Fira Code', 'Monaco', 'Cascadia Code', monospace;

  /* Font Weights */
  --font-weight-thin: 100;
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --font-weight-black: 900;

  /* Font Sizes */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */
  --font-size-6xl: 3.75rem;   /* 60px */

  /* Line Heights */
  --line-height-none: 1;
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;

  /* === 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 */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-32: 8rem;     /* 128px */

  /* === BORDERS === */
  --border-width-0: 0;
  --border-width-1: 1px;
  --border-width-2: 2px;
  --border-width-4: 4px;
  --border-width-8: 8px;

  /* Border Radius */
  --radius-none: 0;
  --radius-sm: 0.125rem;   /* 2px */
  --radius-base: 0.25rem;  /* 4px */
  --radius-md: 0.375rem;   /* 6px */
  --radius-lg: 0.5rem;     /* 8px */
  --radius-xl: 0.75rem;    /* 12px */
  --radius-2xl: 1rem;      /* 16px */
  --radius-3xl: 1.5rem;    /* 24px */
  --radius-full: 9999px;

  /* === SHADOWS === */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-base: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);

  /* === TRANSITIONS === */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* === Z-INDEX === */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;

  /* === BREAKPOINTS (for reference in JS) === */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
}

/* Theme Mappings - These map to your current system */
:root {
  /* Current System Mappings */
  --primary-color: var(--brand-primary-600);
  --primary-hover-color: var(--brand-primary-700);
  --secondary-color: var(--brand-secondary-600);
  --secondary-hover-color: var(--brand-secondary-700);
  
  --background-color: var(--gray-50);
  --card-background: #ffffff;
  --text-color: var(--gray-900);
  --subtle-text-color: var(--gray-600);
  --border-color: var(--gray-200);
  
  --success-color: var(--color-success);
  --success-hover-color: var(--color-success-dark);
  --error-color: var(--color-error);
  --info-color: var(--color-info);
  --warning-color: var(--color-warning);
  
  /* Component Specific */
  --input-background: #ffffff;
  --tag-background-color: var(--gray-100);
  --tag-text-color: var(--gray-700);
  
  /* Layout */
  --header-height: 60px;
  --card-padding: var(--space-6);
  --card-border-radius: var(--radius-lg);
  --card-shadow: var(--shadow-base);
  
  /* Typography */
  --font-family: var(--font-family-primary);
}

/* Dark Mode Overrides */
html.dark-mode {
  --background-color: var(--gray-900);
  --card-background: var(--gray-800);
  --text-color: var(--gray-100);
  --subtle-text-color: var(--gray-400);
  --border-color: var(--gray-700);
  --input-background: var(--gray-700);
  --tag-background-color: var(--gray-700);
  --tag-text-color: var(--gray-300);
}