/*
 * Catppuccin Pastel Theme - Light and Dark Mode Support
 *
 * Based on Catppuccin (https://catppuccin.com)
 * GitHub: https://github.com/catppuccin/catppuccin
 * License: MIT (https://github.com/catppuccin/catppuccin/blob/main/LICENSE)
 *
 * Catppuccin is a community-driven pastel theme that aims to be
 * the middle ground between low and high-contrast themes.
 *
 * This implementation uses Latte (light) and Mocha (dark) variants
 * with automatic system preference detection.
 */

/* ===== Base Catppuccin Colors ===== */
:root {
  /* Catppuccin Latte (Light Mode) */
  --ctp-rosewater: #dc8a78;
  --ctp-flamingo: #dd7878;
  --ctp-pink: #ea76cb;
  --ctp-mauve: #8839ef;
  --ctp-red: #d20f39;
  --ctp-maroon: #e64553;
  --ctp-peach: #fe640b;
  --ctp-yellow: #df8e1d;
  --ctp-green: #40a02b;
  --ctp-teal: #179299;
  --ctp-sky: #04a5e5;
  --ctp-sapphire: #209fb5;
  --ctp-blue: #1e66f5;
  --ctp-lavender: #7287fd;
  --ctp-text: #4c4f69;
  --ctp-subtext1: #5c5f77;
  --ctp-subtext0: #6c6f85;
  --ctp-overlay2: #7c7f93;
  --ctp-overlay1: #8c8fa1;
  --ctp-overlay0: #9ca0b0;
  --ctp-surface2: #acb0be;
  --ctp-surface1: #bcc0cc;
  --ctp-surface0: #ccd0da;
  --ctp-base: #eff1f5;
  --ctp-mantle: #e6e9ef;
  --ctp-crust: #dce0e8;

  /* Shadows */
  --shadow-color: rgba(76, 79, 105, 0.1);
  --shadow-sm: 0 2px 4px var(--shadow-color);
  --shadow-md: 0 4px 12px var(--shadow-color);
  --shadow-lg: 0 8px 24px var(--shadow-color);
}

/* ===== Dark Mode (Catppuccin Mocha) ===== */
@media (prefers-color-scheme: dark) {
  :root {
    /* Catppuccin Mocha (Dark Mode) */
    --ctp-rosewater: #f5e0dc;
    --ctp-flamingo: #f2cdcd;
    --ctp-pink: #f5c2e7;
    --ctp-mauve: #cba6f7;
    --ctp-red: #f38ba8;
    --ctp-maroon: #eba0ac;
    --ctp-peach: #fab387;
    --ctp-yellow: #f9e2af;
    --ctp-green: #a6e3a1;
    --ctp-teal: #94e2d5;
    --ctp-sky: #89dceb;
    --ctp-sapphire: #74c7ec;
    --ctp-blue: #89b4fa;
    --ctp-lavender: #b4befe;
    --ctp-text: #cdd6f4;
    --ctp-subtext1: #bac2de;
    --ctp-subtext0: #a6adc8;
    --ctp-overlay2: #9399b2;
    --ctp-overlay1: #7f849c;
    --ctp-overlay0: #6c7086;
    --ctp-surface2: #585b70;
    --ctp-surface1: #45475a;
    --ctp-surface0: #313244;
    --ctp-base: #1e1e2e;
    --ctp-mantle: #181825;
    --ctp-crust: #11111b;

    /* Dark mode shadow adjustments */
    --shadow-color: rgba(17, 17, 27, 0.3);
  }
}

/* ===== Forced Theme Classes (Optional) ===== */
/* Allow manual theme selection regardless of system preference */

.theme-latte {
  /* Force light mode colors */
  --ctp-rosewater: #dc8a78 !important;
  --ctp-flamingo: #dd7878 !important;
  --ctp-pink: #ea76cb !important;
  --ctp-mauve: #8839ef !important;
  --ctp-red: #d20f39 !important;
  --ctp-maroon: #e64553 !important;
  --ctp-peach: #fe640b !important;
  --ctp-yellow: #df8e1d !important;
  --ctp-green: #40a02b !important;
  --ctp-teal: #179299 !important;
  --ctp-sky: #04a5e5 !important;
  --ctp-sapphire: #209fb5 !important;
  --ctp-blue: #1e66f5 !important;
  --ctp-lavender: #7287fd !important;
  --ctp-text: #4c4f69 !important;
  --ctp-subtext1: #5c5f77 !important;
  --ctp-subtext0: #6c6f85 !important;
  --ctp-overlay2: #7c7f93 !important;
  --ctp-overlay1: #8c8fa1 !important;
  --ctp-overlay0: #9ca0b0 !important;
  --ctp-surface2: #acb0be !important;
  --ctp-surface1: #bcc0cc !important;
  --ctp-surface0: #ccd0da !important;
  --ctp-base: #eff1f5 !important;
  --ctp-mantle: #e6e9ef !important;
  --ctp-crust: #dce0e8 !important;

  --shadow-color: rgba(76, 79, 105, 0.1) !important;
}

.theme-mocha {
  /* Force dark mode colors */
  --ctp-rosewater: #f5e0dc !important;
  --ctp-flamingo: #f2cdcd !important;
  --ctp-pink: #f5c2e7 !important;
  --ctp-mauve: #cba6f7 !important;
  --ctp-red: #f38ba8 !important;
  --ctp-maroon: #eba0ac !important;
  --ctp-peach: #fab387 !important;
  --ctp-yellow: #f9e2af !important;
  --ctp-green: #a6e3a1 !important;
  --ctp-teal: #94e2d5 !important;
  --ctp-sky: #89dceb !important;
  --ctp-sapphire: #74c7ec !important;
  --ctp-blue: #89b4fa !important;
  --ctp-lavender: #b4befe !important;
  --ctp-text: #cdd6f4 !important;
  --ctp-subtext1: #bac2de !important;
  --ctp-subtext0: #a6adc8 !important;
  --ctp-overlay2: #9399b2 !important;
  --ctp-overlay1: #7f849c !important;
  --ctp-overlay0: #6c7086 !important;
  --ctp-surface2: #585b70 !important;
  --ctp-surface1: #45475a !important;
  --ctp-surface0: #313244 !important;
  --ctp-base: #1e1e2e !important;
  --ctp-mantle: #181825 !important;
  --ctp-crust: #11111b !important;

  --shadow-color: rgba(17, 17, 27, 0.3) !important;
}

/* ===== Smooth Transitions ===== */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Disable transitions on page load */
.preload * {
  transition: none !important;
}