/*
 * Snow Tree base account theme - structural mechanism (no build, static CSS).
 *
 * Parents on Keycloak's own `keycloak.v3` account console (PatternFly v5 React
 * SPA) and re-colours its primary / link / button tokens from a single set of
 * abstract `--st-*` brand tokens. Brand themes (parent=snowtree-base) supply
 * the `--st-brand` VALUES only (light + dark); this file owns the PatternFly
 * token plumbing so every branded account console is identical in shape and we
 * never touch node_modules / Tailwind / Vite.
 *
 * The account console is a React SPA: its own PatternFly stylesheet is bundled
 * by the SPA, so a theme only needs to inject these token overrides. Dark mode
 * toggles via the `.pf-v5-theme-dark` class (Keycloak `kcDarkModeClass`), NOT
 * `prefers-color-scheme` like the login page.
 */

/* Neutral fallbacks so snowtree-base renders standalone; brands override. */
:root {
  --st-brand: #1f4fb0;
  --st-brand-hover: #1a4396;
}

.pf-v5-theme-dark {
  --st-brand: #7aa7ff;
  --st-brand-hover: #9bbcff;
}

/* ---- --st-* -> PatternFly v5 global tokens (light + dark share the mapping;
 *      only --st-brand flips). ---- */
:root,
.pf-v5-theme-dark {
  --pf-v5-global--primary-color--100: var(--st-brand);
  --pf-v5-global--primary-color--200: var(--st-brand-hover);
  --pf-v5-global--link--Color: var(--st-brand);
  --pf-v5-global--link--Color--hover: var(--st-brand-hover);
}

/* ---- Primary button (set component vars directly; global cascade is not guaranteed) ---- */
.pf-v5-c-button.pf-m-primary {
  --pf-v5-c-button--m-primary--BackgroundColor: var(--st-brand);
  --pf-v5-c-button--m-primary--hover--BackgroundColor: var(--st-brand-hover);
  --pf-v5-c-button--m-primary--active--BackgroundColor: var(--st-brand-hover);
  --pf-v5-c-button--m-primary--focus--BackgroundColor: var(--st-brand-hover);
}
