/**
 * @file
 * MLT Modern — Colour scheme bridge.
 *
 * The parent theme (flashyplus) ships colour schemes as separate stylesheets:
 * color-blue.css, color-green.css, color-yellow.css, etc. The admin picks one
 * via Appearance → Theme settings → Look'n'Feel → Color Schemes, and the
 * parent .theme file attaches `flashyplus/color-<name>` and puts the class
 * `mt-color-scheme-<name>` on the body.
 *
 * Each parent scheme defines:
 *   --mt-color-primary, --mt-color-primary-dark, --mt-color-primary-light,
 *   --mt-color-primary-contrast,
 *   --mt-color-secondary, --mt-color-secondary-dark,
 *   --mt-color-base, --mt-color-base-dark, --mt-color-base-light,
 *   --mt-color-tint, --mt-color-shade,
 *   --mt-color-dark-colored, --mt-color-colored,
 *   --mt-color-bright, --mt-color-dark
 * ...plus *-value variants (raw HSL triples like "210, 80%, 30%") used for
 * rgba alpha effects.
 *
 * This file maps those into our component variables (--mlt-*). Components
 * never reference --mt-color-* directly — they only see --mlt-*. That gives
 * us a single seam to retune the design without rewriting components.
 *
 * Loaded weight 200 so it lands AFTER whichever color-*.css the parent
 * attached (those use weight 100). CSS variables resolve at the cascade
 * level they're used, so as long as the bridge loads after the scheme,
 * our --mlt-* always picks up the active values.
 *
 * Per the architecture decision: the ACCENT is intentionally NOT mapped
 * from the parent's --mt-color-secondary. It is a fixed yellow defined
 * here so the conversion-focused CTA aesthetic survives every scheme.
 * If you need a per-site accent override, set --mlt-accent in your
 * site's local-theme.css (the parent already loads that per site).
 */

:root {
  /* ====================================================================
   * Primary colour family — mapped from active parent scheme.
   * If admin switches "Color Schemes" dropdown, these change automatically.
   * ==================================================================== */
  --mlt-primary: var(--mt-color-primary, #0a4d8c);
  --mlt-primary-dark: var(--mt-color-primary-dark, #073a6b);
  --mlt-primary-light: var(--mt-color-tint, #e6f1fb);
  --mlt-primary-contrast: var(--mt-color-primary-contrast, #ffffff);

  /* Raw HSL triple for rgba/hsla alpha effects (gradients, shadows).
   * Falls back to a JJB-blue triple if the parent doesn't supply one. */
  --mlt-primary-value: var(--mt-color-primary-value, 210, 87%, 29%);
  --mlt-primary-dark-value: var(--mt-color-primary-dark-value, 210, 87%, 23%);

  /* ====================================================================
   * Accent / CTA colour — INTENTIONALLY FIXED at theme level.
   * Decision (Phase 1): the rewires-style yellow CTA is core to the
   * conversion design language and should not flip with the scheme.
   * Override per site in local-theme.css if a client needs different.
   * ==================================================================== */
  --mlt-accent: #ffc107;
  --mlt-accent-dark: #ffb300;
  --mlt-accent-contrast: #1a2332;
  --mlt-accent-value: 45, 100%, 51%;

  /* ====================================================================
   * Text colours — kept neutral by default. Parent's --mt-color-base is
   * often near-black but some schemes shift it; we pin our text to a
   * predictable dark slate so body copy is consistent across schemes.
   * ==================================================================== */
  --mlt-text: #1a2332;
  --mlt-text-light: #5a6878;

  /* ====================================================================
   * Surface colours — backgrounds, borders, soft fills.
   * These are NOT mapped from the parent because parent schemes only
   * supply colourful tints (which can be too saturated for soft surfaces).
   * ==================================================================== */
  --mlt-border: #e1e8ef;
  --mlt-bg-soft: #f7f9fc;
  --mlt-surface: #ffffff;
  --mlt-surface-dark: #0a1828;

  /* ====================================================================
   * Status colours — fixed, not scheme-dependent.
   * ==================================================================== */
  --mlt-success: #1d9e75;
  --mlt-danger: #d54545;
  --mlt-danger-soft: #fde8e8;
  --mlt-warning-soft: #fffbeb;
}
