/**
 * Toegankelijkheid (WCAG 2.2 AA) — focusstijlen, verminderde beweging en
 * tikdoelgrootte op mobiel.
 * Verbeterplan 07-toegankelijkheid.md (TOE-02, TOE-09, focus zichtbaarheid
 * 2.4.7, prefers-reduced-motion).
 *
 * Laadt als allerlaatste stylesheet (prioriteit 1000 op wp_enqueue_scripts,
 * ná inc/assets/design-tokens.css op 999), zodat deze regels niet per
 * ongeluk worden overschreven door eerdere CSS met !important.
 *
 * Ontwerp G (verbeterplan/ontwerpen/g-complete-webshop.html):
 * focus-ring in amber, 3px, 2px buiten het element. Amber op wit haalt
 * zelf geen 3:1 (WCAG 1.4.11), daarom ligt er een smalle inkt-ring tussen
 * element en amber (zelfde principe als geel-op-zwart bij GOV.UK): amber
 * tegen inkt en inkt tegen wit halen allebei ruim 3:1, op elke achtergrond.
 * Die binnenring staat in een :where() zonder specificiteit, zodat
 * componenten met een eigen box-shadow (bv. omrande pilknoppen, het
 * zoekveld in de header) hun eigen focusweergave houden.
 *
 * Skip-link: één skip-link in header.php (`a.skip-link.cs-skip-link`); de
 * G-weergave ervan staat hieronder (sectie 2) en wint van header.css
 * doordat dit bestand als laatste laadt én een hogere specificiteit heeft.
 *
 * Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
 * Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
 * Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
 */

/* ------------------------------------------------------------------
 * 1. Zichtbare focus-ring voor toetsenbordgebruikers (WCAG 2.4.7)
 * ------------------------------------------------------------------ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--kleur-focus) !important;
	outline-offset: 2px !important;
}

:where(a, button, input, select, textarea, summary, [tabindex]):where(:focus-visible) {
	box-shadow: 0 0 0 2px var(--kleur-inkt);
}

/* Fallback voor browsers zonder :focus-visible-ondersteuning: toegankelijkheid.js
   zet de class "cs-a11y-keyboard" op <body> zodra met Tab genavigeerd wordt
   (en haalt hem weg zodra er met de muis geklikt wordt), zodat muisgebruikers
   geen ring te zien krijgen maar toetsenbordgebruikers altijd wel. */
body.cs-a11y-keyboard a:focus,
body.cs-a11y-keyboard button:focus,
body.cs-a11y-keyboard input:focus,
body.cs-a11y-keyboard select:focus,
body.cs-a11y-keyboard textarea:focus,
body.cs-a11y-keyboard summary:focus,
body.cs-a11y-keyboard [tabindex]:focus {
	outline: 3px solid var(--kleur-focus) !important;
	outline-offset: 2px !important;
}

/* ------------------------------------------------------------------
 * 2. Skip-link (header.php) en verborgen labels, G-stijl
 * ------------------------------------------------------------------ */

/* Verborgen voor het oog, wel voorgelezen (G: .vv). Ook de WordPress-class
   .screen-reader-text, behalve wanneer hij focus heeft (skip-link). */
.cs-vv,
.screen-reader-text:not(:focus):not(:active) {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

body a.skip-link.cs-skip-link:focus {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 100000;
	display: inline-flex;
	align-items: center;
	width: auto;
	height: auto;
	min-height: 48px;
	margin: 0;
	padding: 0 22px;
	clip: auto;
	clip-path: none;
	overflow: visible;
	white-space: nowrap;
	border: 0;
	border-radius: var(--radius-rond);
	background: var(--kleur-groen);
	color: var(--kleur-wit);
	font-family: var(--font-tekst);
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: 0 0 0 2px var(--kleur-inkt), 0 6px 18px color-mix(in srgb, var(--kleur-inkt) 25%, transparent);
}

/* ------------------------------------------------------------------
 * 3. Verminderde beweging (WCAG 2.3.3) — vangnet bovenop de bestaande
 *    instelling, voor het geval nieuwe animaties worden toegevoegd
 * ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-delay: 0ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		transition-delay: 0ms !important;
		scroll-behavior: auto !important;
	}
}

/* ------------------------------------------------------------------
 * 4. Tikdoelgrootte op mobiel, min. 24x24 px raakvlak (WCAG 2.5.8)
 * ------------------------------------------------------------------ */
@media (max-width: 767px) {
	/* Verwijderknop in de winkelwagen ("×"), was 22x22 px */
	.woocommerce a.remove {
		width: 32px;
		height: 32px;
		line-height: 32px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	/* Kruimelpadlinks: extra padding zonder het lettertype te vergroten */
	.woocommerce-breadcrumb a {
		display: inline-block;
		padding: 6px 2px;
	}

	/* Keuzerondjes: afrekenen (betaalwijze) en PPOM-productopties
	   (bv. cadeauverpakking), waren 13x13 px */
	.woocommerce-checkout input[type="radio"],
	.woocommerce-checkout input[type="checkbox"],
	.ppom-wrapper input[type="radio"],
	.ppom-wrapper input[type="checkbox"],
	.woocommerce form .form-row input[type="radio"],
	.woocommerce form .form-row input[type="checkbox"] {
		width: 24px;
		height: 24px;
	}

	/* "Wachtwoord weergeven"-knop op Mijn account */
	.show-password-input,
	.woocommerce-Button.button.show-password-input {
		min-width: 24px;
		min-height: 24px;
	}

	/* Icoon-only links/knoppen: sociale iconen, WhatsApp, carrousel-bolletjes */
	.elementor-icon,
	a.elementor-icon,
	.elementor-social-icon,
	.elementor-slides .swiper-pagination-bullet,
	.cs-footer-whatsapp-link,
	.cs-menu-toggle {
		min-width: 24px;
		min-height: 24px;
	}
}
