/**
 * Site-wide accessibility fixes: shared front-end styles.
 *
 * Only loaded when at least one fix is switched on. Every selector is
 * prefixed and targets only markup the fixes themselves add, so nothing
 * here restyles a theme's own elements (the fixes that intentionally do,
 * like the focus outline, add their CSS inline only while switched on).
 */

/* Text for screen readers only (new-window notes). */
.dpwpadac-sr-only {
	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;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* "Skip to main content": off-screen until it receives keyboard focus. */
.dpwpadac-skip-link {
	position: absolute !important;
	top: -9999px !important;
	left: 8px !important;
	z-index: 100000 !important;
	padding: 12px 20px !important;
	background: #fff !important;
	color: #1d2327 !important;
	font: 600 16px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
	text-decoration: underline !important;
	border-radius: 4px !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}

.dpwpadac-skip-link:focus {
	position: fixed !important;
	top: 8px !important;
	outline: 3px solid #005fcc !important;
	outline-offset: 2px !important;
}

body.admin-bar .dpwpadac-skip-link:focus {
	top: 40px !important;
}

@media screen and (max-width: 782px) {
	body.admin-bar .dpwpadac-skip-link:focus {
		top: 54px !important;
	}
}

/* The content area only gets this attribute while the skip link moves focus to it. */
[data-dpwpadac-skip-target]:focus,
[data-dpwpadac-skip-target]:focus-visible {
	outline: none !important;
}

/* "Please enter a search term." -- floats below the field, never inside the form. */
.dpwpadac-search-error {
	position: absolute;
	z-index: 100000;
	max-width: 320px;
	padding: 8px 12px;
	background: #b32d2e;
	color: #fff;
	font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
