/* ---------------------------------------------------------------
 * Theme bridge -- maps every --vln-* custom property this plugin's
 * frontend CSS uses to the VELYON theme's --velyon-* tokens
 * (THEME-DESIGN-CONTRACT.md §1). This is the ONLY file that
 * references --velyon-* directly; every other plugin stylesheet
 * uses --vln-* so the plugin still renders (on its own fallback
 * colors, in the fallback of each var()) if the theme is ever
 * deactivated.
 *
 * Because every color below is `var(--velyon-x, <fallback>)`, this
 * file needs no JavaScript to react to dark/light mode: the theme
 * switcher only ever changes `data-theme` on <html> (§3), the
 * browser recalculates every var() automatically, and every plugin
 * declaration that reads a --vln-* token repaints on its own.
 *
 * --vln-accent-text / --vln-gold-text / --vln-warn-text exist
 * because the theme's --velyon-on-accent is a FIXED near-black
 * (§1) for text ON a solid accent button -- never for accent-
 * colored text on the plugin's own dark surfaces, which needs the
 * accent color itself, not its on-accent contrast color.
 *
 * --vln-warn -- the theme added --velyon-warning in response to
 * THEME-ASK-PROMPT.md (theme v1.1.3), using our exact proposed hex
 * as both the dark and light value, and it DOES flip with
 * data-theme like every other semantic token. Wired below the same
 * way as --vln-accent etc.
 * --------------------------------------------------------------- */

:root,
html[data-theme='dark'] {
	--vln-bg: var(--velyon-bg, #0b0d0f);
	--vln-surface: var(--velyon-surface, #0a0a0a);
	--vln-surface-alt: var(--velyon-surface-alt, #14171a);
	--vln-text: var(--velyon-text, #ffffff);
	--vln-text-muted: var(--velyon-text-muted, rgba(255, 255, 255, 0.6));
	--vln-border: var(--velyon-border, rgba(0, 206, 45, 0.25));

	--vln-accent: var(--velyon-accent, #00ce2d);
	--vln-accent-deep: var(--velyon-accent-deep, #00a824);
	--vln-accent-text: var(--velyon-accent, #00ce2d);

	--vln-gold: var(--velyon-gold, #ffd54a);
	--vln-gold-text: var(--velyon-gold, #ffd54a);

	--vln-danger: var(--velyon-danger, #ff5c5c);
	--vln-success: var(--velyon-success, #00ce2d);
	--vln-on-accent: var(--velyon-on-accent, #05170a);

	--vln-radius-s: var(--velyon-radius-s, 8px);
	--vln-radius-m: var(--velyon-radius-m, 14px);
	--vln-radius-l: var(--velyon-radius-l, 22px);
	--vln-shadow: var(--velyon-shadow, 0 8px 24px rgba(0, 0, 0, 0.35));

	--vln-warn: var(--velyon-warning, #ffb020);
	--vln-warn-text: var(--velyon-warning, #ffb020);
}

html[data-theme='light'] {
	--vln-bg: var(--velyon-bg, #f6f9f6);
	--vln-surface: var(--velyon-surface, #ffffff);
	--vln-surface-alt: var(--velyon-surface-alt, #eef3ee);
	--vln-text: var(--velyon-text, #12151a);
	--vln-text-muted: var(--velyon-text-muted, #5b636b);
	--vln-border: var(--velyon-border, #e1e6e2);

	--vln-accent: var(--velyon-accent, #00ce2d);
	--vln-accent-deep: var(--velyon-accent-deep, #0fa338);
	--vln-accent-text: var(--velyon-accent, #00ce2d);

	--vln-gold: var(--velyon-gold, #e0a200);
	--vln-gold-text: var(--velyon-gold, #e0a200);

	--vln-danger: var(--velyon-danger, #e5484d);
	--vln-success: var(--velyon-success, #0fa338);
	--vln-on-accent: var(--velyon-on-accent, #05170a);

	--vln-shadow: var(--velyon-shadow, 0 8px 24px rgba(20, 40, 25, 0.1));

	--vln-warn: var(--velyon-warning, #e0902a);
	--vln-warn-text: var(--velyon-warning, #e0902a);
}
