/* VisionSync Design Tokens - Foundation for consistent styling */

:root {
    /* Color Palette */
    --color-primary: #3b82f6;
    --color-primary-dark: #1e40af;
    --color-primary-light: #dbeafe;
    
    --color-secondary: #6366f1;
    --color-secondary-dark: #4338ca;
    --color-secondary-light: #e0e7ff;
    
    --color-danger: #ef4444;
    --color-danger-dark: #b91c1c;
    --color-danger-light: #fee2e2;
    
    --color-success: #10b981;
    --color-success-dark: #047857;
    --color-success-light: #d1fae5;
    
    --color-warning: #f59e0b;
    --color-warning-dark: #d97706;
    --color-warning-light: #fef3c7;
    
    --color-info: #0ea5e9;
    --color-info-dark: #0284c7;
    --color-info-light: #cffafe;
    
    /* Neutral Colors */
    --color-white: #ffffff;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    --color-black: #000000;
    
    /* Background Colors */
    --bg-primary: var(--color-gray-50);
    --bg-secondary: var(--color-white);
    --bg-tertiary: var(--color-gray-100);
    --bg-overlay: rgba(0, 0, 0, 0.5);
    
    /* Text Colors */
    --text-primary: var(--color-gray-900);
    --text-secondary: var(--color-gray-600);
    --text-tertiary: var(--color-gray-500);
    --text-disabled: var(--color-gray-400);
    --text-on-primary: var(--color-white);
    
    /* Spacing Scale */
    --spacing-xs: 0.25rem;  /* 4px */
    --spacing-sm: 0.5rem;   /* 8px */
    --spacing-md: 1rem;     /* 16px */
    --spacing-lg: 1.5rem;   /* 24px */
    --spacing-xl: 2rem;     /* 32px */
    --spacing-2xl: 3rem;    /* 48px */
    --spacing-3xl: 4rem;    /* 64px */
    
    /* Typography */
    --font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    --font-family-mono: 'Menlo', 'Monaco', 'Courier New', monospace;
    
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-md: 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-weight-light: 300;
    --font-weight-normal: 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;
    
    /* Border Radius */
    --radius-sm: 0.25rem;   /* 4px */
    --radius-md: 0.5rem;    /* 8px */
    --radius-lg: 1rem;      /* 16px */
    --radius-xl: 1.5rem;    /* 24px */
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 100ms ease-in-out;
    --transition-base: 200ms ease-in-out;
    --transition-slow: 300ms ease-in-out;
    
    /* Z-Index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1010;
    --z-fixed: 1020;
    --z-modal-backdrop: 1030;
    --z-modal: 1040;
    --z-popover: 1050;
    --z-tooltip: 1060;
}

/* Light Mode (default) */
@media (prefers-color-scheme: light) {
    :root {
        --bg-page: var(--color-white);
        --text-color: var(--text-primary);
        --border-color: var(--color-gray-200);
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-page: var(--color-gray-900);
        --text-color: var(--color-gray-100);
        --border-color: var(--color-gray-700);
    }
}

/* Accessibility: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Accessibility: High Contrast Support */
@media (prefers-contrast: more) {
    :root {
        --color-gray-300: #a0a9b8;
        --color-gray-600: #333333;
        --text-primary: #000000;
    }
}

/* System Fonts for better performance */
html {
    font-family: var(--font-family-sans);
    font-size: 16px;
    line-height: var(--line-height-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-page);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

/* Remove default browser styling for better control */
button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
    display: block;
}
