/*
 * Naturata - Ergaenzungen zu theme.json
 *
 * Hier steht ausschliesslich, was theme.json unter WordPress 7.0 noch
 * nicht kann. Jeder Block traegt eine Begruendung. Waechst diese Datei
 * ohne Begruendung, ist etwas falsch gelaufen.
 */

/* --------------------------------------------------------------
   1. Sichtbarer Tastaturfokus
   Grund: :focus-visible ist in theme.json erst ab WP 7.1 abbildbar.
   Ohne diese Regel ist die Seite per Tastatur unbedienbar, sobald
   eigene Button-Styles den Browser-Default ueberschreiben.
   WCAG 2.4.7 und 2.4.11.
   -------------------------------------------------------------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--secondary);
	outline-offset: 2px;
	border-radius: var(--wp--custom--border-radius--klein);
}

/* Fokus darf nie unter einem klebenden Kopfbereich verschwinden. */
:root {
	scroll-padding-top: 6rem;
}

/* --------------------------------------------------------------
   2. Mindestgroesse von Klickzielen
   Grund: WCAG 2.2, Kriterium 2.5.8 verlangt 24 x 24 px.
   In theme.json nicht ausdrueckbar.
   -------------------------------------------------------------- */
.wp-block-navigation a,
.wp-element-button,
.wp-block-button__link {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Linklisten (v. a. Fusszeile): Zeilen liegen sonst nur 22 px
   auseinander — zu eng fuer Touch (Lighthouse target-size). */
.wp-block-list li {
	margin-block: 0.3rem;
}

.wp-block-list a {
	display: inline-block;
	padding-block: 0.2rem;
}

/* --------------------------------------------------------------
   3. Blockvarianten aus functions.php
   Grund: Block Styles brauchen ihr CSS ausserhalb von theme.json,
   solange sie nicht ueber styles.blocks abgebildet werden koennen.
   -------------------------------------------------------------- */
.wp-block-group.is-style-karte {
	background-color: var(--wp--preset--color--base-2);
	border-radius: var(--wp--custom--border-radius--karte);
	padding: var(--wp--preset--spacing--50);
}

.wp-block-group.is-style-hinweis {
	background-color: var(--wp--preset--color--base-2);
	border-left: 4px solid var(--wp--preset--color--primary);
	border-radius: 0 var(--wp--custom--border-radius--klein) var(--wp--custom--border-radius--klein) 0;
	padding: var(--wp--preset--spacing--40);
}

.wp-block-button.is-style-sekundaer .wp-block-button__link {
	background-color: transparent;
	color: var(--wp--preset--color--primary);
	box-shadow: inset 0 0 0 2px currentColor;
}

.wp-block-button.is-style-sekundaer .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--weiss);
}

/* --------------------------------------------------------------
   4. Bewegung reduzieren
   Grund: WCAG 2.3.3. Nutzer mit vestibulaeren Beschwerden.
   -------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important; /* Absicht: Systemeinstellung schlaegt Gestaltung. */
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* --------------------------------------------------------------
   5. Sprungmarke zum Inhalt
   Grund: WCAG 2.4.1. Erst bei Fokus sichtbar.
   -------------------------------------------------------------- */
.naturata-sprungmarke {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999;
	padding: 0.75rem 1.25rem;
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--base);
	text-decoration: none;
}

.naturata-sprungmarke:focus {
	left: 0;
}

/* --------------------------------------------------------------
   6. Fusszeile
   Grund: die Listen des Editors bringen Aufzaehlungspunkte und
   einen Einzug mit. In einer Linkspalte ist beides Ballast - die
   Eintraege sollen auf derselben Kante stehen wie ihre Ueberschrift.
   -------------------------------------------------------------- */
footer.wp-block-group .wp-block-list {
	list-style: none;
	padding-left: 0;
	margin-left: 0;
}

/* --------------------------------------------------------------
   7. Karten in Spalten auf gleiche Hoehe
   Grund: der Spaltenblock streckt zwar die Spalte, nicht aber die
   Karte darin. Nebeneinander stehende Karten endeten dadurch je
   nach Textmenge auf verschiedenen Hoehen.
   -------------------------------------------------------------- */
.wp-block-columns .wp-block-column > .wp-block-group.is-style-karte {
	height: 100%;
}

.wp-block-columns .wp-block-column {
	display: flex;
	flex-direction: column;
}
