/**
 * Referral Theme Variables
 * 
 * Defines the color palette, spacing, and styling variables for the referral system
 * to ensure consistency across all components and pages.
 */

:root {
  /* Brand Colors - Orange Gradient Theme */
  --brand-primary: #f26419;
  --brand-secondary: #f7931e;
  --brand-gradient: linear-gradient(135deg, #f26419 0%, #f7931e 100%);
  --brand-gradient-hover: linear-gradient(135deg, #e55a15 0%, #e8851a 100%);
  
  /* Dark Theme Colors */
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-glass-hover: rgba(255, 255, 255, 0.1);
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --text-tertiary: rgba(255, 255, 255, 0.6);
  --text-muted: rgba(255, 255, 255, 0.4);
  
  /* Border Colors */
  --border-primary: rgba(255, 255, 255, 0.1);
  --border-secondary: rgba(255, 255, 255, 0.2);
  --border-accent: rgba(242, 100, 25, 0.3);
  --border-accent-hover: rgba(242, 100, 25, 0.6);
  
  /* Glass Effect Variables */
  --glass-backdrop: blur(10px);
  --glass-backdrop-strong: blur(20px);
  --glass-opacity: 0.1;
  --glass-opacity-hover: 0.15;
  
  /* Spacing Scale */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */
  
  /* Border Radius */
  --radius-sm: 0.375rem;  /* 6px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;
  
  /* Typography Scale */
  --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 Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  
  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* 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-brand: 0 4px 15px rgba(242, 100, 25, 0.3);
  --shadow-brand-hover: 0 6px 20px rgba(242, 100, 25, 0.4);
  
  /* Transitions */
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
  
  /* Z-Index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  
  /* Component Specific Variables */
  
  /* Progress Indicator */
  --progress-circle-size: 40px;
  --progress-line-thickness: 3px;
  --progress-line-length: 100px;
  
  /* Cards */
  --card-padding: var(--space-lg);
  --card-border-width: 1px;
  --card-min-height: 200px;
  
  /* Forms */
  --input-height: 48px;
  --input-padding: var(--space-md);
  --input-border-width: 2px;
  
  /* Buttons */
  --btn-height: 48px;
  --btn-padding-x: var(--space-lg);
  --btn-padding-y: var(--space-md);
  --btn-border-width: 2px;
  
  /* Tables */
  --table-cell-padding: var(--space-md);
  --table-header-bg: var(--bg-tertiary);
  --table-row-hover: var(--bg-glass);
  
  /* Status Colors */
  --status-success: #10b981;
  --status-warning: #f59e0b;
  --status-error: #ef4444;
  --status-info: #3b82f6;
  
  /* Commission Specific Colors */
  --commission-high: #10b981;
  --commission-medium: #f59e0b;
  --commission-low: #6b7280;
  --commission-tier-1: #ef4444;
  --commission-tier-2: #f59e0b;
  --commission-tier-3: #10b981;
  --commission-tier-4: #3b82f6;
  --commission-tier-5: #8b5cf6;
}

/* Dark theme overrides for better contrast */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-primary: rgba(255, 255, 255, 0.3);
    --border-secondary: rgba(255, 255, 255, 0.5);
    --text-secondary: rgba(255, 255, 255, 0.9);
    --text-tertiary: rgba(255, 255, 255, 0.8);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0s;
    --transition-normal: 0s;
    --transition-slow: 0s;
  }
}

/* ============================================
   LIGHT MODE THEME
   ============================================ */
[data-theme="light"] {
  /* Brand Colors remain the same */
  --brand-primary: #f26419;
  --brand-secondary: #f7931e;
  --brand-gradient: linear-gradient(135deg, #f26419 0%, #f7931e 100%);
  --brand-gradient-hover: linear-gradient(135deg, #e55a15 0%, #e8851a 100%);

  /* Light Theme Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --bg-tertiary: #e5e5e5;
  --bg-glass: rgba(0, 0, 0, 0.03);
  --bg-glass-hover: rgba(0, 0, 0, 0.06);

  /* Text Colors - Inverted for light mode */
  --text-primary: #1a1a1a;
  --text-secondary: rgba(0, 0, 0, 0.7);
  --text-tertiary: rgba(0, 0, 0, 0.5);
  --text-muted: rgba(0, 0, 0, 0.4);

  /* Border Colors */
  --border-primary: rgba(0, 0, 0, 0.1);
  --border-secondary: rgba(0, 0, 0, 0.15);
  --border-accent: rgba(242, 100, 25, 0.3);
  --border-accent-hover: rgba(242, 100, 25, 0.6);

  /* Glass Effect Variables */
  --glass-backdrop: blur(10px);
  --glass-backdrop-strong: blur(20px);
  --glass-opacity: 0.03;
  --glass-opacity-hover: 0.06;

  /* Shadows - More pronounced in light mode */
  --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.15), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  --shadow-brand: 0 4px 15px rgba(242, 100, 25, 0.2);
  --shadow-brand-hover: 0 6px 20px rgba(242, 100, 25, 0.3);

  /* Tables */
  --table-cell-padding: var(--space-md);
  --table-header-bg: var(--bg-tertiary);
  --table-row-hover: var(--bg-glass);

  /* Status Colors remain vibrant */
  --status-success: #059669;
  --status-warning: #d97706;
  --status-error: #dc2626;
  --status-info: #2563eb;

  /* Commission Specific Colors - adjusted for light mode */
  --commission-high: #059669;
  --commission-medium: #d97706;
  --commission-low: #6b7280;
  --commission-tier-1: #dc2626;
  --commission-tier-2: #d97706;
  --commission-tier-3: #059669;
  --commission-tier-4: #2563eb;
  --commission-tier-5: #7c3aed;
}
