/**
 * byjackli/ui Base Theme
 *
 * This file defines all global design tokens using CSS Custom Properties.
 * These tokens serve as the foundation for the design system.
 *
 * Naming Convention: --bjl-{category}-{property}-{variant?}
 *
 * Version: 1.0.0
 * Last Updated: 2025-10-18
 */

:root {
  /* ========================================
     COLORS - Primary Palette
     ======================================== */

  /* Primary - Main brand color */
  --bjl-color-primary: #df9953;
  --bjl-color-primary-rgb: 223 153 83;
  --bjl-color-primary-dark: #c87f3d;
  --bjl-color-primary-light: #e8b179;
  --bjl-color-primary-contrast: #ffffff;

  /* Secondary - Accent color */
  --bjl-color-secondary: #815942;
  --bjl-color-secondary-dark: #6b4835;
  --bjl-color-secondary-light: #9a6f55;
  --bjl-color-secondary-contrast: #ffffff;

  /* Semantic Colors */
  --bjl-color-success: #17c733;
  --bjl-color-success-contrast: #ffffff;
  --bjl-color-warning: #ff9900;
  --bjl-color-warning-contrast: #000000;
  --bjl-color-error: #ff4444;       /* Warm red that fits the design */
  --bjl-color-error-contrast: #ffffff;
  --bjl-color-info: #1976d2;
  --bjl-color-info-contrast: #ffffff;

  /* ========================================
     COLORS - Neutral Palette
     ======================================== */

  /* Background colors */
  --bjl-color-background: #221006;
  --bjl-color-surface: #583a29;          /* Card/panel backgrounds */
  --bjl-color-surface-elevated: #6b4835; /* Elevated surfaces */

  /* Text colors */
  --bjl-color-text: #eaeaea;
  --bjl-color-text-secondary: rgb(255 255 255 / 0.5);   /* 50% opacity - Muted/placeholder text */
  --bjl-color-text-disabled: rgb(255 255 255 / 0.38);   /* 38% opacity */

  /* Border colors */
  --bjl-color-border: #815942;
  --bjl-color-border-light: #9a6f55;
  --bjl-color-border-strong: #df9953;

  /* State colors */
  --bjl-color-disabled: rgb(0 0 0 / 0.8);               /* 80% opacity */
  --bjl-color-overlay: rgb(0 0 0 / 0.8);                /* 80% opacity */

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

  /* Font Families */
  --bjl-font-body: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bjl-font-heading: 'Noto Serif', Georgia, serif;
  --bjl-font-mono: 'Roboto Mono', 'Courier New', monospace;

  /* Font Sizes */
  --bjl-font-size-xs: 0.75rem;    /* 12px */
  --bjl-font-size-sm: 0.875rem;   /* 14px */
  --bjl-font-size-base: 1rem;     /* 16px */
  --bjl-font-size-md: 1.125rem;   /* 18px (current --normal) */
  --bjl-font-size-lg: 1.25rem;    /* 20px */
  --bjl-font-size-xl: 1.5rem;     /* 24px */
  --bjl-font-size-2xl: 2rem;      /* 32px */
  --bjl-font-size-3xl: 2.5rem;    /* 40px */

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

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

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

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

  /* ========================================
     BORDER RADIUS
     ======================================== */

  --bjl-radius-none: 0;
  --bjl-radius-sm: 0.25rem;       /* 4px */
  --bjl-radius-md: 0.5rem;        /* 8px */
  --bjl-radius-lg: 0.75rem;       /* 12px */
  --bjl-radius-xl: 1rem;          /* 16px */
  --bjl-radius-2xl: 1.5rem;       /* 24px */
  --bjl-radius-full: 9999px;      /* Pill shape */

  /* ========================================
     SHADOWS
     ======================================== */

  --bjl-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --bjl-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --bjl-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --bjl-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --bjl-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

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

  --bjl-transition-fast: 150ms ease;
  --bjl-transition-base: 200ms ease;
  --bjl-transition-slow: 300ms ease;
  --bjl-transition-slower: 500ms ease;

  /* Transition timing functions */
  --bjl-ease-in: cubic-bezier(0.4, 0, 1, 1);
  --bjl-ease-out: cubic-bezier(0, 0, 0.2, 1);
  --bjl-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

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

  --bjl-z-base: 0;
  --bjl-z-dropdown: 100;
  --bjl-z-sticky: 200;
  --bjl-z-fixed: 300;
  --bjl-z-overlay: 400;
  --bjl-z-modal-backdrop: 1000;
  --bjl-z-modal: 1001;
  --bjl-z-popover: 1002;
  --bjl-z-tooltip: 1003;
  --bjl-z-modal-manager: 999999;

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

  /* Content widths */
  --bjl-content-width-sm: 24rem;   /* 384px */
  --bjl-content-width-md: 32rem;   /* 512px */
  --bjl-content-width-lg: 42rem;   /* 672px */
  --bjl-content-width-xl: 56rem;   /* 896px */
  --bjl-content-width-2xl: 72rem;  /* 1152px */

  --bjl-content-max-width: 90vw;
  --bjl-content-max-height: 90vh;

  /* Component-specific layout */
  --bjl-drawer-width: 20rem;       /* 320px */
  --bjl-navbar-height: 6.5em;
  --bjl-sidebar-width: 16em;
  --bjl-w-editor: 713px;
  --bjl-p-editor: 0vw;

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

  --bjl-border-width-thin: 1px;
  --bjl-border-width-base: 2px;
  --bjl-border-width-thick: 3px;
}

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

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  :root {
    --bjl-transition-fast: 0ms;
    --bjl-transition-base: 0ms;
    --bjl-transition-slow: 0ms;
    --bjl-transition-slower: 0ms;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --bjl-border-width-thin: 2px;
    --bjl-border-width-base: 3px;
    --bjl-border-width-thick: 4px;
  }
}

