/* ==========================================================================
   Inside Joyy Design System - CSS Variables
   ========================================================================== */

:root {
  /* ========== Color Palette ========== */

  /* Primary Colors */
  --color-cream: #FDF8F3;
  --color-cream-dark: #F5EDE3;
  --color-soft-brown: #8B7355;
  --color-soft-brown-light: #A69076;
  --color-soft-brown-dark: #6B5A45;

  /* Accent Colors */
  --color-muted-pink: #E8D5D5;
  --color-muted-pink-dark: #D4BFBF;
  --color-sage: #9CAF88;
  --color-sage-light: #B5C4A5;
  --color-sage-dark: #7A9066;
  --color-gold: #C9A962;
  --color-gold-light: #D4BC7D;
  --color-gold-dark: #A88B4A;

  /* Neutral Colors */
  --color-white: #FFFFFF;
  --color-black: #1A1A1A;
  --color-gray-100: #F7F7F7;
  --color-gray-200: #EEEEEE;
  --color-gray-300: #E0E0E0;
  --color-gray-400: #BDBDBD;
  --color-gray-500: #9E9E9E;
  --color-gray-600: #757575;
  --color-gray-700: #616161;
  --color-gray-800: #424242;
  --color-gray-900: #212121;

  /* Semantic Colors */
  --color-success: #4CAF50;
  --color-warning: #FF9800;
  --color-error: #F44336;
  --color-whatsapp: #25D366;
  --color-whatsapp-dark: #1DA851;
  --color-instagram: #E4405F;
  --color-tiktok: #000000;

  /* ========== Typography ========== */

  /* Font Families */
  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-secondary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Font Sizes - Mobile First (16px base) */
  --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 */

  /* Font Weights */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* 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;

  /* ========== Spacing ========== */

  /* Base unit: 8px */
  --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 */
  --space-32: 8rem;
  /* 128px */

  /* ========== Layout ========== */

  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1440px;

  /* ========== Border Radius ========== */

  --radius-none: 0;
  --radius-sm: 0.25rem;
  /* 4px */
  --radius-md: 0.5rem;
  /* 8px */
  --radius-lg: 0.75rem;
  /* 12px */
  --radius-xl: 1rem;
  /* 16px */
  --radius-2xl: 1.5rem;
  /* 24px */
  --radius-full: 9999px;

  /* ========== Shadows ========== */

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px 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-gold: 0 4px 14px rgba(201, 169, 98, 0.3);
  --shadow-sage: 0 4px 14px rgba(156, 175, 136, 0.3);
  --shadow-pink: 0 4px 14px rgba(232, 213, 213, 0.5);

  /* ========== Transitions ========== */

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  --transition-slower: 500ms ease;

  /* Specific Transitions */
  --transition-colors: color 250ms ease, background-color 250ms ease, border-color 250ms ease;
  --transition-transform: transform 250ms ease;
  --transition-opacity: opacity 250ms ease;
  --transition-shadow: box-shadow 250ms ease;
  --transition-all: all 250ms ease;

  /* ========== Z-Index Scale ========== */

  --z-below: -1;
  --z-base: 0;
  --z-above: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  --z-max: 9999;
}

/* ========== Dark Mode Variables ========== */

/* Dark mode when user toggles */
[data-theme="dark"] {
  /* Primary Colors - Inverted for dark mode */
  --color-cream: #1A1A1A;
  --color-cream-dark: #252525;
  --color-soft-brown: #C9A962;
  --color-soft-brown-light: #D4BC7D;
  --color-soft-brown-dark: #E8D5B8;

  /* Neutral Colors - Inverted */
  --color-white: #1F1F1F;
  --color-black: #F5F5F5;
  --color-gray-100: #2A2A2A;
  --color-gray-200: #333333;
  --color-gray-300: #444444;
  --color-gray-400: #666666;
  --color-gray-500: #888888;
  --color-gray-600: #AAAAAA;
  --color-gray-700: #CCCCCC;
  --color-gray-800: #DDDDDD;
  --color-gray-900: #EEEEEE;

  /* Accent Colors - Slightly brighter for dark mode */
  --color-gold: #D4B872;
  --color-gold-light: #E0C98D;
  --color-gold-dark: #C9A962;
  --color-sage: #A8BC94;
  --color-muted-pink: #D4C0C0;

  /* Shadows - Darker for dark mode */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  --shadow-gold: 0 4px 14px rgba(201, 169, 98, 0.2);
}

/* Dark Mode Toggle Button Styles */
.theme-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-cream-dark);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-all);
  border: 2px solid transparent;
}

.theme-toggle:hover {
  background: var(--color-gold);
  color: var(--color-white);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: var(--transition-all);
}

.theme-toggle .sun-icon {
  display: none;
}

.theme-toggle .moon-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle {
  background: var(--color-gray-200);
}

[data-theme="dark"] .theme-toggle:hover {
  background: var(--color-gold);
}