/* Nav repair. Loaded last of the theme's four stylesheets, after style.css,
   header-final.css and nav-dropdown.css.

   style.css still carries a flat-nav block written before categories had
   panels: `.lvs-nav ul:not(.lvs-nav__root){display:none!important}`,
   `.lvs-nav{overflow:hidden}` and `.lvs-nav__node{position:static!important}`.
   Those three rules are why hovering a category showed nothing: the panel was
   display:none, its parent clipped it, and its parent node had no positioning
   context for `position:absolute` to hang from.

   Everything here is scoped to the nav and says nothing about a panel's open
   state. */

/* 0. The bar itself is never hidden, never collapsed. A category list that
      renders zero height reads to a visitor as "there are no categories",
      which is exactly how this file's predecessor failed. */
.lvs-nav,
.lvs-nav__bar,
.lvs-nav__root {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	height: auto !important;
	max-height: none !important;
}

.lvs-nav__root {
	display: flex !important;
}

/* 1. The bar hosts absolutely positioned panels, so it must not clip them. */
.lvs-nav,
.lvs-nav__bar,
.lvs-nav__root {
	overflow: visible !important;
}

/* 2. A category is the positioning context for its own panel. */
.lvs-nav .lvs-nav__node {
	position: relative !important;
	overflow: visible !important;
	visibility: visible !important;
	opacity: 1 !important;
}

/* 3. Undo the blanket "hide every nested list" rule. A panel is display:block
      and stays in flow; nav-dropdown.css hides it with visibility/opacity. */
.lvs-nav ul.lvs-nav__sub,
.lvs-nav .lvs-nav__node > ul.lvs-nav__sub,
.lvs-nav .lvs-nav__sub {
	display: block !important;
	height: auto !important;
	max-height: 68vh !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
}

/* 4. Panels sit above the hero, the cards and the footer. */
.lvs-nav .lvs-nav__node:hover > .lvs-nav__sub,
.lvs-nav .lvs-nav__node:focus-within > .lvs-nav__sub,
.lvs-nav .lvs-nav__node.is-open > .lvs-nav__sub {
	z-index: 300 !important;
}

/* 5. The trigger is a button on touch: never let a stray underline or a
      wrapped label break the row. Every trigger stays visible. */
.lvs-nav .lvs-nav__anchor {
	position: relative;
	z-index: 1;
	display: inline-block !important;
	visibility: visible !important;
	opacity: 1 !important;
	text-decoration: none !important;
}

/* 6. Keyboard users get a visible ring on the trigger and on every panel row. */
.lvs-nav .lvs-nav__anchor:focus-visible,
.lvs-nav .lvs-nav__sub a:focus-visible {
	outline: 3px solid #ffd75e !important;
	outline-offset: 2px !important;
	border-radius: 7px !important;
}

/* 7. Narrow screens: the bar scrolls horizontally rather than clipping, and a
      panel never runs wider than the viewport. */
@media (max-width: 720px) {
	.lvs-nav__bar {
		overflow-x: auto !important;
		overflow-y: visible !important;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
	}
	.lvs-nav__root {
		flex-wrap: nowrap !important;
	}
	.lvs-nav .lvs-nav__sub {
		max-width: calc(100vw - 32px) !important;
	}
}