/**
 * CSS Custom Properties (Variables)
 * =============================================================================
 * Extracted from @opencoreemr/opencoreemr-core design system
 * These variables provide design consistency across all templates
 */

:root {
  /* =========================================================================
   * COLOR PALETTE
   * ========================================================================= */
  
  /* Primary Brand Colors (Green - OpenCoreEMR) */
  /* Note: --color-primary-500 and --color-primary-900 are provided by DesignBase core.css */
  --color-primary: #10a267;
  --color-primary-50: #ecfdf5;
  --color-primary-100: #d1fae5;
  --color-primary-200: #a7f3d0;
  --color-primary-300: #6ee7b7;
  --color-primary-400: #34d399;
  /* --color-primary-500: #10a267; - Provided by DesignBase */
  --color-primary-600: #059669;
  --color-primary-700: #047857;
  --color-primary-800: #065f46;
  /* --color-primary-900: #052e1e; - Provided by DesignBase */

  /* Neutral Colors (Grayscale) */
  /* Note: --color-white is provided by DesignBase core.css */
  --color-black: #000000;
  /* --color-white: #FFFFFF; - Provided by DesignBase */
  --color-neutral-50: #FAFAFA;
  --color-neutral-100: #F5F5F5;
  --color-neutral-200: #E5E5E5;
  --color-neutral-300: #D4D4D4;
  --color-neutral-400: #A3A3A3;
  --color-neutral-500: #737373;
  --color-neutral-600: #525252;
  --color-neutral-700: #404040;
  --color-neutral-800: #262626;
  --color-neutral-900: #171717;

  /* OpenCoreEMR Design System Aliases (--op-* namespace) */
  --op-white: #FFFFFF;
  --op-black: #000000;
  --op-charcoal: #171717;
  --op-gray-50: #FAFAFA;
  --op-gray-100: #F5F5F5;
  --op-gray-200: #E5E5E5;
  --op-gray-300: #D4D4D4;
  --op-gray-400: #A3A3A3;
  --op-gray-500: #737373;
  --op-gray-600: #525252;
  --op-gray-700: #404040;
  --op-gray-800: #262626;
  --op-gray-900: #171717;
  --op-blue: #0066FF;
  --op-blue-50: #E6F0FF;
  --op-blue-100: #CCE0FF;
  --op-blue-200: #99C2FF;
  --op-blue-300: #66A3FF;
  --op-blue-400: #3385FF;
  --op-blue-500: #0066FF;
  --op-blue-600: #0052CC;
  --op-blue-700: #003D99;
  --op-blue-800: #002966;
  --op-blue-900: #001433;
  
  /* Primary color aliases */
  --op-primary: #0066FF;
  --op-primary-light: #E6F0FF;
  --op-primary-dark: #0052CC;
  
  /* Semantic colors */
  --op-success: #22C55E;
  --op-warning: #F59E0B;
  --op-error: #EF4444;
  /* --op-blue-600, --op-blue-700, --op-blue-800, --op-blue-900 are defined above */

  /* Semantic Colors */
  --color-success: #22C55E;
  --color-success-light: #DCFCE7;
  --color-warning: #F59E0B;
  --color-warning-light: #FEF3C7;
  --color-error: #EF4444;
  --color-error-light: #FEE2E2;
  --color-info: #3B82F6;
  --color-info-light: #DBEAFE;

  /* =========================================================================
   * TYPOGRAPHY
   * ========================================================================= */
  
  /* Font Families */
  --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 
                      Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 
                      'Helvetica Neue', sans-serif;
  --font-family-serif: Georgia, 'Times New Roman', Times, serif;
  --font-family-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 
                      'Fira Mono', 'Droid Sans Mono', 'Courier New', monospace;
  --font-serif: var(--font-family-serif);

  /* Font Sizes */
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 30px;
  --font-size-4xl: 36px;
  --font-size-5xl: 48px;
  --font-size-6xl: 56px;
  --font-size-7xl: 64px;
  
  /* Font Size Aliases (--text-* namespace) */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 36px;
  --text-5xl: 48px;
  --text-6xl: 56px;
  --text-7xl: 64px;

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

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

  /* =========================================================================
   * SPACING
   * ========================================================================= */
  
  --spacing-0: 0;
  --spacing-1: 4px;
  --spacing-2: 8px;
  --spacing-3: 12px;
  --spacing-4: 16px;
  --spacing-5: 20px;
  --spacing-6: 24px;
  --spacing-8: 32px;
  --spacing-10: 40px;
  --spacing-12: 48px;
  --spacing-16: 64px;
  --spacing-20: 80px;
  --spacing-24: 96px;
  --spacing-32: 128px;
  
  /* Spacing Aliases (--space-* namespace) */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* =========================================================================
   * LAYOUT
   * ========================================================================= */
  
  --max-width: 1280px;
  --container-padding-mobile: 24px;
  --container-padding-desktop: 120px;

  /* =========================================================================
   * BORDERS & RADIUS
   * ========================================================================= */
  
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;
  --border-radius-2xl: 24px;
  --border-radius-3xl: 32px;
  --border-radius-4xl: 48px;
  --border-radius-full: 9999px;
  
  /* Radius Aliases (--radius-* namespace) */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-4xl: 48px;
  --radius-full: 9999px;

  --border-width-thin: 1px;
  --border-width-medium: 2px;
  --border-width-thick: 4px;

  /* =========================================================================
   * SHADOWS (Elevation)
   * ========================================================================= */
  
  --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);
  
  /* Primary color shadow (from Hero component) */
  --shadow-primary: 0 24px 64px 12px rgba(0, 102, 255, 0.1);

  /* =========================================================================
   * TRANSITIONS
   * ========================================================================= */
  
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;
  --transition-property-all: all;
  --transition-property-colors: color, background-color, border-color;
  --transition-property-transform: transform;
  --transition-property-shadow: box-shadow;

  /* =========================================================================
   * Z-INDEX SCALE
   * ========================================================================= */
  
  --z-index-dropdown: 10;
  --z-index-sticky: 20;
  --z-index-fixed: 30;
  --z-index-modal-backdrop: 40;
  --z-index-modal: 50;
  --z-index-popover: 60;
  --z-index-tooltip: 70;
  --z-index-navigation: 100;

  /* =========================================================================
   * BREAKPOINT SYSTEM
   * Matches Next.js PageWrapper: mobile <= 1000px, desktop > 1000px
   * ========================================================================= */

  --breakpoint-mobile: 1000px;
  --breakpoint-desktop: 1001px;

  /* Current breakpoint name (updated by media query and JS) */
  --breakpoint-name: 'desktop';

  /* =========================================================================
   * RESPONSIVE SPACING
   * These values change based on breakpoint
   * ========================================================================= */

  /* Page-level padding (matches Next.js OpContainer padding) */
  --padding-page-x: 120px;
  --padding-page-y: 96px;
  --padding-nav-top: 160px;

  /* Component spacing */
  --gap-section: 64px;
  --gap-content: 32px;

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

  --font-size-hero: 64px;
  --line-height-hero: 64px;
  --font-size-section-title: 56px;
  --line-height-section-title: 64px;

  /* =========================================================================
   * RESPONSIVE DIMENSIONS
   * ========================================================================= */

  --height-hero-image: 650px;
  --max-width-content: 1280px;
}

/* Mobile breakpoint overrides (1000px matches Next.js PageWrapper) */
@media (max-width: 1000px) {
  :root {
    --breakpoint-name: 'mobile';

    /* Spacing */
    --padding-page-x: 24px;
    --padding-page-y: 64px;
    --padding-nav-top: 120px;

    /* Typography */
    --font-size-hero: 48px;
    --line-height-hero: 56px;
    --font-size-section-title: 40px;
    --line-height-section-title: 48px;

    /* Dimensions */
    --height-hero-image: 320px;
  }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
  :root {
    /* Override colors for dark mode here */
  }
}
