/**
 * Dark mode palette overrides
 *
 * Remaps the theme.json preset color custom properties to the dark
 * palette tokens (settings.custom.darkPalette, child-overridable) when
 * <html data-theme="dark"> is set by the dark-mode toggle. Presets are
 * emitted by core on :root (0,1,0); html[data-theme] (0,1,1) wins —
 * including over DB-stored user customizations — without !important.
 *
 * Anything styled with preset tokens (patterns, section combos, blocks)
 * flips automatically; hardcoded hex values in user content do not.
 */

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

	--wp--preset--color--base: var(--wp--custom--dark-palette--base, #0b122a);
	--wp--preset--color--surface: var(--wp--custom--dark-palette--surface, #131a36);
	--wp--preset--color--contrast: var(--wp--custom--dark-palette--contrast, #f0f2fa);
	--wp--preset--color--muted: var(--wp--custom--dark-palette--muted, #9aa1b5);
	--wp--preset--color--primary: var(--wp--custom--dark-palette--primary, #8a87f2);
	--wp--preset--color--primary-light: var(--wp--custom--dark-palette--primary-light, #1f2452);
	--wp--preset--color--primary-dark: var(--wp--custom--dark-palette--primary-dark, #a6a3f6);
	--wp--preset--color--accent: var(--wp--custom--dark-palette--accent, #2fd1ef);
	--wp--preset--color--accent-light: var(--wp--custom--dark-palette--accent-light, #173042);
	--wp--preset--color--outline: var(--wp--custom--dark-palette--outline, #4a4f63);
	--wp--preset--color--dark: var(--wp--custom--dark-palette--dark, #060b1d);
	--wp--preset--color--secondary: var(--wp--custom--dark-palette--secondary, #8d80fb);
	--wp--preset--color--tertiary: var(--wp--custom--dark-palette--tertiary, #35d4b8);
	--wp--preset--color--neutral: var(--wp--custom--dark-palette--neutral, #f7797d);
	--wp--preset--color--neutral-light: var(--wp--custom--dark-palette--neutral-light, #ee5f9b);
	--wp--preset--color--highlight: var(--wp--custom--dark-palette--highlight, #63eac6);
}
