/**
 * Yalla Arabic Design System — Tokens
 * Warm, colorful, mango-inspired palette 🥭
 * Sky blue + mango orange + warm cream
 */

/* Nunito — rounded, playful, highly readable */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap');

:root {
  /* ========================================
     COLOR SYSTEM — Mango + Sky
     ======================================== */

  /* Primary — Sky Blue */
  --sky-50:  #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-200: #bae6fd;
  --sky-300: #7dd3fc;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;

  /* Accent — Mango Orange */
  --mango-50:  #fff7ed;
  --mango-100: #ffedd5;
  --mango-200: #fed7aa;
  --mango-300: #fdba74;
  --mango-400: #fb923c;
  --mango-500: #f97316;
  --mango-600: #ea580c;
  --mango-700: #c2410c;

  /* Warm — Peach / Cream */
  --warm-50:  #fffbf5;
  --warm-100: #fff5eb;
  --warm-200: #ffecd6;

  /* Teal (secondary) */
  --teal-50:  #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-200: #99f6e4;
  --teal-300: #5eead4;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;

  /* Purple (tertiary) */
  --purple-400: #c084fc;
  --purple-500: #a855f7;
  --purple-600: #9333ea;

  /* Rose (tertiary) */
  --rose-400: #fb7185;
  --rose-500: #f43f5e;

  /* Lime (success accent) */
  --lime-400: #a3e635;
  --lime-500: #84cc16;

  /* Also keep emerald for backward compat */
  --yalla-emerald-50: #ecfdf5;
  --yalla-emerald-100: #d1fae5;
  --yalla-emerald-200: #a7f3d0;
  --yalla-emerald-300: #6ee7b7;
  --yalla-emerald-400: #34d399;
  --yalla-emerald-500: #10b981;
  --yalla-emerald-600: #059669;
  --yalla-emerald-700: #047857;

  --yalla-turquoise-50: #ecfeff;
  --yalla-turquoise-100: #cffafe;
  --yalla-turquoise-200: #a5f3fc;
  --yalla-turquoise-300: #67e8f9;
  --yalla-turquoise-400: #22d3ee;
  --yalla-turquoise-500: #06b6d4;
  --yalla-turquoise-600: #0891b2;
  --yalla-turquoise-700: #0e7490;

  /* Secondary */
  --yalla-indigo-500: #6366f1;
  --yalla-indigo-600: #4f46e5;
  --yalla-purple-500: #a855f7;
  --yalla-purple-600: #9333ea;

  /* Accent compat */
  --yalla-amber-500: #f59e0b;
  --yalla-amber-600: #d97706;
  --yalla-orange-500: #f97316;
  --yalla-orange-600: #ea580c;

  /* Semantic */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: var(--sky-500);

  /* Neutrals */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --gray-950: #030712;

  /* Slate (text) */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --slate-950: #020617;

  /* ========================================
     SEMANTIC MAPPING
     ======================================== */

  --color-primary: var(--sky-500);
  --color-primary-strong: var(--sky-600);
  --color-primary-subtle: var(--sky-50);
  --color-accent: var(--mango-500);
  --color-accent-strong: var(--mango-600);
  --color-accent-subtle: var(--mango-50);

  /* Surfaces — warm cream base */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: var(--warm-50);
  --color-bg-tertiary: var(--warm-100);
  --color-bg-elevated: #ffffff;
  --color-bg-hover: var(--sky-50);
  --color-bg-active: var(--sky-100);
  --color-bg-page: var(--warm-50);
  --color-surface: #ffffff;

  /* Text */
  --color-text-primary: var(--slate-800);
  --color-text-secondary: var(--slate-500);
  --color-text-tertiary: var(--slate-400);
  --color-text-inverse: #ffffff;
  --color-text-link: var(--sky-600);

  /* Borders */
  --color-border-subtle: #f0e6da;
  --color-border-strong: #e0d3c5;
  --color-border-interactive: var(--sky-500);
  --color-border: #f0e6da;

  /* Inputs */
  --color-input-bg: #ffffff;
  --color-input-border: #e0d3c5;
  --color-input-focus: var(--sky-500);

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

  --font-sans: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-base: var(--font-sans);
  --font-mono: 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;
  --font-arabic: 'Noto Naskh Arabic', 'Amiri', 'Times New Roman', serif;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-display-xs: 2.25rem;
  --text-display-sm: 3rem;
  --text-display-md: 4rem;
  --text-display-lg: 5rem;
  --text-display-xl: 6rem;

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

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

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

  /* ========================================
     SPACING SCALE (4px base)
     ======================================== */

  --space-0: 0;
  --space-05: 0.125rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-14: 3.5rem;
  --space-16: 4rem;
  --space-18: 4.5rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
  --space-40: 10rem;
  --space-48: 12rem;
  --space-64: 16rem;
  --space-96: 24rem;

  /* ========================================
     BORDER RADIUS — more rounded / bubbly
     ======================================== */

  --radius-none: 0;
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.75rem;
  --radius-3xl: 2.25rem;
  --radius-full: 9999px;

  /* ========================================
     SHADOWS — warm tone
     ======================================== */

  --shadow-xs: 0 1px 2px 0 rgba(180, 120, 60, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(180, 120, 60, 0.08), 0 1px 2px -1px rgba(180, 120, 60, 0.06);
  --shadow-md: 0 4px 8px -1px rgba(180, 120, 60, 0.08), 0 2px 4px -2px rgba(180, 120, 60, 0.06);
  --shadow-lg: 0 10px 20px -3px rgba(180, 120, 60, 0.1), 0 4px 8px -4px rgba(180, 120, 60, 0.05);
  --shadow-xl: 0 20px 30px -5px rgba(180, 120, 60, 0.1), 0 8px 12px -6px rgba(180, 120, 60, 0.05);
  --shadow-2xl: 0 25px 50px -12px rgba(180, 120, 60, 0.18);
  --shadow-inner: inset 0 2px 4px 0 rgba(180, 120, 60, 0.04);
  --shadow: var(--shadow-sm);

  /* Blue glow shadow for primary actions */
  --shadow-blue: 0 8px 20px -4px rgba(14, 165, 233, 0.3);
  --shadow-orange: 0 8px 20px -4px rgba(249, 115, 22, 0.3);

  /* ========================================
     TRANSITIONS & ANIMATIONS
     ======================================== */

  --transition-fast: 100ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-all: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  --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);

  /* ========================================
     FOCUS & INTERACTION
     ======================================== */

  --focus-ring: 0 0 0 3px rgba(14, 165, 233, 0.25);
  --focus-ring-offset: 0 0 0 2px #ffffff, 0 0 0 4px rgba(14, 165, 233, 0.25);

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

  --z-base: 0;
  --z-dropdown: 1000;
  --z-sticky: 1100;
  --z-fixed: 1200;
  --z-modal-backdrop: 1300;
  --z-modal: 1400;
  --z-popover: 1500;
  --z-tooltip: 1600;
}

/* ========================================
   DARK MODE THEME
   ======================================== */

[data-theme="dark"] {
  --color-primary: var(--sky-400);
  --color-primary-strong: var(--sky-500);
  --color-primary-subtle: rgba(14, 165, 233, 0.1);
  --color-accent: var(--mango-400);

  --color-bg-primary: var(--slate-950);
  --color-bg-secondary: var(--slate-900);
  --color-bg-tertiary: var(--slate-800);
  --color-bg-elevated: rgba(15, 23, 42, 0.9);
  --color-bg-hover: var(--slate-800);
  --color-bg-active: var(--slate-700);
  --color-bg-page: var(--slate-950);

  --color-text-primary: var(--slate-50);
  --color-text-secondary: var(--slate-400);
  --color-text-tertiary: var(--slate-500);
  --color-text-inverse: var(--slate-900);
  --color-text-link: var(--sky-400);

  --color-border-subtle: var(--slate-800);
  --color-border-strong: var(--slate-700);
  --color-border-interactive: var(--sky-400);

  --color-input-bg: var(--slate-900);
  --color-input-border: var(--slate-700);
  --color-input-focus: var(--sky-400);

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.4);

  --focus-ring: 0 0 0 3px rgba(56, 189, 248, 0.3);
}
