/**
 * ChaptrHQ design tokens (build brief, 12.3).
 *
 * Every plugin color is a custom property here. Light values apply by default
 * and under data-chq-theme="light"; dark values under data-chq-theme="dark" on
 * <html>. The chapter's brand colors are printed after this file as a small
 * inline override, only for values that differ.
 */

:root,
[data-chq-theme="light"] {
	color-scheme: light;

	--chq-bg: #ffffff;
	--chq-surface: #ffffff;
	--chq-surface-2: #f4f5f7;
	--chq-text: #1a1d23;
	--chq-text-muted: #545b67;
	--chq-border: #d6d9de;

	--chq-accent: #2c5282;
	--chq-accent-soft: rgba(44, 82, 130, 0.12);
	--chq-button: #2c5282;
	--chq-button-text: #ffffff;
	--chq-link: #2c5282;
	--chq-focus: #2c5282;

	--chq-success: #1e7b3c;
	--chq-success-soft: rgba(30, 123, 60, 0.12);
	--chq-warning: #8a5a00;
	--chq-warning-soft: rgba(176, 116, 0, 0.14);
	--chq-danger: #b42318;
	--chq-danger-soft: rgba(180, 35, 24, 0.1);

	--chq-radius: 8px;
	--chq-logo-height: 48px;
	--chq-logo-height-mobile: 36px;
}

[data-chq-theme="dark"] {
	color-scheme: dark;

	--chq-bg: #0f1115;
	--chq-surface: #181b21;
	--chq-surface-2: #20242c;
	--chq-text: #e8eaee;
	--chq-text-muted: #a3aab6;
	--chq-border: #343b47;

	--chq-accent: #90b4e8;
	--chq-accent-soft: rgba(144, 180, 232, 0.18);
	--chq-button: #90b4e8;
	--chq-button-text: #111111;
	--chq-link: #90b4e8;
	--chq-focus: #90b4e8;

	--chq-success: #5cc98a;
	--chq-success-soft: rgba(92, 201, 138, 0.16);
	--chq-warning: #f0b849;
	--chq-warning-soft: rgba(240, 184, 73, 0.16);
	--chq-danger: #f97066;
	--chq-danger-soft: rgba(249, 112, 102, 0.16);
}

/* A short color fade while switching modes, unless reduced motion is asked for. */
@media (prefers-reduced-motion: no-preference) {
	html.chq-theme-switching,
	html.chq-theme-switching * {
		transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, fill 0.2s ease !important;
	}
}
