/**
 * Applicora Design System - Variables
 *
 * Core design tokens for colors, spacing, typography, shadows, and more.
 * Use CSS custom properties (variables) for consistency across the platform.
 *
 * Usage:
 *   background: var(--color-primary);
 *   padding: var(--spacing-4);
 *   border-radius: var(--radius-lg);
 */

:root {
  /* ========================================
     BRAND COLORS
     ======================================== */

  --color-primary: #0A3C7A;
  --color-primary-light: #1565C0;
  --color-primary-dark: #083056;

  --color-accent: #667EEA;
  --color-accent-light: #764BA2;

  /* ========================================
     SEMANTIC COLORS
     ======================================== */

  --color-success: #10B981;
  --color-success-light: #D1FAE5;
  --color-success-dark: #059669;

  --color-warning: #F59E0B;
  --color-warning-light: #FEF3C7;
  --color-warning-dark: #92400e;

  --color-danger: #DC2626;
  --color-danger-light: #FEE2E2;
  --color-danger-dark: #B91C1C;

  --color-info: #0ea5e9;
  --color-info-light: #e0f2fe;
  --color-info-dark: #0c4a6e;

  /* ========================================
     NEUTRAL GRAYS
     ======================================== */

  --color-gray-900: #1F2937;
  --color-gray-800: #374151;
  --color-gray-700: #4B5563;
  --color-gray-600: #6C757D;
  --color-gray-500: #64748B;
  --color-gray-400: #9CA3AF;
  --color-gray-300: #D1D5DB;
  --color-gray-200: #E5E7EB;
  --color-gray-100: #F3F4F6;
  --color-gray-50: #F9FAFB;

  /* ========================================
     BACKGROUND COLORS
     ======================================== */

  --bg-white: #FFFFFF;
  --bg-light: #F8F9FA;
  --bg-gradient-light: linear-gradient(to right, #F0F4F8 0%, #F7FAFC 100%);
  --bg-body: linear-gradient(180deg, #F9FAFB 0%, #FFFFFF 100%);
  --bg-subtle: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.06) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(10, 60, 122, 0.06) 0%, transparent 50%),
              linear-gradient(180deg, #F9FAFB 0%, #FFFFFF 100%);

  /* ========================================
     TEXT COLORS
     ======================================== */

  --text-primary: #334155;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-disabled: #ADB5BD;
  --text-white: #FFFFFF;

  /* ========================================
     BORDER COLORS
     ======================================== */

  --border-gray: #E5E7EB;
  --border-gray-light: #F3F4F6;
  --border-gray-dark: #D1D5DB;

  /* ========================================
     GRADIENTS
     ======================================== */

  /* Primary Brand Gradient */
  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);

  /* Accent Gradient */
  --gradient-accent: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);

  /* Success Gradient */
  --gradient-success: linear-gradient(135deg, var(--color-success) 0%, var(--color-success-dark) 100%);

  /* Warning Gradient */
  --gradient-warning: linear-gradient(135deg, var(--color-warning) 0%, var(--color-warning-dark) 100%);

  /* Info Gradient */
  --gradient-info: linear-gradient(135deg, var(--color-info) 0%, var(--color-info-dark) 100%);

  /* ========================================
     SPACING SCALE (rem-based)
     ======================================== */

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

  /* ========================================
     BORDER RADIUS
     ======================================== */

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-pill: 9999px;
  --radius-circle: 50%;

  /* ========================================
     BOX SHADOWS
     ======================================== */

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.15);
  --shadow-2xl: 0 16px 48px rgba(0, 0, 0, 0.2);

  /* Component-specific shadows */
  --shadow-card: var(--shadow-md);
  --shadow-card-hover: var(--shadow-lg);
  --shadow-button: 0 2px 4px rgba(10, 60, 122, 0.2);
  --shadow-button-hover: 0 4px 8px rgba(10, 60, 122, 0.3);

  /* ========================================
     TYPOGRAPHY
     ======================================== */

  /* Font Families */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Courier New', Courier, monospace;

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

  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Line Heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.6;
  --leading-loose: 2;

  /* Letter Spacing */
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* ========================================
     Z-INDEX SCALE
     ======================================== */

  --z-base: 0;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-notification: 1080;

  /* ========================================
     TRANSITIONS
     ======================================== */

  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  --transition-all: all var(--transition-base);
  --transition-colors: color var(--transition-base), background-color var(--transition-base), border-color var(--transition-base);
  --transition-transform: transform var(--transition-base);

  /* ========================================
     BREAKPOINTS (for reference in media queries)
     ======================================== */

  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
  --breakpoint-2xl: 1400px;

  /* ========================================
     FORM ELEMENTS
     ======================================== */

  --input-bg: var(--color-gray-50);
  --input-border: var(--border-gray);
  --input-border-focus: var(--color-primary);
  --input-padding-y: var(--spacing-3);
  --input-padding-x: var(--spacing-4);
  --input-radius: var(--radius-lg);

  /* Focus Ring */
  --focus-ring-color: rgba(10, 60, 122, 0.1);
  --focus-ring: 0 0 0 3px var(--focus-ring-color);

  /* ========================================
     COMPONENT-SPECIFIC VARIABLES
     ======================================== */

  /* Buttons */
  --button-padding-y: 0.6rem;
  --button-padding-x: 1.5rem;
  --button-radius: var(--radius-pill);
  --button-font-weight: var(--font-semibold);

  /* Cards */
  --card-bg: var(--bg-white);
  --card-radius: var(--radius-lg);
  --card-shadow: var(--shadow-card);
  --card-padding: var(--spacing-8);

  /* Badges */
  --badge-padding-y: 0.25rem;
  --badge-padding-x: 0.5rem;
  --badge-radius: var(--radius-pill);
  --badge-font-size: var(--text-xs);
  --badge-font-weight: var(--font-semibold);
}

/* ========================================
   DARK MODE SUPPORT (Future)
   ======================================== */

@media (prefers-color-scheme: dark) {
  /* Optional: Dark mode overrides */
  /* Uncomment when ready to implement dark mode */
  /*
  :root {
    --bg-white: #1F2937;
    --text-primary: #F9FAFB;
    --text-secondary: #D1D5DB;
  }
  */
}
