/**
 * Bonza, Navbar Overlay: desktop Events dropdown, desktop Language
 * switcher dropdown, and the tablet/mobile drawer it shares a Figma
 * component set with (ClickUp 86eypb6ke).
 *
 * Config investigated: General > Colors (no site-wide theme.json colour
 * preset exists yet, task 86eyk8nqd "Design foundations" is still in
 * progress, same documented gap as footer.css / hero-banner.css), Blocksy
 * header builder (Appearance > Customize > Header Builder: no desktop nav
 * item, mega-menu, or mobile-menu extension point is configured on this
 * site yet, `wp menu list` on bonza-retheme.blz.au shows Main Menu /
 * Service Menu / three footer menus, none assigned to a theme location,
 * confirmed via `wp option get theme_mods_blocksy-child`. HEADER (CU
 * 86eypb6ab) owns wiring the real header chrome; this component only
 * owns the overlay panels plus the interaction contract documented in
 * custom.php `bonza_navbar_overlay_render_provisional_triggers()`).
 *
 * editor-friendly-ok: this styles global header/nav chrome (drawer plus
 * dropdown panels rendered in wp_footer), not editable post content, same
 * class of exception as checkout-header-footer.css.
 *
 * Figma: cY9QX6IwGVaaGI4r7J2RRF, component set "Navbar Overlay" 224:172474.
 *   TYPE=Mobile-Menu   17430:152740 (390x1701, 16px radius right edge)
 *   TYPE=Events        29560:84461  (161x168, 12px radius), desktop dropdown
 *   TYPE=CURRENCY      34467:310824 (169x168, 12px radius), desktop dropdown
 * The component set also has TYPE=Help, TYPE=weekly, TYPE=Desktop-Mega menu
 * 1/2 and TYPE=TYPE6 siblings not named in this task's scope note (which
 * names exactly Events, Currency and Mobile-Menu). Left unbuilt, flagged
 * in the CU-86eypb6ke comment instead of guessed at.
 *
 * CONTENT FLAGS (confirmed against the live `main-menu` WP menu on
 * bonza-retheme.blz.au, not guessed):
 *   - Figma's Mobile-Menu top group reads "SUPLEMENTS" (sic). No menu item
 *     with that title exists; the live menu's matching position (second
 *     child of "Shop", alongside "Superfoods") is titled "Bioactive Bites".
 *     Rendered with the live title/URL, not the Figma string. Flag stands
 *     for design/client to confirm the intended label.
 *   - Figma's Mobile-Menu second group repeats "Health hub for dogs" (it
 *     already opens the first group). The live menu has exactly one
 *     "Health Hub for Dogs" item, top-level, not nested under "Our Tale".
 *     Treated as a confirmed Figma duplication and rendered once.
 *   - "our import" and "our guarantee" are confirmed typos/casing for the
 *     live menu's actual "Our Impact" / "Our Guarantee", rendered with the
 *     live, correct strings.
 *   - Figma's Events (29560:84461) and Currency (34467:310824) variants both
 *     contain the same placeholder link set (Preorder Catalogues, Card/
 *     Miniature Singles, Wholesale Info, About us, Reviews, Our Import, Our
 *     Guarantee): hobby-shop/trading-card copy unrelated to a dog-food
 *     brand, evidence this pair of variants is unfinished or copy-pasted in
 *     Figma, not real content. TYPE=CURRENCY additionally has no currency
 *     data at all; its only distinct rows are language options ("DE ·
 *     German", "ES · Spanish", "FR · French", "NL · Dutch"), so it is a
 *     mislabelled language switcher, not a currency switcher. Built as
 *     such (WPML `wpml_active_languages`, all 5 site languages resolve
 *     live, `curl` returned 200 on /de/ /es/ /fr/ /nl/). The TYPE=Events
 *     shell is built and wired to the live "Discover" submenu (real,
 *     on-brand content already in the site's Main Menu) as a working
 *     stand-in, pending design confirming what "Events" is actually meant
 *     to show. No events/calendar plugin exists on this site to build
 *     against.
 *   - Separately, WooCommerce's own currency (a different concern from the
 *     WPML language switcher above) is single-currency: `wp option get
 *     woocommerce_currency` returns GBP, and WCML's own `_wcml_settings
 *     [default_currencies]` has an empty value for every one of the 5
 *     languages, so multi-currency is scaffolded but never actually
 *     configured. No currency-switching UI is built here; there is nothing
 *     live to switch between. Flagged as an open blocker in the CU
 *     comment.
 *
 * WCAG 2.2 AA, MEASURED (formula against the literal hex, not assumed):
 *   - Ink text #494545 on cream #F8EDE3 body bg: 8.20:1 (pass)
 *   - Ink text #494545 on white #FFFFFF badge/help cards: 9.46:1 (pass)
 *   - White #FFFFFF "Menu" heading plus close icon on the #247B4E drawer
 *     header bar: 5.23:1 (pass, clears the 4.5:1 normal-text floor)
 *   - Badge icon glyph (#494545) sits on the badge's inner WHITE disc, not
 *     directly on the orange #FFA825 ring (Figma layers a white circle
 *     between them), so the icon-on-orange pairing (1.93:1, would fail
 *     3:1) never actually renders; the icon-on-white pairing above is the
 *     real one and passes.
 *   - Focus ring, body of the drawer/dropdowns (cream/white backgrounds):
 *     solid 2px #1F6B42 outline plus 2px offset on links, buttons and
 *     inputs, measured 5.62:1 against #F8EDE3 and 6.48:1 against #FFFFFF,
 *     clears the 3:1 floor. The original #16A34A measured 2.86:1 on cream,
 *     failing the floor, caught in audit and replaced with the same
 *     colour Hero Banner's own contrast fix already uses for this exact
 *     pairing (see the "Hero Banner, WCAG contrast fix" CHANGELOG entry).
 *   - Focus ring, close button only: the button sits directly on the
 *     #247B4E header bar, where #1F6B42 measures 1.24:1, worse than the
 *     #16A34A it replaced. Scoped separately to #FFFFFF (5.23:1 on
 *     #247B4E, the same figure already measured for the "Menu" heading on
 *     this bar) rather than reusing --bno-focus.
 *
 * Breakpoints: drawer pattern serves 0 to 1023px (covers the 375 floor,
 * 428 as-drawn and 744 tablet checks), dropdown pattern serves 1024px+
 * (covers 1440/1512), matching Blocksy's own internal 1024px mobile to
 * desktop split already used by hero-banner.css / footer.css on this
 * site.
 *
 * @date 2026-08-27
 */

