/* ==========================================
   AutoMaroc - CSS Custom Properties (Variables)
   Design System Foundation for Theming & RTL
   ========================================== */

:root {
    /* ==========================================
       COLOR PALETTE
       ========================================== */
    
    /* Primary Brand Colors */
    --color-primary-50: #f8fafc;
    --color-primary-100: #f1f5f9;
    --color-primary-200: #e2e8f0;
    --color-primary-300: #cbd5e1;
    --color-primary-400: #94a3b8;
    --color-primary-500: #64748b;
    --color-primary-600: #475569;
    --color-primary-700: #334155;
    --color-primary-800: #1e293b;
    --color-primary-900: #0f172a;
    --color-primary-950: #020617;
    --color-primary: #111827;
    
    /* Secondary Colors */
    --color-secondary-50: #f9fafb;
    --color-secondary-100: #f3f4f6;
    --color-secondary-200: #e5e7eb;
    --color-secondary-300: #d1d5db;
    --color-secondary-400: #9ca3af;
    --color-secondary-500: #6b7280;
    --color-secondary-600: #4b5563;
    --color-secondary-700: #374151;
    --color-secondary-800: #1f2937;
    --color-secondary-900: #111827;
    --color-secondary-950: #030712;
    --color-secondary: #1F2937;
    
    /* Accent - Sporty Red */
    --color-accent-50: #fef2f2;
    --color-accent-100: #fee2e2;
    --color-accent-200: #fecaca;
    --color-accent-300: #fca5a5;
    --color-accent-400: #f87171;
    --color-accent-500: #ef4444;
    --color-accent-600: #dc2626;
    --color-accent-700: #b91c1c;
    --color-accent-800: #991b1b;
    --color-accent-900: #7f1d1d;
    --color-accent-950: #450a0a;
    --color-accent: #DC2626;
    
    /* Gold Highlight */
    --color-gold-50: #fffbeb;
    --color-gold-100: #fef3c7;
    --color-gold-200: #fde68a;
    --color-gold-300: #fcd34d;
    --color-gold-400: #fbbf24;
    --color-gold-500: #f59e0b;
    --color-gold-600: #d97706;
    --color-gold-700: #b45309;
    --color-gold-800: #92400e;
    --color-gold-900: #78350f;
    --color-gold-950: #451a03;
    --color-gold: #F59E0B;
    
    /* Semantic Colors */
    --color-success-50: #f0fdf4;
    --color-success-100: #dcfce7;
    --color-success-500: #22c55e;
    --color-success-600: #16a34a;
    --color-success: #22c55e;
    
    --color-warning-50: #fffbeb;
    --color-warning-100: #fef3c7;
    --color-warning-500: #f59e0b;
    --color-warning-600: #d97706;
    --color-warning: #f59e0b;
    
    --color-info-50: #eff6ff;
    --color-info-100: #dbeafe;
    --color-info-500: #3b82f6;
    --color-info-600: #2563eb;
    --color-info: #3b82f6;
    
    --color-danger-50: #fef2f2;
    --color-danger-100: #fee2e2;
    --color-danger-500: #ef4444;
    --color-danger-600: #dc2626;
    --color-danger: #ef4444;
    
    /* Status Colors */
    --color-available: #22c55e;
    --color-available-light: #dcfce7;
    --color-available-dark: #166534;
    --color-reserved: #f59e0b;
    --color-reserved-light: #fef9c3;
    --color-reserved-dark: #854d0e;
    --color-sold: #6b7280;
    --color-sold-light: #f3f4f6;
    --color-sold-dark: #1f2937;
    
    /* Background Colors */
    --color-bg-primary: #ffffff;
    --color-bg-secondary: #f9fafb;
    --color-bg-tertiary: #f3f4f6;
    --color-bg-dark: #111827;
    --color-bg-dark-secondary: #1f2937;
    
    /* Text Colors */
    --color-text-primary: #111827;
    --color-text-secondary: #4b5563;
    --color-text-muted: #6b7280;
    --color-text-inverse: #ffffff;
    --color-text-accent: #DC2626;
    
    /* Border Colors */
    --color-border-light: #e5e7eb;
    --color-border: #d1d5db;
    --color-border-dark: #9ca3af;
    
    /* ==========================================
       TYPOGRAPHY
       ========================================== */
    --font-family-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-family-display: 'Inter', system-ui, sans-serif;
    --font-family-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    --font-size-2xs: 0.625rem;
    --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-size-5xl: 3rem;
    
    --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;
    
    --line-height-none: 1;
    --line-height-tight: 1.25;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    
    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
    --letter-spacing-wider: 0.05em;
    
    /* ==========================================
       SPACING
       ========================================== */
    --space-0: 0;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;
    
    /* ==========================================
       BORDER RADIUS
       ========================================== */
    --radius-none: 0;
    --radius-sm: 0.125rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-3xl: 1.5rem;
    --radius-4xl: 2rem;
    --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-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-card-hover: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
    --shadow-elevated: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    
    /* ==========================================
       TRANSITIONS
       ========================================== */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    --transition-slower: 700ms ease;
    --transition-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* ==========================================
       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;
    --z-toast: 1080;
    
    /* ==========================================
       LAYOUT
       ========================================== */
    --container-max-width: 1280px;
    --container-padding: 1rem;
    --header-height: 72px;
    --sidebar-width: 280px;
    
    /* ==========================================
       RTL SUPPORT - Directional Properties
       ========================================== */
    /* These will be flipped automatically for RTL */
    --dir-start: left;
    --dir-end: right;
    --dir-inline-start: inline-start;
    --dir-inline-end: inline-end;
    --dir-margin-start: margin-left;
    --dir-margin-end: margin-right;
    --dir-padding-start: padding-left;
    --dir-padding-end: padding-right;
    --dir-border-start: border-left;
    --dir-border-end: border-right;
    --dir-rounded-start: border-top-left-radius;
    --dir-rounded-end: border-top-right-radius;
    --dir-rounded-start-bottom: border-bottom-left-radius;
    --dir-rounded-end-bottom: border-bottom-right-radius;
    --dir-translate-start: translateX(-100%);
    --dir-translate-end: translateX(100%);
}

