/* A long navigation submenu, laid out as a panel.
 *
 * Only the geometry lives here. Colour, border and type come from whatever
 * already styles `.wp-block-navigation__submenu-container` on this store, so a
 * store that restyled its header keeps its header (PATTERN-RULE.md).
 *
 * Below the header's own breakpoint the navigation is already a stacked drawer,
 * so the panel collapses back to one column and changes nothing there — Diego,
 * 2026-09-23 21:32, on a phone: *"you have to pass all these categories to even
 * get there."* A panel that stayed multi-column on a phone would be the same
 * complaint with more scrolling.
 */

/* The header's collapse width — theme.json `custom.stHeaderCollapse`. */
@media (min-width: 1160px) {
	li[data-st-nav="mega"] > .wp-block-navigation__submenu-container {
		display: grid;
		grid-auto-flow: column;
		grid-template-rows: repeat(4, auto);
		gap: 0.1rem 2rem;
		width: max-content;
		max-width: min(var(--wp--style--global--wide-size, 1920px), 92vw);
	}

	li[data-st-nav="mega"][data-st-nav-columns="3"] > .wp-block-navigation__submenu-container {
		grid-template-rows: repeat(5, auto);
	}

	li[data-st-nav="mega"] > .wp-block-navigation__submenu-container > li {
		width: auto;
		min-width: 12rem;
	}
}
