/**
 * Noggle Design Tokens
 * Comprehensive design system shared across noggle.html and fallback UI
 * Includes colors, spacing, typography, shadows, borders, and animations
 */

:root {
  /* ===== COLOR PALETTE ===== */

  /* Salmon - Primary accent color */
  --salmon-50: #fff5f3;
  --salmon-100: #ffe4df;
  --salmon-200: #ffc9be;
  --salmon-300: #ff9d8a;
  --salmon-400: #ff6b5a;
  --salmon-500: #ff4430;
  --salmon-600: #ed2815;
  --salmon-700: #c81f11;
  --salmon-800: #a51d12;
  --salmon-900: #881f16;

  /* Sage - Secondary accent color (forest green) */
  --sage-50: #f3f6f3;
  --sage-100: #e3ebe3;
  --sage-200: #c4d7c4;
  --sage-300: #9bb89b;
  --sage-400: #6e956e;
  --sage-500: #4f7a4f;
  --sage-600: #3d613d;
  --sage-700: #10b981;
  --sage-800: #059669;
  --sage-900: #1a331a;

  /* Violet - Accent color */
  --violet-50: #faf5ff;
  --violet-100: #f3e8ff;
  --violet-200: #e9d5ff;
  --violet-300: #d8b4fe;
  --violet-400: #c084fc;
  --violet-500: #a855f7;
  --violet-600: #9333ea;
  --violet-700: #a855f7;
  --violet-800: #7c3aed;
  --violet-900: #5b21b6;

  /* Azure - Accent color (sky blue) */
  --azure-50: #eff6ff;
  --azure-100: #dbeafe;
  --azure-200: #bfdbfe;
  --azure-300: #93c5fd;
  --azure-400: #60a5fa;
  --azure-500: #3b82f6;
  --azure-600: #2563eb;
  --azure-700: #3b82f6;
  --azure-800: #2563eb;
  --azure-900: #1e3a8a;

  /* Accent Colors */
  --accent-warm: #c9883d;
  --accent-cool: #4a7fa8;
  --accent-orange: #ff8500;
  --accent-orange-hover: #db7000;
  --accent-teal: #1ABC9C;
  --accent-teal-dark: #16a085;

  /* Utility Colors */
  --highlight-yellow: #FFFACD;
  --highlight-yellow-pale: #f7f7d4;
  --gold: #ffd700;
  --success-green-light: #90EE90;
  --error-red-light: #f08080;
  --current-day-blue: #0078D4;
  --current-day-blue-dark: #005fa3;

  /* Neutral Colors */
  --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;

  /* Semantic Colors - High Contrast */
  --background: #f8faf8;
  --surface: #ffffff;
  --border: var(--sage-300);
  --text-primary: #1a1a1a;
  --text-secondary: var(--sage-800);
  --text-muted: var(--sage-600);

  /* ===== TYPOGRAPHY ===== */
  --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;

  --font-size-xs: 0.625rem;  /* 10px */
  --font-size-sm: 0.75rem;   /* 12px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.1;
  --line-height-normal: 1.3;
  --line-height-relaxed: 1.5;
  --line-height-loose: 1.875;

  /* ===== SPACING SCALE ===== */
  --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 */

  /* ===== BORDER RADIUS ===== */
  --radius-sm: 0.375rem;  /* 6px */
  --radius: 0.5rem;       /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */

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

  /* ===== Z-INDEX SCALE ===== */
  --z-dropdown: 50;
  --z-sticky: 100;
  --z-fixed: 500;
  --z-modal-backdrop: 1000;
  --z-modal: 1010;
  --z-popover: 1020;
  --z-tooltip: 1030;
  --z-fallback-modal: 9998;
  --z-fallback-loading: 9999;

  /* ===== TRANSITIONS & ANIMATIONS ===== */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
  --transition-slower: 0.5s ease;

  --duration-fast: 150ms;
  --duration-base: 200ms;
  --duration-slow: 300ms;
  --duration-slower: 500ms;
}

/* ===== DARK MODE THEME ===== */
[data-theme="dark"] {
  /* Semantic Colors - Dark Mode */
  --background: #0f0f0f;
  --surface: #1a1a1a;
  --surface-elevated: #242424;
  --border: #3a3a3a;
  --text-primary: #e8e8e8;
  --text-secondary: #b8b8b8;
  --text-muted: #888888;

  /* Adjusted accent colors for dark mode contrast */
  --salmon-accent-dark: #ff6b5a;
  --sage-accent-dark: #6e956e;
  --accent-orange-dark: #ff9933;

  /* Utility color adjustments */
  --highlight-yellow: #4a4520;
  --highlight-yellow-pale: #3a3618;

  /* Scoring colors - keep same as light mode for consistent UX */
  /* --success-green-light and --error-red-light inherit from :root */
}

@keyframes pulse {
  0%, 50%, 60%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  55% {
    transform: scale(1.25);
    opacity: 1;
  }
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

@keyframes fallback-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fallback-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
