/**
 * Utilities.
 *
 * A small, genuinely useful set — this is a custom theme, not a
 * utility-first framework. Do not grow this into a Tailwind clone.
 */

/*
 * WordPress core accessibility convention: visually hides content but keeps
 * it available to assistive tech, and reveals it on focus. Used by the
 * skip link (template-parts/global/skip-link.php) and form labels.
 */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	position: fixed;
	top: var(--sf-space-2xs);
	left: var(--sf-space-2xs);
	/* Intentionally above the z-index scale (tokens.css) — the skip link
	   must win over literally everything, including a future modal/toast. */
	z-index: 100000;
	width: auto;
	height: auto;
	margin: 0;
	padding: var(--sf-space-2xs) var(--sf-space-sm);
	overflow: visible;
	clip: auto;
	white-space: normal;
	background: var(--sf-color-bg);
	color: var(--sf-color-text);
	border: 2px solid var(--sf-color-focus);
	border-radius: var(--sf-radius-sm);
}

/* Permanently hidden from view, still available to assistive tech. */
.u-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
	border: 0;
}

.u-text-center {
	text-align: center;
}

.u-text-left {
	text-align: left;
}

.u-text-right {
	text-align: right;
}
