/* Farb-Token: Hell ist der Standard, Dunkel folgt prefers-color-scheme oder der
   gemerkten Wahl (html[data-farbschema], gesetzt vom Skript im <head> und vom
   Block tomtut/farbschema). Die Presets "weiss", "primary", "akzent" und
   "heimwerker" bleiben in beiden Modi gleich; neutrale Presets (sekundaer, text,
   schwarz, hellgrau, dunkelgrau) und warnung
   wechseln. Hausblau = Preset primary (#34A2E6, Quelle: theme.json); Hover und
   dunkle Kopffläche leiten sich per color-mix daraus ab. Diese Datei wird nur im Frontend geladen. */
html:root {
	color-scheme: light;
	--tt-seite: #ffffff;
	--tt-flaeche: #ffffff;
	--tt-rand: rgba(0, 0, 0, 0.12);
	--tt-knopf: var(--wp--preset--color--primary);
	--tt-knopf-hover: color-mix(in srgb, var(--wp--preset--color--primary) 78%, #000);
	--tt-kopf-flaeche: var(--wp--preset--color--primary);
	--tt-kopf-bg: rgba(255, 255, 255, 0.8);
	--tt-logo-invert: 0;
	--tt-foto-flaeche: transparent;
	--tt-foto-polster: 0px;
	--tt-schatten: rgba(0, 0, 0, 0.12);
}

@media (prefers-color-scheme: dark) {
	html:root:not([data-farbschema="hell"]) {
		color-scheme: dark;
		--tt-seite: #14181c;
		--tt-flaeche: #1c2127;
		--tt-rand: rgba(255, 255, 255, 0.18);
		--tt-knopf: var(--wp--preset--color--primary);
		--tt-knopf-hover: color-mix(in srgb, var(--wp--preset--color--primary) 78%, #000);
		--tt-kopf-flaeche: color-mix(in srgb, var(--wp--preset--color--primary) 50%, #000);
		--tt-kopf-bg: rgba(20, 24, 28, 0.88);
		--tt-logo-invert: 1;
		--tt-foto-flaeche: #ffffff;
		--tt-foto-polster: 8px;
		--tt-schatten: rgba(0, 0, 0, 0.5);
		--wp--preset--color--sekundaer: #c5cbd1;
		--wp--preset--color--text: #9aa3ab;
		--wp--preset--color--schwarz: #f2f4f6;
		--wp--preset--color--hellgrau: #262c33;
		--wp--preset--color--dunkelgrau: #6b747d;
		--wp--preset--color--warnung: #ff7a70;
	}
}

html:root[data-farbschema="dunkel"] {
	color-scheme: dark;
	--tt-seite: #14181c;
	--tt-flaeche: #1c2127;
	--tt-rand: rgba(255, 255, 255, 0.18);
	--tt-knopf: var(--wp--preset--color--primary);
	--tt-knopf-hover: color-mix(in srgb, var(--wp--preset--color--primary) 78%, #000);
	--tt-kopf-flaeche: color-mix(in srgb, var(--wp--preset--color--primary) 50%, #000);
	--tt-kopf-bg: rgba(20, 24, 28, 0.88);
	--tt-logo-invert: 1;
	--tt-foto-flaeche: #ffffff;
	--tt-foto-polster: 8px;
	--tt-schatten: rgba(0, 0, 0, 0.5);
	--wp--preset--color--sekundaer: #c5cbd1;
	--wp--preset--color--text: #9aa3ab;
	--wp--preset--color--schwarz: #f2f4f6;
	--wp--preset--color--hellgrau: #262c33;
	--wp--preset--color--dunkelgrau: #6b747d;
	--wp--preset--color--warnung: #ff7a70;
}


/* Suche (Overlay von mwd-search-pro): Das Plugin setzt seine Farben als
   Inline-Stil mit ID-Selektoren, darum hier mit höherer Spezifität in beiden
   Dunkel-Varianten (System und Umschalter). */
@media (prefers-color-scheme: dark) {
	html:root:not([data-farbschema="hell"]) #mwd-search-wrap #mwd-search-overlay,
	html:root:not([data-farbschema="hell"]) #mwd-search-wrap #mwd-search-overlay-header {
		background-color: var(--tt-seite);
		color: var(--wp--preset--color--sekundaer);
	}

	html:root:not([data-farbschema="hell"]) #mwd-search-wrap #mwd-search-input {
		background-color: var(--wp--preset--color--hellgrau);
		border-color: var(--tt-rand);
		border-bottom: 2px solid var(--tt-rand);
		color: var(--wp--preset--color--schwarz);
	}

	html:root:not([data-farbschema="hell"]) #mwd-search-wrap #mwd-search-input::placeholder {
		color: var(--wp--preset--color--sekundaer);
		opacity: 1;
	}

	html:root:not([data-farbschema="hell"]) #mwd-search-wrap #mwd-search-input:hover {
		border-bottom-color: var(--wp--preset--color--primary);
	}

	html:root:not([data-farbschema="hell"]) #mwd-search-wrap #mwd-search-input:focus,
	html:root:not([data-farbschema="hell"]) #mwd-search-wrap #mwd-search-input:focus-visible {
		border-bottom-color: var(--tt-knopf);
		outline: none;
		box-shadow: none;
	}

	html:root:not([data-farbschema="hell"]) #mwd-search-wrap #mwd-search-input-wrap svg path,
	html:root:not([data-farbschema="hell"]) #mwd-search-wrap #mwd-search-close path {
		fill: var(--wp--preset--color--sekundaer);
	}

	html:root:not([data-farbschema="hell"]) #mwd-search-wrap #mwd-search-close:hover path {
		fill: var(--wp--preset--color--schwarz);
	}

	html:root:not([data-farbschema="hell"]) #mwd-search-wrap #mwd-search-results-count,
	html:root:not([data-farbschema="hell"]) #mwd-search-wrap .mwd-search-date,
	html:root:not([data-farbschema="hell"]) #mwd-search-wrap .mwd-search-excerpt,
	html:root:not([data-farbschema="hell"]) #mwd-search-wrap .mwd-search-price s,
	html:root:not([data-farbschema="hell"]) #mwd-search-wrap .mwd-search-suggestions .mwd-suggestion-item,
	html:root:not([data-farbschema="hell"]) #mwd-search-wrap .mwd-suggestions-headline {
		color: var(--wp--preset--color--sekundaer);
	}

	html:root:not([data-farbschema="hell"]) #mwd-search-wrap .mwd-search-suggestions .mwd-suggestion-item:hover {
		color: var(--wp--preset--color--schwarz);
	}

	html:root:not([data-farbschema="hell"]) #mwd-search-wrap #mwd-search-results li {
		background-color: var(--tt-flaeche);
		border-color: var(--tt-rand);
	}

	html:root:not([data-farbschema="hell"]) #mwd-search-wrap #mwd-search-results li:hover,
	html:root:not([data-farbschema="hell"]) #mwd-search-wrap #mwd-search-results li:focus-within {
		border-color: var(--tt-knopf);
	}

	html:root:not([data-farbschema="hell"]) #mwd-search-wrap #mwd-search-results li a:focus-visible {
		outline: 2px solid var(--tt-knopf);
		outline-offset: 2px;
	}

	html:root:not([data-farbschema="hell"]) #mwd-search-wrap .mwd-search-title,
	html:root:not([data-farbschema="hell"]) #mwd-search-wrap .mwd-search-price {
		color: var(--wp--preset--color--schwarz);
	}

	html:root:not([data-farbschema="hell"]) #mwd-search-wrap .mwd-search-price strong {
		color: var(--wp--preset--color--primary);
	}

	html:root:not([data-farbschema="hell"]) #mwd-search-wrap #mwd-search-logo img {
		filter: invert(var(--tt-logo-invert));
	}

	html:root:not([data-farbschema="hell"]) #mwd-search-wrap #mwd-search-brand {
		background-color: var(--wp--preset--color--hellgrau);
		color: var(--wp--preset--color--schwarz);
	}

	html:root:not([data-farbschema="hell"]) #mwd-search-wrap #mwd-search-brand > span {
		color: var(--wp--preset--color--primary);
	}

	html:root:not([data-farbschema="hell"]) #mwd-search-wrap .mwd-search-posttype {
		background-color: var(--wp--preset--color--hellgrau);
		color: var(--wp--preset--color--sekundaer);
		box-shadow: 0 0 3px var(--tt-schatten);
	}

	html:root:not([data-farbschema="hell"]) #mwd-search-wrap button.mwd-search-filter-button {
		color: var(--wp--preset--color--sekundaer);
	}

	html:root:not([data-farbschema="hell"]) #mwd-search-wrap button.mwd-search-filter-button:hover,
	html:root:not([data-farbschema="hell"]) #mwd-search-wrap button.mwd-search-filter-button:focus,
	html:root:not([data-farbschema="hell"]) #mwd-search-wrap button.mwd-search-filter-button.active {
		color: var(--wp--preset--color--schwarz);
		border-bottom-color: var(--tt-knopf);
		background-color: transparent;
	}

	html:root:not([data-farbschema="hell"]) #mwd-search-wrap #mwd-search-spinner .mwd-spinner {
		border-color: var(--tt-rand);
		border-top-color: var(--tt-knopf);
	}

}

