/*
 * Wintergarden base styles: the accessibility rules every page inherits.
 * Standard: WCAG 2.2 AA (see the project's Accessibility & Privacy Standard).
 */

/* Sizes include padding and borders (so a 44px button is 44px). */
*,
*::before,
*::after {
	box-sizing: border-box;
}

/* Visible keyboard focus on everything: 2px, offset, slate on light areas. */
:focus-visible {
	outline: var(--wp--custom--focus-width) solid var(--wp--preset--color--slate);
	outline-offset: var(--wp--custom--focus-offset);
}

/* White focus outline wherever the background is dark. Add .is-dark to any dark section. */
.is-dark :focus-visible,
.has-ink-background-color :focus-visible,
.has-slate-background-color :focus-visible {
	outline-color: #fff;
}

/* Body-text links are underlined, never colour alone. */
a {
	text-underline-offset: 4px;
}

/* Buttons: at least 44px tall (AA asks 24px; 44px is the project target). */
.wp-element-button,
.wp-block-button__link,
button {
	min-height: var(--wp--custom--target-min);
}

/* Visually hidden, still read by screen readers. */
.screen-reader-text:not(:focus) {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Respect reduced motion everywhere. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
