/**
 * CSS Custom Properties (Variables) for consistent theming
 */

:root {
  /* Colors */
  --color-primary: #667eea;
  --color-primary-dark: #5a67d8;
  --color-primary-light: #a78bfa;
  --color-secondary: #f8f9fa;
  --color-secondary-dark: #e9ecef;

  --color-success: #28a745;
  --color-success-light: #d4edda;
  --color-success-dark: #155724;

  --color-danger: #dc3545;
  --color-danger-light: #f8d7da;
  --color-danger-dark: #721c24;

  --color-warning: #ffc107;
  --color-warning-light: #fff3cd;
  --color-warning-dark: #856404;

  --color-info: #17a2b8;
  --color-info-light: #d1ecf1;
  --color-info-dark: #0c5460;

  --color-light: #f8f9fa;
  --color-dark: #343a40;

  /* Grays */
  --color-gray-100: #f8f9fa;
  --color-gray-200: #e9ecef;
  --color-gray-300: #dee2e6;
  --color-gray-400: #ced4da;
  --color-gray-500: #adb5bd;
  --color-gray-600: #6c757d;
  --color-gray-700: #495057;
  --color-gray-800: #343a40;
  --color-gray-900: #212529;

  /* Text Colors */
  --color-text-primary: #000000;
  --color-text-secondary: #000000;
  --color-text-muted: #4a5568;
  --color-text-light: #fff;

  /* Background Colors */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f8f9fa;
  --color-bg-tertiary: #e9ecef;
  --color-bg-overlay: rgba(0, 0, 0, 0.5);

  /* Border Colors */
  --color-border-light: #e9ecef;
  --color-border-medium: #dee2e6;
  --color-border-dark: #adb5bd;

  /* Typography */
  --font-family-sans: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-family-mono: 'Courier New', Consolas, Monaco, monospace;

  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;

  --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;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 0.75rem;
  --spacing-lg: 1rem;
  --spacing-xl: 1.5rem;
  --spacing-2xl: 2rem;
  --spacing-3xl: 3rem;
  --spacing-4xl: 4rem;

  /* Border Radius */
  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.375rem;
  --border-radius-lg: 0.5rem;
  --border-radius-xl: 0.75rem;
  --border-radius-2xl: 1rem;
  --border-radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --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);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;
  --transition-all: all 0.2s ease;

  /* Z-index layers */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;

  /* Breakpoints (for reference in media queries) */
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
  --breakpoint-2xl: 1400px;

  /* Component specific variables */
  --header-height: 60px;
  --sidebar-width: 250px;
  --footer-height: 50px;

  /* Form elements */
  --form-input-height: 2.5rem;
  --form-input-padding: 0.75rem;
  --form-input-border: 1px solid var(--color-border-medium);
  --form-input-border-radius: var(--border-radius-md);
  --form-input-focus-border: var(--color-primary);
  --form-input-focus-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);

  /* Card styles */
  --card-padding: var(--spacing-xl);
  --card-border-radius: var(--border-radius-lg);
  --card-shadow: var(--shadow-md);
  --card-border: 1px solid var(--color-border-light);
}

/* Dark theme variables */
[data-theme='dark'] {
  /* Background Colors */
  --color-bg-primary: #1a202c;
  --color-bg-secondary: #2d3748;
  --color-bg-tertiary: #4a5568;
  --color-bg-overlay: rgba(0, 0, 0, 0.7);

  /* Text Colors */
  --color-text-primary: #f7fafc;
  --color-text-secondary: #e2e8f0;
  --color-text-muted: #a0aec0;
  --color-text-light: #ffffff;

  /* Border Colors */
  --color-border-light: #4a5568;
  --color-border-medium: #2d3748;
  --color-border-dark: #1a202c;

  /* Gray Scales (adjusted for dark theme) */
  --color-gray-100: #4a5568;
  --color-gray-200: #2d3748;
  --color-gray-300: #1a202c;
  --color-gray-400: #718096;
  --color-gray-500: #a0aec0;
  --color-gray-600: #cbd5e0;
  --color-gray-700: #e2e8f0;
  --color-gray-800: #f7fafc;
  --color-gray-900: #ffffff;

  /* Status colors (slightly adjusted for dark theme) */
  --color-success-light: #2d5a3d;
  --color-success-dark: #68d391;

  --color-danger-light: #553c4e;
  --color-danger-dark: #fc8181;

  --color-warning-light: #5d4e37;
  --color-warning-dark: #f6e05e;
  --color-info-light: #2c5282;
  --color-info-dark: #63b3ed;
}