html:root[data-farbschema="dunkel"] #mwd-search-wrap #mwd-search-overlay,
html:root[data-farbschema="dunkel"] #mwd-search-wrap #mwd-search-overlay-header {
	background-color: var(--tt-seite);
	color: var(--wp--preset--color--sekundaer);
}

html:root[data-farbschema="dunkel"] #mwd-search-wrap #mwd-search-input {
	background-color: var(--wp--preset--color--hellgrau);
	border-color: var(--tt-rand);
	border-bottom: 2px solid var(--tt-rand);
	color: var(--wp--preset--color--schwarz);
}

html:root[data-farbschema="dunkel"] #mwd-search-wrap #mwd-search-input::placeholder {
	color: var(--wp--preset--color--sekundaer);
	opacity: 1;
}

html:root[data-farbschema="dunkel"] #mwd-search-wrap #mwd-search-input:hover {
	border-bottom-color: var(--wp--preset--color--primary);
}

html:root[data-farbschema="dunkel"] #mwd-search-wrap #mwd-search-input:focus,
html:root[data-farbschema="dunkel"] #mwd-search-wrap #mwd-search-input:focus-visible {
	border-bottom-color: var(--tt-knopf);
	outline: none;
	box-shadow: none;
}

html:root[data-farbschema="dunkel"] #mwd-search-wrap #mwd-search-input-wrap svg path,
html:root[data-farbschema="dunkel"] #mwd-search-wrap #mwd-search-close path {
	fill: var(--wp--preset--color--sekundaer);
}

