/*
 * Keyboard and screen-reader fixes for the parent theme's menus, chiefly the
 * Polylang language switcher (WCAG 2.2 AA). Loaded after liberis/style.css;
 * the JS half is assets/js/a11y-menu.js.
 */

/* 2.4.7 Focus Visible: the parent theme sets a:focus { outline: none }.
   Two-tone ring (dark outline, white gap) so it reads on light and dark
   backgrounds alike; :focus-visible keeps it off mouse clicks. */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
	outline: 2px solid #252525;
	outline-offset: 2px;
	box-shadow: 0 0 0 2px #ffffff;
}

/* 2.1.1 Keyboard: desktop dropdowns (the language switcher) opened on hover
   only, so their links were unreachable with Tab. Open them on focus too. */
.menu-nav li:focus-within > ul {
	display: block;
}

/* 1.4.13 Content on Hover or Focus: Esc dismisses an open dropdown without
   moving the pointer (a11y-menu.js adds the class). Must follow the rules
   above and liberis' li:hover > ul, which have the same specificity. */
.menu-nav li.submenu-dismissed > ul {
	display: none;
}

/* 2.4.3 Focus Order: the closed off-canvas menu sat off-screen at opacity 0
   with its links still in the tab order. Hide it from keyboard and screen
   readers while closed; visibility waits for the slide-out to finish. */
.mobile-menu-holder {
	visibility: hidden;
	transition: transform 0.7s cubic-bezier(0.25, 1, 0.35, 1), opacity 0.7s cubic-bezier(0.25, 1, 0.35, 1), visibility 0s linear 0.7s;
}

.mobile-menu-holder.is-active {
	visibility: visible;
	transition-delay: 0s;
}

/* The close control is a div in the parent template (a11y-menu.js makes it
   a button for keyboards and screen readers). */
.exit-mobile[role="button"] {
	cursor: pointer;
}
