/* CS Chat — University of Denver brand overlay.
 * Recolors Element's Compound accent tokens from the stock green to DU Crimson.
 * Loaded UNLAYERED (via a plain <link> injected by nginx), so it overrides the
 * values set inside @layer compound-tokens regardless of specificity.
 * DU brand: Crimson #BA0C2F (PMS 200), Gold #A89968 (PMS 7503), Garnet #8A1538.
 * Revert = remove the injected <link> line in nginx.conf; nothing is baked in. */

/* Target the theme-carrying elements directly (:root AND .cpd-theme-*).
 * Custom properties resolve by proximity, so Element's `.cpd-theme-dark { --token }`
 * shadows a plain `:root { --token }`; we must set the tokens on those same classes. */
:root,
.cpd-theme-dark,
.cpd-theme-light,
.cpd-theme-dark-hc,
.cpd-theme-light-hc {
  --du-crimson: #ba0c2f;
  --du-crimson-dark: #8a1538;   /* garnet */
  --du-crimson-hover: #a00a29;
  --du-gold: #a89968;

  /* Primary buttons / solid accents (white text sits on these — fine in both themes) */
  --cpd-color-bg-action-primary-rest: var(--du-crimson);
  --cpd-color-bg-action-primary-hovered: var(--du-crimson-hover);
  --cpd-color-bg-action-primary-pressed: var(--du-crimson-dark);

  --cpd-color-bg-accent-rest: var(--du-crimson);
  --cpd-color-bg-accent-hovered: var(--du-crimson-hover);
  --cpd-color-bg-accent-pressed: var(--du-crimson-dark);
  --cpd-color-bg-accent-selected: rgba(186, 12, 47, 0.14);

  /* Text links / accent text + interactive borders (toggles, focused inputs) */
  --cpd-color-text-action-accent: var(--du-crimson);
  --cpd-color-border-interactive-primary: var(--du-crimson);
  --cpd-color-border-interactive-hovered: var(--du-crimson-dark);

  /* Legacy (non-Compound) accent vars still used by some older views */
  --accent: var(--du-crimson);
  --accent-color: var(--du-crimson);
  --primary-color: var(--du-crimson);
  --cpd-color-green-900: var(--du-crimson);
}

/* On dark surfaces DU crimson is a touch dark for small text/links — brighten it.
 * This block is unlayered too and comes after :root, so it wins inside the subtree. */
.cpd-theme-dark {
  --cpd-color-text-action-accent: #e8536a;
  --cpd-color-border-interactive-primary: #e8536a;
  --cpd-color-bg-accent-selected: rgba(232, 83, 106, 0.16);
}
