/*
 * Phase 2b mega-menu probe (NOT shipped in the parity build; enqueued only on the
 * "Mega-menu probe" page template). Attempt 1: core blocks hand-authored inside a
 * core/navigation-submenu, then repositioned as a full-width panel.
 */

/* P1. A submenu container is a dropdown box positioned to its <li>. For a full-width panel
 *     the item must stop being the positioning context and the header must become it. */
.weave-header--probe { position: relative; }
.weave-header--probe .weave-header__nav .wp-block-navigation-item.weave-mega,
.weave-header--probe .wp-block-navigation,
.weave-header--probe .wp-block-navigation__container,
.weave-header--probe .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open),
.weave-header--probe .wp-block-navigation__responsive-container-content,
.weave-header--probe .wp-block-navigation__responsive-dialog,
.weave-header--probe > .wp-block-group { position: static; }

/* P2. Core's open-state rule sets width:auto / min-width:200px, so the panel geometry must be
 *     set on the same states (see H1b in style.css). Full-bleed under the header. */
.weave-header--probe .weave-header__nav.wp-block-navigation .weave-mega:hover > .wp-block-navigation__submenu-container,
.weave-header--probe .weave-header__nav.wp-block-navigation .weave-mega:focus-within > .wp-block-navigation__submenu-container,
.weave-header--probe .weave-header__nav.wp-block-navigation .weave-mega .wp-block-navigation-submenu__toggle[aria-expanded="true"] ~ .wp-block-navigation__submenu-container {
	left: 0;
	right: 0;
	width: auto;
	min-width: 0;
	top: 100%;
	margin-top: 0;
	border-radius: 0;
	padding: 0;
	box-shadow: 0 20px 30px -20px rgba(3, 30, 41, 0.25);
}

/* P3. Core styles every <a> inside a submenu as a menu item (block padding, colour inherit)
 *     and gives list items ::before hover states; the panel content is regular blocks and
 *     must opt out. */
.weave-header--probe .weave-mega__panel .wp-block-navigation-item__content { padding: 0; }
.weave-header--probe .weave-mega__panel a:not(.wp-block-button__link) { padding: 0; }
.weave-header--probe .weave-mega__panel .wp-block-list { list-style: none; padding-left: 0; }
.weave-header--probe .weave-mega__panel .wp-block-list li { margin-block: var(--wp--preset--spacing--10); }

/* P4. Hover gap. The panel hangs off the header while :hover lives on the <li>, so the mouse
 *     loses the menu crossing the header's bottom padding. Extend the item's box down to the
 *     panel edge (header bottom padding is spacing-20 on the probe header). Fragile: any change
 *     to header padding breaks it. */
.weave-header--probe .weave-mega { padding-bottom: var(--wp--preset--spacing--20); margin-bottom: calc(-1 * var(--wp--preset--spacing--20)); }
