/**
 * ATS Bergamo - Correzioni accessibilita WCAG 2.2 AA
 */

:root {
	--ats-a11y-focus: #005fcc;
	--ats-a11y-warning-text: #8a4a00;
	--ats-a11y-muted-text: #66758a;
}

/* Testo disponibile agli screen reader ma non visibile nel layout. */
.ats-a11y-sr-only,
.ats-a11y-footer-heading {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Focus sempre riconoscibile, anche sopra immagini e colori del tema. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--ats-a11y-focus) !important;
	outline-offset: 3px !important;
	box-shadow: 0 0 0 2px #fff !important;
}

.home-events-search-submit {
	background: var(--ats-a11y-warning-text) !important;
	color: #fff !important;
}

.home-events-search-submit:hover,
.home-events-search-submit:focus-visible {
	background: #6f3b00 !important;
}

/* Contrasto: #8a4a00 su bianco = 6,86:1. */
.ats-event-card-date,
.ats-event-card-date span {
	color: var(--ats-a11y-warning-text) !important;
}

/* Contrasto: #66758a su bianco = 4,69:1. */
.ats-info-card__number {
	color: var(--ats-a11y-muted-text) !important;
}

/* Gli elementi inert non devono intercettare mouse o tocco. */
[inert] {
	pointer-events: none !important;
}

@media (prefers-reduced-motion: reduce) {
	html:focus-within {
		scroll-behavior: auto !important;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
