/**
 * Shared edge-to-edge shell for the full-width mega-menu variants (full-width,
 * full-width two-column), so both "full width" styles open the same way and
 * differ only in what's inside.
 *
 * The panel is normally absolutely positioned to its trigger <li> and centred
 * on it (translateX(-50%)), which caps it near the trigger. Making just this
 * item's <li> non-positioned (via :has()) hands positioning to the ancestor
 * .aureon-header__row (position: relative, full header width), so `top: 100%`
 * resolves to the row's bottom edge and left/right:0 stretches the panel across
 * it — a genuine full-width panel without the per-trigger JS measurement a
 * 100vw bleed needs.
 *
 * @param {string} $variant Modifier after `aureon-mega--`.
 */
@mixin shell( $variant ) {
	$panel: ".aureon-mega.aureon-mega--#{$variant}";

	.aureon-header .aureon-nav .menu-item-has-children:has(> .aureon-mega--#{$variant}) {
		position: static;
	}

	/* Stretch edge-to-edge and drop the base horizontal centring. Prefixed with
	   `.aureon-header .aureon-nav` (and doubled `.aureon-mega`) to out-specify
	   the base `.aureon-header .aureon-nav .aureon-mega { left:50%; transform }`
	   positioning rule (0,3,0). */
	.aureon-header .aureon-nav #{$panel} {
		left: 0;
		right: 0;
		width: auto;
		max-width: none;
		transform: translateY(6px); /* vertical drop only — no horizontal centring */
	}

	.aureon-mega--#{$variant} {

		/* Exposed for footer bleeds. A per-variant padding override (Mega Menu →
		   Panel Style) replaces both the vertical and the responsive side padding. */
		--mega-pad: var(--aureon-mega-pad, var(--aureon-space-md, 1.5rem));

		padding: var(--mega-pad) var(--aureon-mega-pad, clamp(1.5rem, 5vw, 4rem));
	}

	/* Reveal states: keep the vertical drop but strip the base translateX(-50%)
	   centring so the panel stays anchored edge-to-edge. */
	.aureon-header .aureon-nav li.is-open > #{$panel} {
		transform: translateY(0);
	}

	.aureon-header .aureon-menu-el--trigger-hover .aureon-nav {

		li:hover > #{$panel},
		li:focus-within > #{$panel} {
			transform: translateY(0);
		}
	}
}
