/* ==========================================================================
   Accessibility layer (IS 5568 / WCAG 2.0 AA). Loaded after all theme CSS.
   Added 2026-12 by Toolbox Digital Media. Visual-neutral for mouse users:
   focus rings use :focus-visible (keyboard only); colours change only where
   text failed the 4.5:1 contrast minimum.
   ========================================================================== */

/* 1. Keyboard focus indicator (2.4.7). The reset in screen.css sets outline:0 everywhere;
      this restores a two-tone ring that shows on light and dark backgrounds alike
      (navy outer ring + white inner halo). */
:focus-visible {
	outline: 2px solid #23415A !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 2px #FFFFFF !important;
}
/* Text fields count as "focus-visible" on a mouse click too. a11y.js adds html.a11y-mouse after a
   click or tap (and removes it on the next Tab), so mouse users see the fields exactly as before. */
html.a11y-mouse input:focus-visible,
html.a11y-mouse textarea:focus-visible,
html.a11y-mouse select:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}
/* Dark areas (footer, desktop dropdowns, search panel, phone menu, banners): flip the colours. */
.site_footer :focus-visible,
ul.mega-menu > li > ul.mega-sub-menu :focus-visible,
.search-box :focus-visible,
.banner-video :focus-visible,
.inner-banner :focus-visible,
.news-inner-banner :focus-visible {
	outline-color: #FFFFFF !important;
	box-shadow: 0 0 0 2px #23415A !important;
}
@media (max-width: 991px) {
	.main-navigation :focus-visible {
		outline-color: #FFFFFF !important;
		box-shadow: 0 0 0 2px #23415A !important;
	}
}
/* Slides sit in overflow:hidden tracks: draw the ring inside. */
.slick-slide a:focus-visible,
.slick-slide [tabindex="0"]:focus-visible {
	outline-offset: -4px !important;
	box-shadow: inset 0 0 0 4px #FFFFFF !important;
}
/* Containers that only receive focus programmatically (skip-link target, dialogs). */
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}
/* The privacy checkbox is drawn by its label; the real checkbox is transparent. */
.form-checkbox input:focus-visible + span.wpcf7-list-item-label:before {
	outline: 2px solid #23415A;
	outline-offset: 2px;
	box-shadow: 0 0 0 2px #FFFFFF;
}

/* 2. Desktop dropdowns (2.1.1): Max Mega Menu's keyboard support already sets
      li.mega-toggle-on (Enter/Space on the menu item); show the submenu then too,
      with the same layout as on hover. */
@media (min-width: 992px) {
	ul.mega-menu > li.mega-toggle-on > ul.mega-sub-menu { display: block; }
	ul.mega-menu > li.mega-water-menu.mega-toggle-on > ul.mega-sub-menu,
	ul.mega-menu > li.mega-waste-menu.mega-toggle-on > ul.mega-sub-menu,
	ul.mega-menu > li.mega-chemical-menu.mega-toggle-on > ul.mega-sub-menu { display: flex; }
	ul.mega-menu > li.mega-water-menu.mega-toggle-on > ul.mega-sub-menu { flex-wrap: wrap; min-width: 888px; right: -580px; left: auto; padding: 20px 40px; }
	ul.mega-menu > li.mega-waste-menu.mega-toggle-on > ul.mega-sub-menu { flex-wrap: wrap; min-width: 600px; right: -240px; left: auto; padding: 20px 40px; }
	ul.mega-menu > li.mega-chemical-menu.mega-toggle-on > ul.mega-sub-menu { flex-wrap: wrap; min-width: 345px; left: -50px; padding: 20px 40px; }
	/* Keyboard focus on a dropdown link looks like its hover state. */
	ul.mega-menu > li.mega-simple_dropdown > ul.mega-sub-menu li a:focus-visible { background-color: #F5F7FF; color: #23415A; }
}

/* 3. Panels that are parked off-screen when closed: also take them out of the Tab order
      and the accessibility tree. "visibility" is part of each panel's existing
      "transition: all", so the open/close animations are unchanged. */
body:not(.is-search-open) .search-box { visibility: hidden; }
.sharek .share_links:not(.open) { visibility: hidden; }
@media (max-width: 991px) {
	.main-navigation:not(.navbar_animate) { visibility: hidden; }
}

/* 4. Contrast (1.4.3). Only colours that failed on light backgrounds are changed. */
/* 4a. Light-blue text (#5296FF, 2.7–2.9:1) on white / light grey -> #005EEB (5.2:1+).
       a11y.js adds the class only where a light background is positively detected;
       the same blue on dark, photo or video sections is left as it is. */
.a11y-accent-dark:not(:hover) { color: #005EEB !important; }
/* The desktop menu sits on the white header: its current-page / current-section blue, directly
   (custom.js sets the section class after load, so it can't wait for the detection above). */
.main-navigation > .mega-menu-wrap > ul > li.mega-current-menu-item > a,
.main-navigation > .mega-menu-wrap > ul > li.mega-current-menu-parent > a { color: #005EEB; }
/* 4b. Submit buttons: white on #73AAFF (2.35:1) -> navy on the same blue (5.5:1). */
.modal-form .form-btn input[type="submit"],
.contact-us-main-inner .form-btn input[type="submit"] { color: #1C3448; }
.modal-form .form-btn input[type="submit"]:hover { color: #FFFFFF; }               /* navy hover background, unchanged */
.contact-us-main-inner .form-btn input[type="submit"]:hover { color: #005EEB; }   /* transparent hover background */
/* 4c. News filter: white on #5296FF (2.93:1) -> white on #005EEB (5.5:1). */
.news-filter ul li.active a,
.news-filter ul li a:hover { background-color: #005EEB; border-color: #005EEB; }
/* 4d. Breadcrumb current page: #FF5C00 on #F5F7FF (2.89:1) -> #C44700 (4.6:1), same hue. */
.breadcrumb-inner ul li span,
.breadcrumb-inner ul li:last-child { color: #C44700; }
/* 4e. Footer credit: opacity 0.3 (1.72:1) -> 0.9 (4.8:1), as on bluegenchemicals.com. */
.menu_right li a { opacity: 0.9; }

/* 5. Pause/play control for moving content (2.2.2). Deliberately small and quiet:
      22 px, bottom-left (the UserWay icon is fixed bottom-right), full strength on hover/focus. */
.a11y-motion-toggle {
	position: absolute;
	z-index: 5;
	bottom: 10px;
	left: 10px;
	right: auto;
	top: auto;
	width: 22px;
	height: 22px;
	min-width: 0;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(17, 30, 42, 0.35);
	color: #FFFFFF;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 0.2s, background-color 0.2s;
}
.a11y-motion-toggle:hover,
.a11y-motion-toggle:focus-visible { opacity: 1; background-color: rgba(17, 30, 42, 0.6); border: 0; color: #FFFFFF; }
.a11y-motion-toggle svg { width: 9px; height: 9px; display: block; fill: currentColor; }
.a11y-motion-host { position: relative; }

/* 6. Reduced motion: no scroll animations, no smooth scrolling. */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto !important; }
	[data-aos] { transition: none !important; transform: none !important; opacity: 1 !important; }
}
