/* Navigation element — the few rules that cannot be scoped inline.
 *
 * Everything else this element needs is emitted as a uid-scoped <style> block
 * by navigation.php; these two selectors have to be global because they must
 * match a ROW the element merely sits inside.
 */

/* ---- single-part mega panels --------------------------------------- */
/* A row containing an [ebc_megamenu] marker is a mega panel: hidden in the
 * normal flow. ebc-nav.js moves the row into its menu item and REMOVES the
 * marker, so nothing matches these rules afterwards (the header row must
 * never match once the panel lives inside it). With JS off, panel rows
 * simply stay hidden.
 *
 * The :not() matters. These rules hide EVERY row above the marker, not just
 * the panel row, so a marker in the wrong place takes a whole part down with
 * it. That happens for real: a part attached to a menu item in Appearance →
 * Menus is re-rendered inside every nav that shows that menu, markers and
 * all — so a header part used as a panel drops its marker into the footer's
 * nav, and the footer disappears. A marker inside a nav never selects a
 * panel (ebc-nav.js applies the same rule), so it must not hide anything. */
.ebc-row:has(.ebc-megamark:not(.ebc-nav .ebc-megamark)),
[data-ebc-stretch]:has(.ebc-megamark:not(.ebc-nav .ebc-megamark)) {
	display: none;
}
