/**
 * RehabPlus Design System - CSS Variables
 * Centralized design tokens for consistent styling
 */

:root {
    /* ========================================
       COLOR PALETTE - Range (Moss & Ochre) Theme
       ======================================== */

    /* Primary Colors - Moss Green */
    --color-primary-50: #F1F3EE;
    --color-primary-100: #DEE9DF;
    --color-primary-200: #C3D4C4;
    --color-primary-300: #9BB89E;
    --color-primary-400: #6E9575;
    --color-primary-500: #3F6B54;
    --color-primary-600: #365D48;
    --color-primary-700: #2E5240;
    --color-primary-800: #234032;
    --color-primary-900: #1A3025;

    /* Secondary Colors - Ochre */
    --color-secondary-400: #DDA25F;
    --color-secondary-500: #C77F3E;
    --color-secondary-600: #A9672F;
    --color-secondary-700: #8A5326;

    /* Accent - Soft Sage (hover/focus states) */
    --color-accent-400: #6E9575;
    --color-accent-500: #588066;
    --color-accent-600: #46704F;

    /* Gradient - Primary */
    --gradient-primary: linear-gradient(135deg, #3F6B54 0%, #2E5240 100%);
    --gradient-primary-hover: linear-gradient(135deg, #365D48 0%, #234032 100%);
    --gradient-primary-vertical: linear-gradient(180deg, #3F6B54 0%, #2E5240 100%);

    /* Semantic Colors */
    --color-success: #2F8F5B;
    --color-success-light: #63C08D;
    --color-success-dark: #24743F;

    --color-warning: #B8801F;
    --color-warning-light: #D9A54D;
    --color-warning-dark: #946417;

    --color-danger: #BE4A3C;
    --color-danger-light: #D67A6E;
    --color-danger-dark: #9C392E;

    --color-info: #3A7D82;
    --color-info-light: #63A5AA;
    --color-info-dark: #2C6266;

    /* Neutral Colors - sage-biased grays */
    --color-gray-50: #F6F7F4;
    --color-gray-100: #EEF1EA;
    --color-gray-200: #DEE4D6;
    --color-gray-300: #C6CFBC;
    --color-gray-400: #9DA895;
    --color-gray-500: #77826E;
    --color-gray-600: #5B6555;
    --color-gray-700: #454E40;
    --color-gray-800: #30362C;
    --color-gray-900: #1E231B;

    /* Text Colors */
    --color-text-primary: #1C2621;
    --color-text-secondary: #454E40;
    --color-text-muted: #6B7566;
    --color-text-disabled: #A3AC99;
    --color-text-inverse: #ffffff;

    /* Background Colors */
    --color-bg-primary: #ffffff;
    --color-bg-secondary: #F6F7F4;
    --color-bg-tertiary: #EEF1EA;
    --color-bg-overlay: rgba(20, 25, 20, 0.5);

    /* Border Colors */
    --color-border-light: #DEE4D6;
    --color-border-medium: #C6CFBC;
    --color-border-dark: #9DA895;
    --color-border-focus: var(--color-accent-400);

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

    /* Font Families */
    --font-family-heading: 'Fraunces', 'Prompt', Georgia, serif;
    --font-family-sans: 'Public Sans', 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-family-mono: 'SF Mono', 'Roboto Mono', 'Courier New', Courier, monospace;

    /* Font Sizes */
    --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-size-5xl: 3rem;        /* 48px */

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

    /* Line Heights */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    --line-height-loose: 2;

    /* Letter Spacing */
    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;

    /* ========================================
       SPACING
       ======================================== */

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

    /* ========================================
       BORDERS
       ======================================== */

    /* Border Widths */
    --border-width-thin: 1px;
    --border-width-medium: 2px;
    --border-width-thick: 3px;

    /* Border Radius */
    --radius-sm: 0.375rem;    /* 6px */
    --radius-md: 0.5rem;      /* 8px */
    --radius-lg: 0.75rem;     /* 12px */
    --radius-xl: 1rem;        /* 16px */
    --radius-2xl: 1.25rem;    /* 20px */
    --radius-3xl: 1.5rem;     /* 24px */
    --radius-full: 9999px;    /* Fully rounded */

    /* ========================================
       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);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

    /* Colored Shadows */
    --shadow-primary: 0 10px 25px rgba(63, 107, 84, 0.25);
    --shadow-primary-lg: 0 20px 40px rgba(63, 107, 84, 0.3);

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

    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;

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

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

    /* ========================================
       LAYOUT
       ======================================== */

    /* Container Max Widths */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1536px;

    /* Sidebar */
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 80px;

    /* Header */
    --header-height: 60px;

    /* ========================================
       COMPONENT SPECIFIC
       ======================================== */

    /* Cards */
    --card-bg: var(--color-bg-primary);
    --card-border: var(--color-border-light);
    --card-shadow: var(--shadow-md);
    --card-radius: var(--radius-2xl);
    --card-padding: var(--space-6);

    /* Buttons */
    --btn-padding-sm: var(--space-2) var(--space-4);
    --btn-padding-md: var(--space-3) var(--space-6);
    --btn-padding-lg: var(--space-4) var(--space-8);
    --btn-radius: var(--radius-lg);
    --btn-font-weight: var(--font-weight-semibold);

    /* Forms */
    --input-bg: var(--color-bg-primary);
    --input-border: var(--color-border-medium);
    --input-border-focus: var(--color-border-focus);
    --input-padding: var(--space-3) var(--space-4);
    --input-radius: var(--radius-md);
    --input-shadow-focus: 0 0 0 3px rgba(63, 107, 84, 0.15);

    /* Tables */
    --table-border: var(--color-border-light);
    --table-hover-bg: rgba(63, 107, 84, 0.05);
    --table-stripe-bg: var(--color-gray-50);

    /* Badges */
    --badge-padding: var(--space-2) var(--space-3);
    --badge-radius: var(--radius-full);
    --badge-font-size: var(--font-size-xs);
    --badge-font-weight: var(--font-weight-semibold);
}

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

@media (prefers-color-scheme: dark) {
    :root {
        /* Dark mode colors can be added here in the future */
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--color-border-focus);
    outline-offset: 2px;
}