/**
 * Blanky Nordic — dark mode (toggle).
 *
 * assets/js/nordic.js adds `is-dark` to <html>. Every variation then takes the
 * Nordic Midnight values: only the presets and custom tokens change, and every
 * rule in the theme reads those. html.is-dark (0-1-1) outranks core's :root
 * (0-1-0), where the presets are printed.
 *
 * Keep these values in step with styles/midnight.json.
 *
 * @package Blanky_Nordic
 * @since   3.7
 */

html.is-dark {
	--wp--preset--color--primary: #c19e6b;
	--wp--preset--color--secondary: #f8f8f8;
	--wp--preset--color--accent: #c19e6b;
	--wp--preset--color--highlight: #d4b98a;
	--wp--preset--color--foreground: #f8f8f8;
	--wp--preset--color--background: #141a28;
	--wp--preset--color--surface: #1a2130;
	--wp--preset--color--muted: #9ca3af;
	--wp--preset--color--border: #2a3244;
	--wp--custom--nordic--rule: #2a3244;
	--wp--custom--nordic--footer-background: #000;
	--wp--custom--nordic--invert-foreground: #f8f8f8;
	--wp--custom--nordic--invert-foreground-soft: rgba(248, 248, 248, 0.72);
	--wp--custom--nordic--invert-line: rgba(193, 158, 107, 0.2);
	color-scheme: dark;
}

/*
 * Filled buttons: light text on gold is 2.36:1, so the text takes the page
 * colour (6.93:1). Kept at 0-1-1 with :where() so it only beats core's global
 * button colour (0-1-0): the header search icon and the outline share buttons
 * (both 0-2-0) keep their own colours. The search button carries
 * .wp-element-button too, and at a higher weight this made its icon vanish.
 */
html.is-dark :where(.wp-element-button, .wp-block-button__link) {
	color: var(--wp--preset--color--background);
}
