/*
Theme Name:        AHundV (Twenty Twenty-Five)
Theme URI:         https://ahundv.de/
Description:       Child-Theme von Twenty Twenty-Five für ahundv.de. Farbschema A2 „Decke und Fell“ (WCAG 2.2 AA, Fließtext AAA): marineblaue Kopf- und Fußzeile, Beitragsliste mit Fellrot-Linie und Kategorie-Chip, Seitenleiste „Wer hier schreibt“. Impressum und Datenschutz stehen dauerhaft in der Fußzeile. Dunkelmodus mit Schalter in der Kopfzeile.
Author:            AHundV
Author URI:        https://ahundv.de/
Template:          twentytwentyfive
Version:           2.3.0
Requires at least: 6.7
Tested up to:      7.1
Requires PHP:      7.4
License:           GNU General Public License v2 or later
License URI:       http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       ahundv
*/

/* ==========================================================================
   Ergänzungen zu theme.json
   Farben stehen in theme.json (CI/tt25-child-theme.json, ergänzt um
   settings.custom für Links und Linien). Dunkelmodus: assets/css/dunkelmodus.css.
   Hier nur, was theme.json nicht ausdrücken kann.
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. Fußzeile bleibt am unteren Rand, auch bei wenig Inhalt
   -------------------------------------------------------------------------- */

.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
	min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
}

.wp-site-blocks > footer.wp-block-template-part,
.wp-site-blocks > footer:last-child {
	margin-top: auto;
}


/* --------------------------------------------------------------------------
   2. Navigation: aktiver Menüpunkt fett mit Unterstrich 3 px
   (auf Marine weiß, weil die Linkfarbe dort currentColor ist)
   -------------------------------------------------------------------------- */

.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation .wp-block-navigation-item__content[aria-current="page"] {
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 3px;
	text-underline-offset: 0.35em;
}


/* --------------------------------------------------------------------------
   3. Links und Fokus auf dunklen Flächen
   Globale Linkfarbe ist Marineblau; auf Marine, Marine dunkel und Fellrot
   übernehmen Links die weiße Schrift der Fläche.
   -------------------------------------------------------------------------- */

.has-accent-1-background-color a:where(:not(.wp-element-button)),
.has-accent-2-background-color a:where(:not(.wp-element-button)),
.has-accent-3-background-color a:where(:not(.wp-element-button)),
.has-accent-1-background-color a:where(:not(.wp-element-button)):hover,
.has-accent-2-background-color a:where(:not(.wp-element-button)):hover,
.has-accent-3-background-color a:where(:not(.wp-element-button)):hover,
.has-accent-1-background-color a:where(:not(.wp-element-button)):focus,
.has-accent-2-background-color a:where(:not(.wp-element-button)):focus,
.has-accent-3-background-color a:where(:not(.wp-element-button)):focus {
	color: currentColor;
}

.has-accent-1-background-color :where(a, button):focus-visible,
.has-accent-3-background-color :where(a, button):focus-visible,
.is-style-section-2 :where(a, button):focus-visible,
.is-style-section-3 :where(a, button):focus-visible,
.is-style-section-4 :where(a, button):focus-visible,
.wp-block-cover :where(a, button):focus-visible {
	outline-color: var(--wp--preset--color--white);
}


/* --------------------------------------------------------------------------
   4. Beitragsliste und Beitragskopf
   -------------------------------------------------------------------------- */

/* Fellrot-Linie über jedem Beitrag */
hr.wp-block-separator.ahundv-linie {
	border-bottom-width: 2px;
	color: var(--wp--custom--linie);
	opacity: 1;
	width: 100%;
}

/* Kategorie-Chips mit Abstand (das Trennzeichen blendet theme.json aus) */
.wp-block-post-terms.taxonomy-category {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
}

/* Schlagwörter (Stil „Pill shaped“ des Eltern-Themes) ebenfalls mit Abstand */
.wp-block-post-terms.is-style-post-terms-1 {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
}

/* Meta-Zeile: Datum · Autor */
.ahundv-meta > * + *::before {
	content: "\00b7";
	content: "\00b7" / "";
	margin-right: 0.5em;
}


/* --------------------------------------------------------------------------
   5. Vor- und Zurückblättern als Button
   -------------------------------------------------------------------------- */

.ahundv-blaettern .wp-block-post-navigation-link a {
	background-color: var(--wp--preset--color--accent-1);
	border-radius: 4px;
	color: var(--wp--preset--color--white);
	display: inline-block;
	padding: 0.7em 1.4em;
	text-decoration: none;
}

