/*
 * NepsyFocus – WCAG 2.1 AA fixes for Divi.
 * Intentionally changes no colours, borders, underlines or layout of the
 * existing site. Only adds styles that are invisible to mouse users:
 * the skip link (shown on keyboard focus), screen-reader-only text and a
 * keyboard focus ring.
 */
:root {
	--nf-focus: #1b5b71;
}

/* 2.4.1 Skip link: hidden until focused */
.nf-skip-link {
	position: absolute;
	left: 8px;
	top: -100px;
	z-index: 100000;
	padding: 12px 18px;
	background: #1b5b71;
	color: #fff !important;
	font-weight: 700;
	text-decoration: underline;
	border-radius: 4px;
}
.nf-skip-link:focus {
	top: 8px;
}

/* Screen-reader-only text (used by a11y.js for link context) */
.nf-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* 2.4.7 Focus visible: shown only when navigating with the keyboard
   (:focus-visible), never on mouse click or tap */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible,
.et_pb_button:focus-visible {
	outline: 3px solid var(--nf-focus) !important;
	outline-offset: 2px !important;
}
#main-content:focus {
	outline: none;
}

/* Elements made keyboard-operable by a11y.js keep their look */
.mobile_menu_bar_toggle[role="button"],
.et_pb_toggle_title [role="button"] {
	cursor: pointer;
}
