/*
 * Transpose color themes
 *
 * Standard pages use the default :root palette. An IDE page opts into the
 * deeper purple palette by adding class="theme-ide" to its <html> element.
 * Components should consume these semantic variables instead of defining
 * page-specific colors.
 */

/* Standard site palette */
:root {
  color-scheme: dark;

  --background: rgba(17, 24, 39, 1);
  --surface: rgba(22, 32, 51, 1);
  --surface-deep: rgba(12, 18, 32, 1);
  --surface-hover: rgba(30, 44, 70, 1);
  --surface-active: rgba(36, 54, 86, 1);

  --ink: rgba(218, 234, 255, 1);
  --muted: rgba(166, 192, 225, 1);
  --subtle: rgba(104, 130, 165, 1);
  --text-on-accent: rgba(10, 25, 43, 1);

  --accent: rgba(105, 171, 255, 1);
  --accent-soft: rgba(145, 198, 255, 1);
  --accent-bright: rgba(214, 239, 255, 1);

  --warning: rgba(255, 180, 158, 1);
  --error: rgba(255, 143, 143, 1);
  --success: rgba(158, 230, 191, 1);

  --transparent: rgba(0, 0, 0, 0);
  --scrollbar-thumb: rgba(105, 171, 255, 0.35);
  --shadow: rgba(4, 10, 22, 0.42);
  --dialog-backdrop: rgba(5, 10, 22, 0.78);
  --selection: rgba(105, 171, 255, 0.3);

  --problem-flag-blue: rgba(49, 95, 186, 1);
  --problem-flag-text: rgba(218, 234, 255, 1);
  --problem-flag-yellow: rgba(255, 216, 106, 1);
  --rating-zero: rgba(255, 143, 143, 1);
  --rating-plus-epsilon: rgba(255, 180, 158, 1);
  --rating-minus-epsilon: rgba(255, 216, 106, 1);
  --rating-full-solve: rgba(158, 230, 191, 1);
  --pdf-paper: rgba(245, 244, 240, 1);
  --pdf-ink: rgba(37, 36, 58, 1);
}

/* Custom IDE palette */
:root.theme-ide {
  --background: rgba(30, 30, 45, 1);
  --surface: rgba(25, 24, 40, 1);
  --surface-deep: rgba(16, 15, 26, 1);
  --surface-hover: rgba(34, 32, 56, 1);
  --surface-active: rgba(37, 38, 62, 1);

  --ink: rgba(203, 221, 253, 1);
  --muted: rgba(191, 188, 229, 1);
  --subtle: rgba(137, 123, 139, 1);
  --text-on-accent: rgba(23, 16, 25, 1);

  --accent: rgba(159, 131, 224, 1);
  --accent-soft: rgba(187, 169, 237, 1);
  --accent-bright: rgba(217, 244, 255, 1);

  --warning: rgba(255, 180, 158, 1);
  --error: rgba(255, 143, 143, 1);
  --success: rgba(158, 230, 191, 1);

  --transparent: rgba(0, 0, 0, 0);
  --scrollbar-thumb: rgba(134, 216, 247, 0.35);
  --shadow: rgba(5, 4, 12, 0.38);
  --dialog-backdrop: rgba(7, 6, 16, 0.78);
  --selection: rgba(159, 131, 224, 0.3);

  --problem-flag-blue: rgba(49, 95, 186, 1);
  --problem-flag-text: rgba(203, 221, 253, 1);
  --problem-flag-yellow: rgba(255, 216, 106, 1);
  --rating-zero: rgba(255, 143, 143, 1);
  --rating-plus-epsilon: rgba(255, 180, 158, 1);
  --rating-minus-epsilon: rgba(255, 216, 106, 1);
  --rating-full-solve: rgba(158, 230, 191, 1);
  --pdf-paper: rgba(245, 244, 240, 1);
  --pdf-ink: rgba(37, 36, 58, 1);
}

/*
 * Practice palette
 *
 * These intentionally match the standard site today. Keeping the overrides
 * in their own block lets Practice move to a distinct Learn theme later
 * without changing its component CSS.
 */
:root.theme-practice {
  --background: rgba(17, 24, 39, 1);
  --surface: rgba(22, 32, 51, 1);
  --surface-deep: rgba(12, 18, 32, 1);
  --surface-hover: rgba(30, 44, 70, 1);
  --surface-active: rgba(36, 54, 86, 1);

  --ink: rgba(218, 234, 255, 1);
  --muted: rgba(166, 192, 225, 1);
  --subtle: rgba(104, 130, 165, 1);
  --text-on-accent: rgba(10, 25, 43, 1);

  --accent: rgba(105, 171, 255, 1);
  --accent-soft: rgba(145, 198, 255, 1);
  --accent-bright: rgba(214, 239, 255, 1);

  --practice-background: rgba(17, 24, 39, 1);
  --practice-search-surface: rgba(12, 18, 32, 1);
  --practice-input-surface: rgba(22, 32, 51, 1);
  --practice-input-active: rgba(30, 44, 70, 1);
  --practice-popup-surface: rgba(22, 32, 51, 1);
  --practice-result-surface: rgba(22, 32, 51, 1);
}