.ahundv-blaettern .wp-block-post-navigation-link a:hover,
.ahundv-blaettern .wp-block-post-navigation-link a:focus {
	background-color: var(--wp--preset--color--accent-2);
	color: var(--wp--preset--color--white);
	text-decoration: underline;
}

.ahundv-blaettern .post-navigation-link__label {
	font-weight: 600;
}


/* --------------------------------------------------------------------------
   6. Große Überschrift in hellem Fellrot (Blockstil)
   Nur H1 und H2: ab 24 px (4,31:1). H3 ist in Twenty Twenty-Five kleiner.
   -------------------------------------------------------------------------- */

h1.is-style-ahundv-fellrot,
h2.is-style-ahundv-fellrot {
	color: var(--wp--preset--color--accent-light);
}


/* --------------------------------------------------------------------------
   7. Links/rechts ausgerichtete Bilder an der Textspalte
   Der Beitragsinhalt ist volle Breite, die Textspalte 645 px. WordPress setzt
   umflossene Blöcke sonst an den Rand des Inhaltsbereichs (Seitenrand);
   der zusätzliche Abstand rückt sie an den Rand der Textspalte.
   -------------------------------------------------------------------------- */

body .wp-block-post-content.is-layout-constrained > .alignleft {
	margin-inline-start: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2));
}

body .wp-block-post-content.is-layout-constrained > .alignright {
	margin-inline-end: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2));
}


/* --------------------------------------------------------------------------
   8. Markierung im Text
   -------------------------------------------------------------------------- */

mark:not(.has-inline-color) {
	background-color: var(--wp--preset--color--highlight);
	color: var(--wp--preset--color--contrast);
}


/* --------------------------------------------------------------------------
   9. Suche
   Menüpunkt „Suche“ mit Lupe (dekorativ, Farbe der Schrift), Trefferzahl,
   Hinweis bei keinen Treffern mit Kategorien als Chips.
   -------------------------------------------------------------------------- */

.ahundv-suche-link .wp-block-navigation-item__content::before {
	content: "";
	display: inline-block;
	width: 0.9em;
	height: 0.9em;
	margin-right: 0.35em;
	vertical-align: -0.08em;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.5 2a8.5 8.5 0 0 1 6.75 13.67l4.54 4.54a1.12 1.12 0 0 1-1.58 1.58l-4.54-4.54A8.5 8.5 0 1 1 10.5 2zm0 2.25a6.25 6.25 0 1 0 0 12.5 6.25 6.25 0 0 0 0-12.5z'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.5 2a8.5 8.5 0 0 1 6.75 13.67l4.54 4.54a1.12 1.12 0 0 1-1.58 1.58l-4.54-4.54A8.5 8.5 0 1 1 10.5 2zm0 2.25a6.25 6.25 0 1 0 0 12.5 6.25 6.25 0 0 0 0-12.5z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Suchfeld auf der Suchseite: Abstand zur Trefferzahl bzw. zur Liste */
.ahundv-suchfeld {
	margin-block-end: var(--wp--preset--spacing--40);
}

.ahundv-suche-anzahl {
	color: var(--wp--preset--color--accent-4);
	font-size: var(--wp--preset--font-size--medium);
}

/* Keine Treffer: wie der Blockstil „Hinweis“ */
.ahundv-suche-leer {
	background-color: var(--wp--preset--color--highlight);
	border-left: 4px solid var(--wp--custom--linie);
	color: var(--wp--preset--color--contrast);
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
}

.ahundv-suche-leer > p {
	margin: 0;
}

/* Kategorien als Chips, wie in der Beitragsliste */
.ahundv-suche-kategorien {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
	list-style: none;
	margin: var(--wp--preset--spacing--30) 0 0;
	padding: 0;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.ahundv-suche-kategorien li {
	margin: 0;
}

.ahundv-suche-kategorien a {
	background: var(--wp--preset--color--accent-3);
	border-radius: 3px;
	color: var(--wp--preset--color--white);
	display: inline-block;
	padding: 0.15em 0.55em;
	text-decoration: none;
	white-space: nowrap;
}

.ahundv-suche-kategorien a:hover,
.ahundv-suche-kategorien a:focus {
	background: var(--wp--preset--color--accent-2);
	color: var(--wp--preset--color--white);
}
