/*
 * 1.7.11 accessibility release (Council groups 1-6). Enqueued on every front-end page AFTER style.css
 * (handle chef-bari-a11y, functions.php), so it wins over the theme's and Materialize's outline kills.
 *
 * Focus ring (WCAG 2.4.7, 1.4.11): ONE ring for every keyboard focus. The OUTLINE is the ring. Do not move it to a
 * box-shadow: the client's PROD Additional CSS (13.11, cookie banner) sets `box-shadow: none !important` on
 * CookieYes's customize button, and a shadow ring would vanish there.
 * !important IS NEEDED: without it (tried 2026-11-16 after review) 40+ stops lost their ring to more specific or
 * !important kills - Woo's block inputs and quantity buttons, Materialize inputs, CF7 inputs; Woo's checkboxes fell to
 * a 1px ring. The rings that were DESIGNED (brand green 2px) are re-asserted right below, more specific, so they keep
 * their look; the store inputs' green bottom border stays and the outline is added to it.
 */
:focus-visible { outline: 3px solid #0b5d1e !important; outline-offset: 2px !important; }
body.cb-store .cb-meal-open:focus-visible,
body.cb-store .cb-meal-close:focus-visible,
body.cb-store .cb-meal-add:focus-visible,
body.cb-store .woocommerce-message:focus-visible,
.cb-city-info:focus-visible,
.ligal_notice .cb-legal-button:focus-visible { outline: 2px solid #088800 !important; outline-offset: 2px !important; }

/* The skip link's landing target (<main id="main" tabindex="-1">) is not a control: no ring around the whole page.
   The next Tab lands on the first control inside it, which has its ring. */
main#main[tabindex="-1"]:focus,
main#main[tabindex="-1"]:focus-visible { outline: none !important; }

/* --- Group 3: contrast, underline, target size (axe 1.7.11 scan, WCAG 1.4.3, 1.4.1, 2.5.8) ---------------------- */
/* The default link colour (royalblue, 3.68-4.34:1 on the light-green backgrounds) is changed at its source, style.css
   "## Links", to #2a4fc9 (5.21:1 on #d9e3d8): a rule here would load after style.css and outrank its other link
   colours (footer details, tag cloud, CTA) for visited links (review 2026-11-16). */
/* The legal links' green (#088800 !important in style.css): 3.51-3.82:1 on the footer greens. #067000: 4.79:1 at worst. */
.privecy_link, .ligal_notice .cb-legal-button { color: #067000 !important; }
/* A link inside a sentence must not rely on colour alone (1.4.1): the questionnaire's privacy note, the credit line. */
.cb-privacy-note a, .copyright_strip a { text-decoration: underline; }
/* Footer controls were 21-22px tall: at least 24px (2.5.8). The cookie button and the legal links change together,
   so they still look the same (1.7.10 cookie-link proof). */
#site_footer .email_link, #site_footer .phone_link,
.ligal_notice .privecy_link, .ligal_notice .cb-legal-button { display: inline-block; min-height: 24px; line-height: 24px; }
/* The weekly order form's labels are Materialize's grey (#9e9e9e, 2.67:1 on white). #616161: 6.2:1. */
.page-template-page-weekly-order-form2 label,
.page-template-page-weekly-order-form2 [type="checkbox"] + span:not(.lever) { color: #616161; }
/* The weekly forms' minimum-order line is inline `color: red` (3.99:1 at 18px bold, not large text). #c00000: 6.6:1. */
#minimum_order_mess { color: #c00000 !important; }
/* The "LLM version" footer link the lovedbyai plugin prints after wp_footer: 21px tall. At least 24px (2.5.8). */
#gg-llm-version-link { display: inline-block; min-height: 24px; line-height: 24px; }
/* That plugin pins its link to the bottom edge of the document, where it overlapped the last legal row by 3px
   (axe: "partially obscured"). Room under the last legal row moves the document's edge, and the link with it. */
#site_footer .ligal_notice:last-of-type { padding-bottom: 28px; }
/* The questionnaire's error line was #f44336 (css/form_style.css): 3.68:1 on white at 14px. #c62828: 5.62:1. */
.page-template-page-sighninform2 .cb-field-error { color: #c62828; }
/* Checkout consents (Council group 3, .cb-consent): links #088800 on #ebf5eb, 4.14:1. #067000: 5.65:1 there. */
/* html: css/store.css loads after this sheet on store pages, so equal specificity would lose to it. */
html body.cb-store .cb-consent a { color: #067000; }

/* Group 5: the video overlay's close is a <button> since 1.7.11 (it was a <div>); keep the old look. */
button.lp-v2-exit-video-button { -webkit-appearance: none; appearance: none; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }

/* Group 5: the closed menu drawer (below the hamburger breakpoint, 1130px) is height 0 + overflow hidden, which
   clips its links but left them in the tab order: keyboard focus landed on links nobody could see (measured at 390).
   visibility:hidden takes them out. On close it waits for the 0.6s slide; on open it flips at once, before
   navigation.js moves focus into the menu. */
@media (max-width: 1129px) {
	.main-navigation:not(.open) { visibility: hidden; transition: height 0.6s ease, visibility 0s linear 0.6s; }
	.main-navigation.open { visibility: visible; transition: height 0.6s ease, visibility 0s linear 0s; }
}

/* 1.7.13: the desktop submenu by keyboard (js/navigation.js opens it while focus is inside its <li>). The submenu
   keeps its overflow:hidden (the hover slide), which clipped the nav's designed 2px ring (style.css, offset 2px) on
   its focused link; inset by its own width, the ring is drawn whole inside the link's box. */
@media (min-width: 1130px) {
	#site-navigation .sub-menu a:focus-visible { outline-offset: -2px !important; }
	/* The closed submenu was max-height 0 + overflow hidden only: its links stayed invisible Tab stops. As with the
	   drawer above: hidden after the .3s close (the slide still shows), visible at once on open (hover or focus). */
	.main-navigation ul ul.sub-menu { visibility: hidden; transition: max-height 0.3s ease, visibility 0s linear 0.3s; }
	.main-navigation ul li:hover > ul.sub-menu,
	.main-navigation ul li.focus > ul.sub-menu { visibility: visible; transition: max-height 0.3s ease, visibility 0s linear 0s; }
	/* The menu links' own `transition: all 0.2s` (style.css) also animated the visibility they inherit, and a
	   visibility transition starts at hidden: a Tab pressed in that first frame (measured: at once after focus reached
	   the parent) skipped the link. Their hover transition stays; visibility follows the submenu at once. */
	.main-navigation ul ul.sub-menu a { transition: all 0.2s ease-out, visibility 0s; }
	/* Closed by Esc (js/navigation.js): hidden at once, no slide. With the .3s delay a Tab pressed right after Esc
	   landed on the closing link, which then went hidden under the focus (focus fell to <body>, measured). The id
	   outranks the hover rule, so Esc also dismisses a hover-opened submenu (WCAG 1.4.13) until the pointer and
	   focus leave. */
	#primary-menu li.cb-sub-esc > ul.sub-menu { max-height: 0; visibility: hidden; transition: none; }
}

/* Reflow (WCAG 1.4.10) at 320: Woo's mobile cart row is a fixed grid (80px image, 132px product, then the line
   total) that needs ~379px and pushed the page 75px wide in a 320 viewport (measured, with or without enlarged
   text). At <= 360px the product column flexes and the thumbnail is 64px; 390 and up are untouched. */
@media (max-width: 360px) {
	/* Woo's own four tracks (product spans lines 2-4, the total takes the 4th): only their widths change. */
	html body.cb-store .wc-block-cart.is-mobile .wc-block-cart-items__row { grid-template-columns: 64px minmax(0, 1fr) 0 auto; }
	html body.cb-store .wc-block-cart.is-mobile .wc-block-cart-item__image img { width: 64px; height: auto; }
	html body.cb-store .wc-block-cart.is-mobile .wc-block-cart-item__product { min-width: 0; overflow-wrap: anywhere; }
	/* The total stretched the full row height and sat over the quantity row's remove link (cart-min-block proof):
	   it keeps to the top of the row. */
	html body.cb-store .wc-block-cart.is-mobile .wc-block-cart-item__total { align-self: start; }
}

/* 1.7.12: the theme accessibility toolbar's button (inc/a11y-toolbar.php). Where Ally's sits on PROD (left 24 / bottom
   24, 44px, measured 2026-11-16); the side setting mirrors it. PHYSICAL left/right: a corner does not mirror in RTL.
   js/a11y-toolbar-boot.js lifts it (inline bottom) above bottom bars in its column and hides it under modals.
   z-index 990, the WhatsApp tier: below the 999 header (and its drawer) and every modal. White on #0b5d1e: 7.9:1. */
.cb-a11y-btn {
	position: fixed; left: 24px; right: auto; bottom: 24px; z-index: 990;
	width: 44px; height: 44px; min-width: 0; min-height: 0; margin: 0; padding: 0; box-sizing: border-box;
	display: flex; align-items: center; justify-content: center;
	border: 2px solid #fff; border-radius: 50%; background: #0b5d1e; color: #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .35); cursor: pointer; line-height: 1;
	-webkit-appearance: none; appearance: none;
}
.cb-a11y-btn--right { left: auto; right: 24px; }
.cb-a11y-btn[hidden] { display: none; }
.cb-a11y-btn__icon { display: block; width: 28px; height: 28px; pointer-events: none; }