:root {
	--bno-cream: var( --bfg-color-cream, #F8EDE3 );
	--bno-white: var( --bfg-color-white, #FFFFFF );
	--bno-ink: var( --bfg-color-ink, #494545 );
	--bno-green: var( --bfg-color-green, #247B4E );
	--bno-amber: var( --bfg-color-amber, #FFA825 );
	--bno-focus: #1F6B42;
	--bno-heading-font: "Nominee", var( --theme-headings-font-family, var( --theme-font-family, sans-serif ) );
	--bno-body-font: "Kobe1.1", var( --theme-font-family, sans-serif );
}

/* ---------------------------------------------------------------------
 * Shared: focus states, screen-reader text, backdrop
 * ------------------------------------------------------------------- */

.bno-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect( 0, 0, 0, 0 );
	white-space: nowrap;
	border: 0;
}

.bno-drawer a:focus-visible,
.bno-drawer button:focus-visible,
.bno-drawer input:focus-visible,
.bno-dropdown a:focus-visible,
.bno-dropdown button:focus-visible,
.bno-trigger:focus-visible {
	outline: 2px solid var( --bno-focus );
	outline-offset: 2px;
	border-radius: 4px;
}

/*
 * The close button sits directly on the #247B4E header bar with a
 * transparent background, so the shared --bno-focus ring above (measured
 * against the cream/white body only) does not apply here: #1F6B42 on
 * #247B4E is 1.24:1, worse than the #16A34A it replaced (1.59:1), because
 * both are similarly dark greens. White clears this pairing at 5.23:1,
 * the same figure already measured for the "Menu" heading on this same
 * bar, so it is reused here rather than introducing a third focus colour.
 */
.bno-drawer .bno-drawer__close:focus-visible {
	outline: 2px solid var( --bno-white );
	outline-offset: 2px;
	border-radius: 4px;
}

.bno-backdrop {
	position: fixed;
	inset: 0;
	background: rgba( 36, 34, 34, 0.45 );
	z-index: 9998;
}

/* ---------------------------------------------------------------------
 * Mobile / tablet drawer (Figma 17430:152740), 0 to 1023px
 * ------------------------------------------------------------------- */

.bno-drawer {
	position: fixed;
	inset: 0;
	z-index: 9999;
}

.bno-drawer[hidden] {
	display: none;
}

.bno-drawer__panel {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: 390px;
	max-width: 90vw;
	background: var( --bno-cream );
	border-top-right-radius: 16px;
	border-bottom-right-radius: 16px;
	box-shadow: 4px 0 24px rgba( 36, 34, 34, 0.18 );
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	display: flex;
	flex-direction: column;
}

@media ( max-width: 374px ) {
	.bno-drawer__panel {
		width: 100vw;
		max-width: 100vw;
		border-radius: 0;
	}
}

.bno-drawer__header {
	position: sticky;
	top: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var( --bno-green );
	color: var( --bno-white );
	padding: 16px 20px;
}

.bno-drawer__title {
	font-family: var( --bno-heading-font );
	font-weight: 900;
	font-size: 18px;
	line-height: 1;
	margin: 0;
	color: var( --bno-white );
}

.bno-drawer__close {
	background: transparent;
	border: 0;
	color: var( --bno-white );
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
}

.bno-drawer__body {
	padding: 20px 16px 32px;
}

.bno-drawer__search {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var( --bno-white );
	border-radius: 8px;
	padding: 0 12px;
	height: 48px;
	margin-bottom: 24px;
}

.bno-drawer__search input[type="search"] {
	flex: 1;
	border: 0;
	background: transparent;
	font-family: var( --bno-body-font );
	font-size: 14px;
	color: var( --bno-ink );
	height: 100%;
}

.bno-drawer__search input[type="search"]::placeholder {
	color: #6E5D84;
}

.bno-drawer__search button {
	background: transparent;
	border: 0;
	color: var( --bno-ink );
	cursor: pointer;
	display: inline-flex;
	padding: 4px;
}

.bno-drawer__nav-group ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bno-drawer__nav-group li + li {
	margin-top: 18px;
}

.bno-drawer__nav-group a {
	font-family: var( --bno-heading-font );
	font-weight: 900;
	font-size: 12px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var( --bno-ink );
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.bno-drawer__nav-group a:hover,
.bno-drawer__nav-group a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bno-drawer__divider {
	border: 0;
	border-top: 1px solid rgba( 73, 69, 69, 0.15 );
	margin: 20px 0;
}

.bno-drawer__help h3 {
	font-family: var( --bno-heading-font );
	font-weight: 900;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var( --bno-ink );
	margin: 0 0 16px;
}

.bno-drawer__contact {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.bno-drawer__contact li {
	display: flex;
	align-items: center;
	gap: 12px;
}

.bno-drawer__contact .bno-icon-circle {
	flex: none;
	width: 24px;
	height: 24px;
	border-radius: 18px;
	background: var( --bno-cream );
	border: 1px solid rgba( 73, 69, 69, 0.15 );
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var( --bno-ink );
}

.bno-drawer__contact a,
.bno-drawer__contact span.bno-contact-text {
	font-family: var( --bno-body-font );
	font-weight: 700;
	font-size: 14px;
	color: var( --bno-ink );
	text-decoration: none;
}

.bno-drawer__contact a:hover,
.bno-drawer__contact a:focus-visible {
	text-decoration: underline;
}

.bno-drawer__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 28px;
}

.bno-badge {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: var( --bno-white );
	border-radius: 8px;
	padding: 8px;
}

.bno-badge__icon {
	flex: none;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var( --bno-amber );
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.bno-badge__icon .bno-badge__icon-disc {
	width: 23px;
	height: 23px;
	border-radius: 50%;
	background: var( --bno-white );
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var( --bno-ink );
}

.bno-badge__label {
	font-family: var( --bno-body-font );
	font-weight: 700;
	font-size: 14px;
	color: var( --bno-ink );
}

/* ---------------------------------------------------------------------
 * Desktop dropdowns (Figma 29560:84461 Events, 34467:310824 language),
 * 1024px+
 * ------------------------------------------------------------------- */

.bno-dropdown {
	position: absolute;
	top: calc( 100% + 8px );
	left: 0;
	min-width: 220px;
	background: var( --bno-cream );
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba( 36, 34, 34, 0.18 );
	padding: 20px;
	z-index: 30;
}

.bno-dropdown[hidden] {
	display: none;
}

.bno-dropdown ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.bno-dropdown a {
	font-family: var( --bno-body-font );
	font-weight: 700;
	font-size: 14px;
	color: var( --bno-ink );
	text-decoration: none;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.bno-dropdown a:hover,
.bno-dropdown a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bno-dropdown--language img.bno-flag {
	width: 18px;
	height: 13px;
	object-fit: cover;
	border-radius: 2px;
	flex: none;
}

/* ---------------------------------------------------------------------
 * Provisional verification triggers, see custom.php
 * bonza_navbar_overlay_render_provisional_triggers(). Removable in one
 * place once HEADER (CU 86eypb6ab) wires the real header chrome.
 * ------------------------------------------------------------------- */

.bno-provisional-bar {
	position: relative;
	display: none;
	align-items: center;
	gap: 20px;
	background: var( --bno-white );
	border-bottom: 1px dashed var( --bno-amber );
	padding: 10px 20px;
	font-family: var( --bno-body-font );
	font-size: 13px;
}

.bno-provisional-bar__label {
	color: var( --bno-amber );
	font-weight: 700;
	text-transform: uppercase;
	font-size: 11px;
	letter-spacing: 0.04em;
}

.bno-trigger {
	background: transparent;
	border: 1px solid rgba( 73, 69, 69, 0.25 );
	border-radius: 6px;
	padding: 6px 12px;
	font-family: var( --bno-body-font );
	font-weight: 700;
	font-size: 13px;
	color: var( --bno-ink );
	cursor: pointer;
}

.bno-trigger[aria-expanded="true"] {
	background: var( --bno-cream );
	border-color: var( --bno-ink );
}

@media ( max-width: 1023px ) {
	.bno-provisional-bar {
		display: flex;
	}

	.bno-provisional-bar [data-bno-desktop-only] {
		display: none;
	}
}

@media ( min-width: 1024px ) {
	.bno-provisional-bar {
		display: flex;
	}

	.bno-provisional-bar [data-bno-mobile-only] {
		display: none;
	}
}