html:root[data-farbschema="dunkel"] #mwd-search-wrap #mwd-search-close:hover path {
	fill: var(--wp--preset--color--schwarz);
}

html:root[data-farbschema="dunkel"] #mwd-search-wrap #mwd-search-results-count,
html:root[data-farbschema="dunkel"] #mwd-search-wrap .mwd-search-date,
html:root[data-farbschema="dunkel"] #mwd-search-wrap .mwd-search-excerpt,
html:root[data-farbschema="dunkel"] #mwd-search-wrap .mwd-search-price s,
html:root[data-farbschema="dunkel"] #mwd-search-wrap .mwd-search-suggestions .mwd-suggestion-item,
html:root[data-farbschema="dunkel"] #mwd-search-wrap .mwd-suggestions-headline {
	color: var(--wp--preset--color--sekundaer);
}

html:root[data-farbschema="dunkel"] #mwd-search-wrap .mwd-search-suggestions .mwd-suggestion-item:hover {
	color: var(--wp--preset--color--schwarz);
}

html:root[data-farbschema="dunkel"] #mwd-search-wrap #mwd-search-results li {
	background-color: var(--tt-flaeche);
	border-color: var(--tt-rand);
}

html:root[data-farbschema="dunkel"] #mwd-search-wrap #mwd-search-results li:hover,
html:root[data-farbschema="dunkel"] #mwd-search-wrap #mwd-search-results li:focus-within {
	border-color: var(--tt-knopf);
}

html:root[data-farbschema="dunkel"] #mwd-search-wrap #mwd-search-results li a:focus-visible {
	outline: 2px solid var(--tt-knopf);
	outline-offset: 2px;
}

html:root[data-farbschema="dunkel"] #mwd-search-wrap .mwd-search-title,
html:root[data-farbschema="dunkel"] #mwd-search-wrap .mwd-search-price {
	color: var(--wp--preset--color--schwarz);
}

html:root[data-farbschema="dunkel"] #mwd-search-wrap .mwd-search-price strong {
	color: var(--wp--preset--color--primary);
}

html:root[data-farbschema="dunkel"] #mwd-search-wrap #mwd-search-logo img {
	filter: invert(var(--tt-logo-invert));
}

html:root[data-farbschema="dunkel"] #mwd-search-wrap #mwd-search-brand {
	background-color: var(--wp--preset--color--hellgrau);
	color: var(--wp--preset--color--schwarz);
}

html:root[data-farbschema="dunkel"] #mwd-search-wrap #mwd-search-brand > span {
	color: var(--wp--preset--color--primary);
}

html:root[data-farbschema="dunkel"] #mwd-search-wrap .mwd-search-posttype {
	background-color: var(--wp--preset--color--hellgrau);
	color: var(--wp--preset--color--sekundaer);
	box-shadow: 0 0 3px var(--tt-schatten);
}

html:root[data-farbschema="dunkel"] #mwd-search-wrap button.mwd-search-filter-button {
	color: var(--wp--preset--color--sekundaer);
}

html:root[data-farbschema="dunkel"] #mwd-search-wrap button.mwd-search-filter-button:hover,
html:root[data-farbschema="dunkel"] #mwd-search-wrap button.mwd-search-filter-button:focus,
html:root[data-farbschema="dunkel"] #mwd-search-wrap button.mwd-search-filter-button.active {
	color: var(--wp--preset--color--schwarz);
	border-bottom-color: var(--tt-knopf);
	background-color: transparent;
}

html:root[data-farbschema="dunkel"] #mwd-search-wrap #mwd-search-spinner .mwd-spinner {
	border-color: var(--tt-rand);
	border-top-color: var(--tt-knopf);
}

