/**
 * Chrome Theme Pro 2.0 - Design Tokens
 * A comprehensive design system for consistent styling
 */

:root {
  /* ========================================
     SPACING SCALE (8px base unit)
     ======================================== */
  --space-0: 0;
  --space-px: 1px;
  --space-0-5: 2px;
  --space-1: 4px;
  --space-1-5: 6px;
  --space-2: 8px;
  --space-2-5: 10px;
  --space-3: 12px;
  --space-3-5: 14px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 36px;
  --space-10: 40px;
  --space-11: 44px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-28: 112px;
  --space-32: 128px;

  /* ========================================
     Z-INDEX SCALE
     ======================================== */
  --z-behind: -1;
  --z-base: 0;
  --z-docked: 10;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-banner: 300;
  --z-overlay: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-skiplink: 700;
  --z-toast: 800;
  --z-tooltip: 900;
  --z-max: 9999;

  /* ========================================
     TYPOGRAPHY SCALE
     ======================================== */
  --text-2xs: 0.625rem;   /* 10px */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.875rem;   /* 30px */
  --text-4xl: 2.25rem;    /* 36px */
  --text-5xl: 3rem;       /* 48px */
  --text-6xl: 3.75rem;    /* 60px */
  --text-7xl: 4.5rem;     /* 72px */
  --text-8xl: 6rem;       /* 96px */
  --text-9xl: 8rem;       /* 128px */

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* Font Weights */
  --font-thin: 100;
  --font-extralight: 200;
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  --font-black: 900;

  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* ========================================
     ANIMATION DURATIONS
     ======================================== */
  --duration-0: 0ms;
  --duration-75: 75ms;
  --duration-100: 100ms;
  --duration-150: 150ms;
  --duration-200: 200ms;
  --duration-250: 250ms;
  --duration-300: 300ms;
  --duration-400: 400ms;
  --duration-500: 500ms;
  --duration-600: 600ms;
  --duration-700: 700ms;
  --duration-1000: 1000ms;

  /* Semantic durations */
  --duration-instant: var(--duration-75);
  --duration-fast: var(--duration-150);
  --duration-normal: var(--duration-250);
  --duration-slow: var(--duration-400);
  --duration-slower: var(--duration-600);

  /* ========================================
     EASING FUNCTIONS
     ======================================== */
  --ease-linear: linear;
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Advanced easings */
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-smooth: cubic-bezier(0.45, 0, 0.55, 1);
  --ease-snappy: cubic-bezier(0.2, 0, 0, 1);

  /* ========================================
     SHADOW SCALE
     ======================================== */
  --shadow-none: none;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.2), 0 8px 16px rgba(0, 0, 0, 0.12);
  --shadow-2xl: 0 24px 48px rgba(0, 0, 0, 0.25), 0 12px 24px rgba(0, 0, 0, 0.15);
  --shadow-3xl: 0 32px 64px rgba(0, 0, 0, 0.3);

  /* Colored shadows (use with accent colors) */
  --shadow-glow-sm: 0 0 8px;
  --shadow-glow-md: 0 0 16px;
  --shadow-glow-lg: 0 0 24px;
  --shadow-glow-xl: 0 0 40px;

  /* Inner shadows */
  --shadow-inner-sm: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-inner-md: inset 0 2px 4px rgba(0, 0, 0, 0.15);
  --shadow-inner-lg: inset 0 4px 8px rgba(0, 0, 0, 0.2);

  /* ========================================
     GLASS EFFECTS
     ======================================== */
  --glass-blur-xs: blur(4px);
  --glass-blur-sm: blur(8px);
  --glass-blur-md: blur(16px);
  --glass-blur-lg: blur(24px);
  --glass-blur-xl: blur(40px);
  --glass-blur-2xl: blur(64px);

  /* Glass opacity levels */
  --glass-opacity-light: 0.1;
  --glass-opacity-medium: 0.25;
  --glass-opacity-heavy: 0.4;
  --glass-opacity-solid: 0.6;

  /* ========================================
     BORDER RADIUS SCALE
     ======================================== */
  --radius-none: 0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-4xl: 48px;
  --radius-full: 9999px;

  /* ========================================
     CONTAINER WIDTHS
     ======================================== */
  --container-xs: 320px;
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;
  --container-full: 100%;

  /* ========================================
     BREAKPOINTS (for reference in JS)
     ======================================== */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;

  /* ========================================
     SEMANTIC COLORS (extend theme colors)
     ======================================== */
  --color-success: #10b981;
  --color-success-rgb: 16, 185, 129;
  --color-warning: #f59e0b;
  --color-warning-rgb: 245, 158, 11;
  --color-error: #ef4444;
  --color-error-rgb: 239, 68, 68;
  --color-info: #3b82f6;
  --color-info-rgb: 59, 130, 246;

  /* ========================================
     ASPECT RATIOS
     ======================================== */
  --aspect-square: 1 / 1;
  --aspect-video: 16 / 9;
  --aspect-portrait: 3 / 4;
  --aspect-landscape: 4 / 3;
  --aspect-wide: 21 / 9;
}

/* ========================================
   RTL-AWARE LOGICAL PROPERTIES
   ======================================== */
[dir="rtl"] {
  --direction-start: right;
  --direction-end: left;
}

[dir="ltr"], :root {
  --direction-start: left;
  --direction-end: right;
}
