/*
 * Automatische dunkle Ansicht (Dunkelgrün), wenn das Gerät auf „Dunkel“ steht – ohne Umschalter, ohne Speicher (D-019).
 * Die Farben kommen aus theme.json → settings.custom.dunkel (gleiche Werte wie die Stil-Variante „Dunkelgrün“).
 * Wer die Seite für alle dunkel möchte: Design → Editor → Stile → „Dunkelgrün“ auswählen.
 * Nur im Frontend geladen (der Editor bleibt hell).
 */
@media (prefers-color-scheme: dark) {
	:root body {
		--wp--preset--color--forest: var(--wp--custom--dunkel--forest);
		--wp--preset--color--leaf: var(--wp--custom--dunkel--leaf);
		--wp--preset--color--sand: var(--wp--custom--dunkel--sand);
		--wp--preset--color--campfire: var(--wp--custom--dunkel--campfire);
		--wp--preset--color--night: var(--wp--custom--dunkel--night);
		--wp--preset--color--white: var(--wp--custom--dunkel--white);
		--wp--custom--line: var(--wp--custom--dunkel--line);
		color-scheme: dark;
	}

	/* Fußbereich dunkel statt leuchtend hellgrün (gleiche Regel steht in der Stil-Variante „Dunkelgrün“). */
	:root body .jzs-fuss.has-background {
		background-color: var(--wp--preset--color--sand) !important;
		color: var(--wp--preset--color--night) !important;
	}

	:root body .jzs-fuss a:not(.wp-block-button__link) {
		color: var(--wp--preset--color--night) !important;
	}

	:root body .jzs-fuss .jzs-fuss__knopf:not(.is-style-outline) .wp-block-button__link {
		background: var(--wp--preset--color--night);
		color: var(--wp--preset--color--sand);
	}

	/* Logo (schwarze Linien) hell zeichnen; Countdown ruhig dunkel statt großer hellgrüner Fläche. */
	:root body .jzs-appnav__logo {
		filter: invert(1);
	}

	:root body .jzs-countdown {
		border: 1px solid var(--wp--preset--color--forest);
		background: var(--wp--preset--color--sand);
		color: var(--wp--preset--color--night);
	}

	:root body .jzs-countdown .jzs-countdown__knopf {
		background: var(--wp--preset--color--forest);
		color: var(--wp--preset--color--white);
	}
}
