/*!
Theme Name:   Gassmann Media
Theme URI:    https://gassmann-media.de/
Description:  Child-Theme für Josephine. Barrierefreie (WCAG 2.2 AA) und suchmaschinenoptimierte Website von Gassmann Media, Rinteln.
Author:       Peter Gaßmann
Author URI:   https://gassmann-media.de/
Template:     josephine
Version:      0.2.3
Requires at least: 6.8
Requires PHP: 8.0
Text Domain:  gassmann-media
License:      GPL-3.0-or-later
License URI:  https://www.gnu.org/licenses/gpl-3.0-standalone.html
*/

/* ==========================================================================
   Barrierefreiheit: ergänzende Styles zu Josephine
   ========================================================================== */

/* Deutlich sichtbarer Tastaturfokus (WCAG 2.4.7 / 2.4.13). */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
	border-radius: 2px;
}

/* Fokus auf dunklen Flächen. */
:where(.has-primary-background-color, .has-contrast-alt-background-color, .has-black-background-color)
:where(a, button, summary):focus-visible {
	outline-color: var(--wp--preset--color--white);
}

/* Markengrün-Flächen: Blau/Oliv hätten dort nur 2,2–2,4:1 Kontrast.
   Text, Links und Fokus daher immer dunkel (7,9:1). */
.has-secondary-mixed-background-color,
.has-secondary-mixed-background-color :where(a:not(.wp-element-button), h1, h2, h3, h4, h5, h6, p, li, summary) {
	color: var(--wp--preset--color--contrast-alt);
}
.has-secondary-mixed-background-color :where(a, button, summary):focus-visible {
	outline-color: var(--wp--preset--color--contrast-alt);
}

/* Links im Fließtext immer unterstrichen (nicht nur per Farbe erkennbar, WCAG 1.4.1). */
.entry-content :where(p, li, dd, td) a:not(.wp-element-button) {
	text-decoration: underline;
	text-decoration-thickness: .08em;
	text-underline-offset: .18em;
}
.entry-content :where(p, li, dd, td) a:not(.wp-element-button):hover {
	text-decoration-thickness: .16em;
}

/* Mindestgröße Klickflächen (WCAG 2.5.8). */
.wp-block-social-links .wp-social-link a,
.wp-block-navigation-item__content {
	min-width: 24px;
	min-height: 24px;
}

/* Aufklappbare FAQ (Details-Block). */
.wp-block-details {
	border-block-end: 1px solid var(--wp--preset--color--base-alt);
	padding-block: var(--wp--preset--spacing--s);
}
.wp-block-details summary {
	cursor: pointer;
	font-weight: 700;
	padding-block: var(--wp--preset--spacing--xs);
}
/* Josephine entfernt den Fokusrahmen bei <summary> – hier wiederherstellen. */
.wp-block-details summary:focus-visible {
	outline: 3px solid var(--wp--preset--color--primary) !important;
	outline-offset: 3px !important;
}
.has-secondary-mixed-background-color .wp-block-details summary:focus-visible {
	outline-color: var(--wp--preset--color--contrast-alt) !important;
}

/* Karten für Leistungen auf der Startseite: ganze Karte bleibt lesbar bei 400 % Zoom. */
.gm-card {
	height: 100%;
}

/* Bewegung reduzieren, wenn im System gewünscht (WCAG 2.3.3). */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}