/* ==========================================
   DARK MODE OVERRIDES
   ========================================== */
.dark {
    --color-bg-primary: #0f172a;
    --color-bg-secondary: #1e293b;
    --color-bg-tertiary: #334155;
    --color-bg-dark: #020617;
    --color-bg-dark-secondary: #0f172a;
    
    --color-text-primary: #f8fafc;
    --color-text-secondary: #cbd5e1;
    --color-text-muted: #94a3b8;
    --color-text-inverse: #0f172a;
    
    --color-border-light: #334155;
    --color-border: #475569;
    --color-border-dark: #64748b;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-card-hover: 0 12px 24px -8px rgba(0, 0, 0, 0.4);
}

/* ==========================================
   RTL MODE OVERRIDES
   ========================================== */
[dir="rtl"] {
    --dir-start: right;
    --dir-end: left;
    --dir-inline-start: inline-end;
    --dir-inline-end: inline-start;
    --dir-margin-start: margin-right;
    --dir-margin-end: margin-left;
    --dir-padding-start: padding-right;
    --dir-padding-end: padding-left;
    --dir-border-start: border-right;
    --dir-border-end: border-left;
    --dir-rounded-start: border-top-right-radius;
    --dir-rounded-end: border-top-left-radius;
    --dir-rounded-start-bottom: border-bottom-right-radius;
    --dir-rounded-end-bottom: border-bottom-left-radius;
    --dir-translate-start: translateX(100%);
    --dir-translate-end: translateX(-100%);
}

/* ==========================================
   REDUCED MOTION PREFERENCES
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    :root {
        --transition-fast: 0ms;
        --transition-base: 0ms;
        --transition-slow: 0ms;
        --transition-slower: 0ms;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================
   HIGH CONTRAST MODE
   ========================================== */
@media (prefers-contrast: high) {
    :root {
        --color-text-primary: #000000;
        --color-text-secondary: #1a1a1a;
        --color-border: #000000;
        --shadow-sm: none;
        --shadow-md: none;
        --shadow-lg: none;
    }
}
