/**
 * Weingut Ritter — A11y-Basis (Classic-Theme ritter-shop, Shop-Instanz)
 * Ablage: wp-content/themes/ritter-shop/assets/css/a11y.css
 *
 * Kopierte Fassung aus wp-content/themes/ritter-brand/assets/css/a11y.css
 * (Issue #236) — nur generische, Woo-/Germanized-unabhaengige Regeln.
 * Bewusst NOCH NICHT ergaenzt (folgt erst mit der eigentlichen WooCommerce-
 * Integration, nicht Teil dieses Scaffold-Issues): `.woocommerce`-/Cart-/
 * Checkout-/Pagination-spezifische Regeln aus ritter-poc/assets/css/a11y.css
 * (Touch-Ziele fuer Warenkorb-Entfernen-Buttons, Pflichtfeld-/Fehler-/
 * Formularrahmen-Regeln, Kategorie-Dot-Kontur).
 */

/* ============================================================
   1) Screen-Reader-Text — SC 1.3.1 / 4.1.2
   ============================================================ */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	position: absolute !important;
	white-space: nowrap;
	word-wrap: normal !important;
}
/* Fokussierbarer SR-Text (z. B. Skip-Link) wird beim Tab sichtbar — SC 2.4.1 / 2.4.7. */
.screen-reader-text:focus {
	clip: auto;
	clip-path: none;
	width: auto;
	height: auto;
	margin: 0;
	padding: .6rem .9rem;
	background: var(--wr-color-base);
	color: var(--wr-color-primary);
	font: 700 var(--wr-text-sm) var(--wr-font-sans);
	border-radius: var(--wr-radius-md);
	box-shadow: var(--wr-shadow-md);
	position: fixed !important;
	top: .5rem;
	left: .5rem;
	z-index: 100000;
	white-space: normal;
}

/* ============================================================
   2) Fokus-Sichtbarkeit auch ohne :focus-visible — SC 2.4.7
   Fallback fuer Umgebungen/Controls, die :focus-visible nicht liefern.
   ============================================================ */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
	outline: 2px solid var(--wr-color-primary);
	outline-offset: 2px;
}
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
	outline: none;
}

/* ============================================================
   3) Klick-/Touch-Ziele — SC 2.5.5 (AAA) / 2.5.8-freundlich
   Generische Mindestgroesse fuer button-artige Elemente.
   ============================================================ */
button,
input[type="submit"],
.wp-block-button__link {
	min-height: 44px;
}

/* ============================================================
   4) Windows High Contrast / Forced Colors — SC 1.4.11 / 1.4.1
   ============================================================ */
@media (forced-colors: active) {
	a:focus,
	button:focus,
	input:focus,
	select:focus,
	textarea:focus,
	:focus-visible {
		outline: 2px solid Highlight !important;
		outline-offset: 2px;
	}
}
