/* New work lives here, kept separate from main.css for isolated, single-file deploys. */

/*
 * Mobile menu: full-page flyout override for UberMenu.
 * UberMenu's own default mobile behavior expands the nav in normal document flow with a
 * fixed max-height (500px), which is what causes gaps (short menus) and layout shifting /
 * overlap (tall mega-menus overflow past the box). This takes the nav out of flow entirely
 * and gives it its own scroll region instead.
 * Open/close state is UberMenu's own: it just removes/adds `.ubermenu-responsive-collapse`
 * on the nav - we only react to that class, we don't reimplement the toggle.
 *
 * Selector uses the #ubermenu-main-2-main_menu ID (not just classes) because of a pre-existing
 * inline `nav#ubermenu-main-2-main_menu { max-height: calc(100vh - 116px) !important; overflow:
 * scroll !important; }` rule (from the previous team's custom CSS, active at max-width:600px)
 * that otherwise wins on specificity over any class-only !important override, regardless of
 * source order.
 */
@media screen and (max-width: 1024px) {
	/*
	 * `top` + `bottom:0` + `height:auto` is supposed to stretch this to fill the viewport
	 * below the header - and does, reliably, in every desktop-resized/DevTools test this was
	 * built against. Real mobile Safari is a different rendering engine with its own history
	 * of `position:fixed` sizing quirks that desktop-engine device emulation can't reproduce,
	 * and is exactly where this collapsed to a sliver only as tall as its own content
	 * instead of stretching. Driving the height explicitly via `calc()` instead of leaning on
	 * that implicit stretch removes the ambiguity outright.
	 *
	 * Tried `100dvh` here first, but that's what left the last item (Request A Quote) cut
	 * off with no way to scroll to it - `dvh` has a real history of not recalculating
	 * reliably for `position:fixed` elements specifically on some Safari versions. `100svh`
	 * ("small" viewport height - the conservative size assuming every toolbar is fully
	 * expanded) trades a little unused space when a toolbar happens to be hidden for content
	 * never being unreachable. (Support-wise `svh`/`lvh`/`dvh` all shipped together, so
	 * anything new enough to read one understands the others too.)
	 *
	 * `top` is `var(--ezdock-header-height, 70px)`, set by custom.js from
	 * .ubermenu-responsive-toggle's real on-screen position (getBoundingClientRect) every
	 * time the menu opens. A static number here was tried and genuinely can't work: the
	 * site's promo banner (.notification-popup) is dismissible via a 30-day cookie, so the
	 * header is a real, verified ~65px taller for a visitor who hasn't closed it than for one
	 * who has (confirmed directly against the live site: toggle bottom sits at 128px with the
	 * banner showing, ~74px without) - any single hardcoded value is only ever correct for
	 * one of those two states. `height` reuses the same variable so the two can't drift out
	 * of sync with each other.
	 */
	#ubermenu-main-2-main_menu.ubermenu-responsive:not(.ubermenu-responsive-collapse) {
		position: fixed !important;
		top: var(--ezdock-header-height, 70px);
		left: 0;
		right: 0;
		bottom: 0;
		width: 100% !important;
		max-height: none !important;
		height: calc(100vh - var(--ezdock-header-height, 70px)) !important;
		height: calc(100svh - var(--ezdock-header-height, 70px)) !important;
		overflow-y: auto !important;
		/*
		 * wp-admin's Additional CSS field (Customizer - database-stored, invisible to any
		 * file search, see the .ab-sticky-btn comment further down for how that surfaced) has
		 * its own `nav#ubermenu-main-2-main_menu { max-height: calc(100vh - 116px) !important;
		 * overflow: scroll !important; }` at max-width:600px. Our selector's specificity
		 * (1 ID + 2 classes) already beats theirs (1 ID + 1 type) for every property we both
		 * set, EXCEPT overflow-x - their `overflow` shorthand sets it too, and since we never
		 * declared it ourselves there was nothing to out-specificity, so it won by default.
		 * Closing that gap explicitly rather than leaving an unwanted horizontal scrollbar on
		 * the flyout to chance.
		 */
		overflow-x: hidden !important;
		-webkit-overflow-scrolling: touch;
		visibility: visible !important;
		/*
		 * 99998 lost to a third-party chat widget and the "Become a Dealer" tab (the tab's
		 * actual CSS also turned out to live in that same Additional CSS field) - this site's
		 * z-index values elsewhere already go as high as 99999999999999999 (main.css),
		 * and third-party chat widgets commonly inject their own near-the-max value at
		 * runtime, invisible to anything in our own stylesheets. 2147483647 is the actual
		 * ceiling (max 32-bit signed int) browsers accept for z-index, so nothing legitimate
		 * can out-rank it - a full-screen menu takeover should always win anyway.
		 */
		z-index: 2147483647 !important;
		background: #fff;
		padding-bottom: 40px;
	}

	/*
	 * Setting max-height:none above (rather than letting it animate) means the browser
	 * never fires transitionend on this element, so UberMenu's own cleanup - which waits
	 * for that event to remove `.ubermenu-in-transition` - never runs. That class is stuck
	 * on permanently as a result, and its `overflow:hidden !important` (applied to both the
	 * nav and this inner .ubermenu-nav) needs an explicit override here on the child too.
	 */
	#ubermenu-main-2-main_menu.ubermenu-responsive:not(.ubermenu-responsive-collapse) .ubermenu-nav {
		min-height: 100%;
		overflow: visible !important;
	}

	/*
	 * Swap the hamburger icon for a close (X) once UberMenu marks the toggle open, by
	 * overriding :before's own content rather than hiding it and adding a separate ::after -
	 * that way it inherits :before's existing font-size/positioning/etc automatically instead
	 * of needing every property re-declared by hand (and inevitably missing one, as happened
	 * with font-size the first time around).
	 */
	.ubermenu-responsive-toggle.ubermenu-responsive-toggle-open .fa-bars:before {
		content: "\f00d";
	}

	/*
	 * Lock the page underneath while the flyout is open, and lift .body-wrapper's
	 * `overflow: clip` (main.css - added to fix an unrelated overflow bug, see the comment
	 * above where the div opens in header.php) which otherwise clips our fixed-position
	 * flyout down to a squashed height. Both react directly to the nav's own open state
	 * (UberMenu removes .ubermenu-responsive-collapse itself) via :has(), so this doesn't
	 * depend on any of our own JS running.
	 *
	 * `overflow: hidden` alone only blocks the scrollbar/wheel - it's well known not to stop
	 * touch-driven scrolling (rubber-band/overscroll) on mobile Safari, which is exactly
	 * what "the page still scrolls when the menu is open" was. `position: fixed` on both
	 * html and body actually removes them from the scrolling process entirely, which is the
	 * only thing that reliably stops it there. It also does the "always at the top when
	 * open" part for free: a position:fixed body renders its content starting from ITS OWN
	 * top edge (the true top of the page), regardless of whatever `window.scrollY` was when
	 * it got locked - and since the real scroll position is never actually changed, only
	 * visually overridden, un-fixing it on close naturally puts the page back exactly where
	 * it was, with no need to read/restore `window.scrollY` in JS at all.
	 */
	html:has(#ubermenu-main-2-main_menu.ubermenu-responsive:not(.ubermenu-responsive-collapse)) {
		overflow: hidden;
	}

	body:has(#ubermenu-main-2-main_menu.ubermenu-responsive:not(.ubermenu-responsive-collapse)) {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		overflow: hidden;
	}

	body:has(#ubermenu-main-2-main_menu.ubermenu-responsive:not(.ubermenu-responsive-collapse)) .body-wrapper {
		overflow: visible !important;
	}

	/*
	 * Raising our own z-index was never going to reliably win against these - .ab-sticky-btn
	 * (the rotated "Become a Dealer" tab) and the Tidio chat widget (#tidio-chat) aren't in
	 * our own stylesheets at all (the dealer tab's actual CSS lives in wp-admin's Additional
	 * CSS field, database-stored - invisible to any file search, which is why it took this
	 * long to find), and Tidio in particular renders its actual button inside a shadow DOM
	 * behind a `position:fixed;width:100%;height:100%;z-index:999999999 !important` host, set
	 * inline - defensively built to always stay on top, not something a bigger number on our
	 * own element reliably beats. A full-screen menu takeover should hide distracting floating
	 * UI anyway - simplest fix is to hide both outright while open, `display:none` doesn't
	 * care about shadow DOM or stacking contexts at all, sidestepping the question entirely.
	 */
	/*
	 * Same story for Klaviyo's "JOIN OUR CREW" teaser popup - also position:fixed, also
	 * floats over everything by design. Its class includes a generated suffix
	 * (`kl-teaser-UHjaDi`) that could easily be different on another render/campaign, so
	 * matching the stable `kl-teaser-` prefix via an attribute selector is more robust than
	 * hardcoding the exact class.
	 */
	body:has(#ubermenu-main-2-main_menu.ubermenu-responsive:not(.ubermenu-responsive-collapse)) .ab-sticky-btn,
	body:has(#ubermenu-main-2-main_menu.ubermenu-responsive:not(.ubermenu-responsive-collapse)) #tidio-chat,
	body:has(#ubermenu-main-2-main_menu.ubermenu-responsive:not(.ubermenu-responsive-collapse)) [class*="kl-teaser-"] {
		display: none !important;
	}

	/* The header already has a persistent search box - hide UberMenu's own duplicate one */
	.ubermenu-item:has(> .ubermenu-content-block .ubermenu-search) {
		display: none !important;
	}

	/*
	 * ...except below 500px, where main.css hides the header's own search entirely
	 * (`.headsrch { display: none }`, assets/css/main.css) to make room for the logo and
	 * menu toggle. Below that width this duplicate becomes the only search box left on the
	 * page, so un-hide it rather than leaving mobile with no way to search at all.
	 */
	@media screen and (max-width: 500px) {
		.ubermenu-item:has(> .ubermenu-content-block .ubermenu-search) {
			display: block !important;
		}
	}

	/*
	 * UberMenu's own CSS never rotates the chevron on open (checked ubermenu.css directly -
	 * the :after arrow is a static character, no .ubermenu-active variant exists). Add it
	 * ourselves, reacting to the same .ubermenu-active class UberMenu already toggles. (The
	 * transition itself lives with the rest of the badge styling further down.)
	 */
	#ubermenu-main-2-main_menu .ubermenu-active > .ubermenu-target::after {
		transform: rotate(180deg);
	}

	/*
	 * Same stuck-.ubermenu-in-transition bug as the top-level nav, hitting submenu panels
	 * this time. ubermenu.js's closeSubmenu() waits for a transitionend event on `> ul`
	 * to know when it's safe to remove .ubermenu-in-transition - but this mega-menu's
	 * submenu is a `<div class="ubermenu-submenu">`, not a `<ul>`, so that listener is bound
	 * to an empty selection and never fires. The class (and ubermenu.css's accompanying
	 * `.ubermenu-in-transition > .ubermenu-submenu-drop { height: auto; }`) sticks around
	 * forever after closing, leaving a full-height blank panel behind. Force collapsed
	 * regardless of that stuck class whenever the item isn't actually active.
	 */
	#ubermenu-main-2-main_menu .ubermenu-item:not(.ubermenu-active) > .ubermenu-submenu-drop {
		height: 0 !important;
		max-height: 0 !important;
		visibility: hidden !important;
		overflow: hidden !important;
	}

	/*
	 * The mega-menu's own padding:20px (below) isn't gated on open/closed state, and since
	 * the submenu-drop is box-sizing:border-box, height:0 above can't actually shrink the box
	 * below that padding - border-box only lets the CONTENT area go to 0, padding still takes
	 * its full 20px top+bottom. That's a real, visible 40px gap left behind under every closed
	 * mega item (Products/Markets). Zero the padding too while closed; it comes back once
	 * .ubermenu-active restores the plain padding:20px rule below.
	 */
	#ubermenu-main-2-main_menu .ubermenu-item:not(.ubermenu-active) > .ubermenu-submenu-drop.ubermenu-submenu-type-mega {
		padding: 0 !important;
	}

	/*
	 * Every submenu panel (any level, any type - mega/flyout/stack) is `position: absolute`
	 * by UberMenu's base CSS. The top-level "Products" mega-menu only looks like a clean
	 * inline accordion by coincidence (wide/tall enough with a matching white background to
	 * hide that it's actually overlaying); nested items like "Docks by Water Type" make it
	 * obvious - the item below stays in its original spot while the panel floats on top of
	 * it. Force every level into normal in-flow layout instead of absolute overlay.
	 */
	#ubermenu-main-2-main_menu .ubermenu-submenu-drop {
		position: relative !important;
		top: auto !important;
		left: auto !important;
		clip: auto !important;
		box-shadow: none !important;
		width: 100% !important;
	}

	#ubermenu-main-2-main_menu .ubermenu-submenu-drop.ubermenu-submenu-type-mega {
		background: transparent;
		padding: 20px;
	}

	/*
	 * Radius bumped from 7px to 10px, and a border added, to match the flyout cards
	 * (Resources, etc.) further down exactly - same visual language everywhere now that both
	 * use the same palette. The border is one step more saturated than the card's own
	 * background (rather than a neutral gray) so it reads as "this card's own edge" rather
	 * than a generic outline.
	 */
	#ubermenu-main-2-main_menu .ubermenu-submenu-drop.ubermenu-submenu-type-mega > ul {
		background-color: #d5e4ee;
		border: 1px solid #b9d3e5;
		border-radius: 10px;
		margin-bottom: 0;
	}

	/*
	 * The plugin's own custom.css (content/plugins/ubermenu/custom/custom.css, separate from
	 * our theme entirely) sets `color: #cbcbcb !important` on this container and on
	 * .ubermenu-target-title specifically, built for the old dark theme - light gray text
	 * would be close to unreadable against the light background above. Overriding both with
	 * matching !important, since inheritance alone can't beat their more specific
	 * .ubermenu-target-title rule.
	 *
	 * That same .ubermenu-target-title span also gets its OWN, separate
	 * `background-color: #2a3546` directly from the plugin file (two competing rules there,
	 * one for #fff and one for #2a3546 at the two overlapping breakpoints - #2a3546 wins by
	 * being later in source order) - overriding the *link's* background earlier doesn't
	 * touch this at all, since background-color isn't inherited and this span has its own
	 * explicit value. Left unfixed, it renders as a solid dark rectangle sized to the text,
	 * sitting on top of the now-light card underneath it.
	 */
	#ubermenu-main-2-main_menu .ubermenu-submenu.ubermenu-submenu-id-51,
	#ubermenu-main-2-main_menu .ubermenu-submenu.ubermenu-submenu-id-51 .ubermenu-target-title,
	#ubermenu-main-2-main_menu .ubermenu-submenu.ubermenu-submenu-id-46,
	#ubermenu-main-2-main_menu .ubermenu-submenu.ubermenu-submenu-id-46 .ubermenu-target-title {
		color: #2a3546 !important;
		background: transparent !important;
	}

	#ubermenu-main-2-main_menu .ubermenu-submenu-drop.ubermenu-submenu-type-mega > ul > .ubermenu-item-type-custom > ul > li {
		padding: 0;
	}

	#ubermenu-main-2-main_menu .ubermenu-submenu-drop.ubermenu-submenu-type-mega > ul > .ubermenu-item-type-custom > ul > li .textwidget {
		border-top-left-radius: 10px;
		border-top-right-radius: 10px;
	}

	#ubermenu-main-2-main_menu .ubermenu-submenu-drop.ubermenu-submenu-type-mega > ul > .ubermenu-item-type-custom  .ubermenu-submenu-type-stack {
		margin: 20px;
		background: #bcd7e8;
		border: 1px solid #9dc3da;
		border-radius: 8px;
	}

	/*
	 * The rule above uses a descendant selector, so it also matches a stack nested inside
	 * another stack (e.g. "PWC EZ Ports" children, nested inside "Boat Ports & Lifts" own
	 * stack) - meaning that inner box gets the SAME 20px margin as the outer one, and the
	 * two compound to 40px+ of cumulative inset before the links' own padding is even added.
	 * Pull the nested instance back in.
	 */
	#ubermenu-main-2-main_menu .ubermenu-submenu-drop.ubermenu-submenu-type-mega .ubermenu-submenu-type-stack .ubermenu-submenu-type-stack {
		/*
		 * !important because this and the 20px rule above tie on both ID count (1) and
		 * class count (4) - with the first two specificity components equal, the tie goes
		 * to the rule with more element/tag selectors, and the 20px rule's `> ul` gives it
		 * exactly one more than this rule has, so it was winning despite looking less
		 * specific at a glance.
		 */
		margin: 4px 8px !important;
		/* ubermenu.css puts padding-top/bottom:10px on the stack UL itself, separate from
		   any link's own padding - that's the extra space below the last item specifically */
		padding: 0 !important;
		/*
		 * The old dark version got this third level of nesting "for free" via two stacked
		 * rgba(0,0,0,.2) overlays compounding to look darker than either alone - a solid
		 * light background can't do that trick (there's nothing showing through), so it needs
		 * its own explicit, one-step-deeper tone to keep the same three-level depth visible.
		 */
		background: #a3c9e0 !important;
		border: 1px solid #82b3cf !important;
		border-radius: 6px !important;
	}

	#ubermenu-main-2-main_menu .ubermenu-submenu-drop.ubermenu-submenu-type-mega .ubermenu-submenu-type-stack .ubermenu-submenu-type-stack > li {
		margin: 0 !important;
	}

	#ubermenu-main-2-main_menu .ubermenu-submenu-drop.ubermenu-submenu-type-mega .ubermenu-submenu-type-stack .ubermenu-submenu-type-stack .ubermenu-target {
		margin: 0 !important;
		padding: 10px 14px !important;
	}

	#ubermenu-main-2-main_menu .ubermenu-submenu-drop.ubermenu-submenu-type-mega > ul > li.ubermenu-active > a {
		border-bottom: 1px solid rgba(0, 101, 164, 0.15);
	}

	/*
	 * The plugin's own custom.css also has `.ubermenu-submenu.ubermenu-submenu-id-51 a,
	 * ...-id-46 a { background-color: #2a3546 !important; }` - EVERY link anywhere in these
	 * two submenus, not just the ones nested inside a stack box. The narrower override this
	 * replaced only caught links inside .ubermenu-submenu-type-stack, missing top-level stack
	 * headers like "Floating Docks" itself - which is why that one row still had a dark
	 * background with unreadable black text on it after the rest went light. Covering every
	 * `a` in the submenu directly instead of just the nested case.
	 */
	#ubermenu-main-2-main_menu .ubermenu-submenu.ubermenu-submenu-id-51 a,
	#ubermenu-main-2-main_menu .ubermenu-submenu.ubermenu-submenu-id-46 a {
		background: transparent !important;
	}

	#ubermenu-main-2-main_menu .ubermenu-submenu-drop.ubermenu-submenu-type-mega > ul > .ubermenu-item-type-custom  .ubermenu-submenu-type-stack a span {
		background: transparent;
	}

	#ubermenu-main-2-main_menu .ubermenu-submenu-drop.ubermenu-submenu-type-mega > ul > li:last-child > a {
		border-bottom-right-radius: 10px;
		border-bottom-left-radius: 10px;
	}

	/*
	 * Visual hierarchy for the 3 nesting levels, deliberately mirroring the box-in-box
	 * pattern from the Products/Markets mega-menu above (padded rounded card, transparent
	 * rows so the card's own tint shows through as each row's background, a divider only
	 * between an *active* row and whatever follows it - not between every row) - both now use
	 * the same light palette (originally mega was dark navy/black; recolored to match once
	 * that stopped being the intended design):
	 * Level 0 = top-level items (Products, Markets, Resources, ...) - plain white/bold root
	 *           row, unchanged either way since it isn't nested inside anything itself.
	 * Level 1 = direct children (Getting Started, Docks by Water Type, ...) - transparent
	 *           rows sitting inside a light-blue card that appears under level-0 once opened.
	 * Level 2 = children of a level-1 item (Ocean Docks, ...) - transparent rows inside a
	 *           second, slightly more saturated card nested directly under their level-1
	 *           parent row, only decorated while open so there's no stray border sliver when
	 *           collapsed.
	 *
	 * This particular block is scoped to `.ubermenu-submenu-type-flyout` dropdowns only (e.g.
	 * Resources) - "Products" is `.ubermenu-submenu-type-mega`, a richer multi-column layout
	 * with its own images and per-item styling (some lazy-loaded, so it never shows up in a
	 * plain HTML fetch), styled separately further up but with the same colors now.
	 */
	#ubermenu-main-2-main_menu .ubermenu-item-level-0 {
		background: #fff;
		border-bottom: 1px solid #dde3e8;
	}

	#ubermenu-main-2-main_menu .ubermenu-item-level-0 > .ubermenu-target {
		padding: 16px 50px 16px 16px !important;
		font-size: 15px;
	}

	#ubermenu-main-2-main_menu .ubermenu-item-level-0.ubermenu-active {
		border-bottom: none;
		margin-bottom: 12px;
	}

	/*
	 * This card is the `.ubermenu-submenu-drop` itself, which other rules elsewhere force to
	 * `width: 100% !important` / `min-width: 100% !important` (needed so panels aren't
	 * float/column-collapsed) - real margin on that same element sits *outside* whatever
	 * width it's forced to, so a fixed/percentage width and a real horizontal margin always
	 * compound into overflow together. `width: auto` is what actually fixes that: it tells
	 * the browser to solve for a width that fits the container with the margin already
	 * subtracted, same as any normal block element - so it can go back to a real margin
	 * on all sides (20px, matching mega's own outer padding:20px frame) as long as it also
	 * overrides those forced width/min-width rules back to auto/0.
	 */
	#ubermenu-main-2-main_menu .ubermenu-item-level-0.ubermenu-active > .ubermenu-submenu-drop:not(.ubermenu-submenu-type-mega) {
		background: #d5e4ee;
		border: 1px solid #b9d3e5;
		margin: 20px;
		width: auto !important;
		min-width: 0 !important;
		border-radius: 10px;
		overflow: hidden;
	}

	#ubermenu-main-2-main_menu .ubermenu-item-level-1 {
		background: transparent;
	}

	#ubermenu-main-2-main_menu .ubermenu-submenu-type-flyout > .ubermenu-item-level-1 > .ubermenu-target {
		display: block;
		padding: 12px 46px 12px 18px !important;
		font-size: 14px;
		font-weight: 600;
		color: #2a3546 !important;
		background: transparent;
		border-bottom: 1px solid rgba(0, 101, 164, 0.15);
	}

	/* Last row, and any row that's itself active, drop the divider - an active row's
	   content flows straight into its own nested container instead of being separated from
	   it, matching mega's `> ul > li.ubermenu-active > a` treatment */
	#ubermenu-main-2-main_menu .ubermenu-submenu-type-flyout > .ubermenu-item-level-1:last-child > .ubermenu-target,
	#ubermenu-main-2-main_menu .ubermenu-submenu-type-flyout > .ubermenu-item-level-1.ubermenu-active > .ubermenu-target {
		border-bottom: none;
	}

	/* Same width:auto/min-width:0 fix as the level-0 card above */
	#ubermenu-main-2-main_menu .ubermenu-item-level-1.ubermenu-active > .ubermenu-submenu-drop:not(.ubermenu-submenu-type-mega) {
		background: #bcd7e8;
		border: 1px solid #9dc3da;
		margin: 20px;
		width: auto !important;
		min-width: 0 !important;
		border-radius: 8px;
		overflow: hidden;
	}

	/*
	 * Level-2 items also carry .ubermenu-column.ubermenu-column-auto - they're structurally
	 * "columns" for UberMenu's mega-menu grid, even though this particular submenu is just a
	 * plain list. That pulls in `float: left; width: auto` from UberMenu's base CSS, which is
	 * why they were floating at content-width instead of stacking as full-width rows (and why
	 * the rounded card only wrapped the collapsed float-contained height, not the real content).
	 */
	#ubermenu-main-2-main_menu .ubermenu-item-level-2 {
		background: transparent;
		display: block !important;
		float: none !important;
		clear: both !important;
		width: 100% !important;
		min-width: 100% !important;
		max-width: 100% !important;
	}

	#ubermenu-main-2-main_menu .ubermenu-submenu-type-flyout > .ubermenu-item-level-2 > .ubermenu-target {
		padding: 11px 16px 11px 20px !important;
		font-size: 13px;
		font-weight: 600;
		color: #004987 !important;
		background: transparent;
		border-bottom: 1px solid rgba(0, 73, 135, 0.15);
	}

	#ubermenu-main-2-main_menu .ubermenu-submenu-type-flyout > .ubermenu-item-level-2:last-child > .ubermenu-target {
		border-bottom: none;
	}

	/*
	 * Chevron gets its own square badge, stretched to fill the row's full height
	 * (top:0;bottom:0 against a position:relative target, rather than a fixed pixel size
	 * with a manually-calculated top:50%/margin-top centering hack that's fragile against
	 * any row-height change), kept circular via aspect-ratio + border-radius:50%.
	 *
	 * Split across two pseudo-elements on purpose: ::before is the plain background circle
	 * and never gets transformed, ::after is transparent and holds only the icon glyph. If
	 * a single element carried both the background and the rotate-on-open transform, the
	 * whole circle would visibly spin during the transition (even though a plain circle
	 * looks identical at 0deg vs 180deg, the *transition* through the in-between angles is
	 * still visible) - keeping the background on a separate, untransformed element means
	 * only the glyph itself appears to rotate.
	 *
	 * This is UberMenu's "drop" type (top-level items, and some nested flyout items like
	 * "Docks by Water Type") - a completely separate badge from .ubermenu-has-submenu-stack
	 * further down (used exclusively inside the mega menus), which already used a smaller
	 * inset circle. The two badges have always been visually different for that reason, not
	 * because of the light/dark recoloring - but with everything else now matching between
	 * mega and flyout, the mismatched badge shape stood out as if it hadn't been fixed.
	 * Matching the stack badge's exact 10px inset + border-radius:50% here instead of the
	 * old edge-to-edge square makes every chevron in the menu the same shape and proportion.
	 */
	#ubermenu-main-2-main_menu .ubermenu-has-submenu-drop > .ubermenu-target {
		position: relative;
		padding-right: 46px !important;
	}

	#ubermenu-main-2-main_menu .ubermenu-has-submenu-drop > .ubermenu-target::before {
		content: "";
		background: #eef1f5;
		position: absolute;
		top: 10px;
		bottom: 10px;
		right: 10px;
		aspect-ratio: 1;
		width: auto;
		border-radius: 50%;
	}

	#ubermenu-main-2-main_menu .ubermenu-has-submenu-drop > .ubermenu-target::after {
		display: flex !important;
		align-items: center;
		justify-content: center;
		position: absolute !important;
		top: 10px !important;
		bottom: 10px !important;
		right: 10px !important;
		left: auto !important;
		margin: 0 !important;
		aspect-ratio: 1;
		width: auto;
		height: auto;
		font-size: 16px;
		line-height: normal;
		text-align: center;
		border-radius: 0;
		transition: transform 0.2s ease;
	}

	/*
	 * Mega-menu "stack" type items (e.g. "Floating Docks" inside Products) have no
	 * show/hide mechanism at all by default - they're designed to always render inline, so
	 * ubermenu.css never gives them a chevron or a collapsed state. Drop items already get
	 * their glyph from ubermenu's own CSS (the badge styling above just restyles it) - stack
	 * items need the content declared from scratch.
	 *
	 * The <li> itself has `padding-top: 10px` (ubermenu/custom/custom.css), pushing
	 * .ubermenu-target down and leaving a gap above it that a target-anchored badge doesn't
	 * cover. Attaching the badge to the <li> instead (an earlier attempt) fixed that gap, but
	 * broke worse: the <li>'s height includes its nested submenu once opened, so a badge
	 * stretched to the <li>'s full height via top:0/bottom:0 grew to cover the whole expanded
	 * section instead of staying a small header-row badge. The actual fix is removing the
	 * padding-top from the <li> and moving that same spacing onto the submenu's own
	 * margin-top instead - .ubermenu-target now starts exactly at the <li>'s top edge with
	 * no gap, and the <li>'s height when closed exactly equals .ubermenu-target's own height
	 * (the submenu contributes nothing while display:none), so the badge can go back on
	 * .ubermenu-target where it doesn't grow when the section opens - which also removes the
	 * z-index/pointer-events workaround an .ubermenu-target-hosted badge never needed.
	 */
	#ubermenu-main-2-main_menu .ubermenu-has-submenu-stack {
		padding-top: 0 !important;
	}

	/*
	 * That plugin custom.css also puts a hard `border-bottom: 2px solid #212a37` (near-black)
	 * on every stack header inside these two submenus specifically - a leftover divider from
	 * the old dark theme that reads as a harsh, out-of-place line now that everything around
	 * it is light. Swapping for the same subtle blue-tinted divider used everywhere else in
	 * this menu keeps the border where it visually was, just consistent with the new palette.
	 */
	#ubermenu-main-2-main_menu .ubermenu-submenu.ubermenu-submenu-id-51 .ubermenu-has-submenu-stack,
	#ubermenu-main-2-main_menu .ubermenu-submenu.ubermenu-submenu-id-46 .ubermenu-has-submenu-stack {
		border-bottom: 1px solid rgba(0, 101, 164, 0.15) !important;
	}

	/* The plugin's own version of this rule drops the divider on the last stack header too
	   (clean bottom edge, no trailing line) - matching that here as well */
	#ubermenu-main-2-main_menu .ubermenu-submenu.ubermenu-submenu-id-51 .ubermenu-has-submenu-stack:last-child,
	#ubermenu-main-2-main_menu .ubermenu-submenu.ubermenu-submenu-id-46 .ubermenu-has-submenu-stack:last-child {
		border-bottom: none !important;
	}

	#ubermenu-main-2-main_menu .ubermenu-has-submenu-stack > .ubermenu-submenu-type-stack {
		margin-top: 10px;
	}

	/*
	 * ubermenu.css gives every stack-level link (toggle or plain) only padding-top/bottom:5px
	 * ("Stacked items are tighter", per its own comment) via
	 * .ubermenu-submenu-type-stack > .ubermenu-item-normal > .ubermenu-target - both toggles
	 * like "PWC EZ Ports" and plain links like "Boat Ports"/"Aegis Boat Lift" match that same
	 * selector, so growing it here keeps the whole sibling group's row height consistent
	 * instead of singling out just the toggles.
	 *
	 * "Floating Docks" (the first row directly inside a mega card) needs the same treatment
	 * but isn't reachable through that selector at all - it's a .ubermenu-item-header, and
	 * it's a direct child of the mega card's outer .ubermenu-row, not of a
	 * .ubermenu-submenu-type-stack (that class belongs to *its own* children's container, one
	 * level further in) - a first attempt at this assumed the same parent as the stack items
	 * and silently never matched anything.
	 */
	#ubermenu-main-2-main_menu .ubermenu-submenu-type-stack > .ubermenu-item-normal > .ubermenu-target,
	#ubermenu-main-2-main_menu .ubermenu-submenu-drop.ubermenu-submenu-type-mega > ul > .ubermenu-item-header > .ubermenu-target {
		padding-top: 14px !important;
		padding-bottom: 14px !important;
	}

	#ubermenu-main-2-main_menu .ubermenu-has-submenu-stack > .ubermenu-target {
		position: relative;
		padding-right: 46px !important;
	}

	#ubermenu-main-2-main_menu .ubermenu-has-submenu-stack > .ubermenu-target::before {
		content: "";
		background: #eef1f5;
		position: absolute;
		top: 10px;
		bottom: 10px;
		right: 10px;
		aspect-ratio: 1;
		width: auto;
		border-radius: 50%;
	}

	/*
	 * Nested levels (e.g. "PWC EZ Ports", inside "Boat Ports & Lifts" own stack) have a
	 * shorter row height than shallower ones - the same fixed 22px icon that fit fine at the
	 * shallower level overflows a circle sized against a shorter row. Shrunk here so it stays
	 * comfortably inside the circle regardless of depth.
	 */
	#ubermenu-main-2-main_menu .ubermenu-has-submenu-stack > .ubermenu-target::after {
		content: "\f107";
		font-family: FontAwesome;
		display: flex;
		align-items: center;
		justify-content: center;
		position: absolute;
		top: 10px;
		bottom: 10px;
		right: 10px;
		left: auto;
		margin: 0;
		aspect-ratio: 1;
		width: auto;
		height: auto;
		font-size: 15px;
		line-height: normal;
		text-align: center;
		transition: transform 0.2s ease;
	}

	#ubermenu-main-2-main_menu .ubermenu-has-submenu-stack > .ubermenu-submenu-type-stack {
		display: none;
	}

	#ubermenu-main-2-main_menu .ubermenu-has-submenu-stack.ubermenu-active > .ubermenu-submenu-type-stack {
		display: block;
	}

	/*
	 * Products' mega-menu columns (.ubermenu-column-1-6 etc) are sized for a 6-column
	 * desktop grid - same underlying issue as the earlier .ubermenu-column-auto float bug in
	 * Resources' flyout items, just hitting mega-menu columns this time. Force them to stack
	 * full-width on mobile instead.
	 */
	#ubermenu-main-2-main_menu .ubermenu-submenu-type-mega .ubermenu-column,
	#ubermenu-main-2-main_menu .ubermenu-submenu-type-mega .ubermenu-column-auto {
		display: block !important;
		float: none !important;
		clear: both !important;
		width: 100% !important;
		min-width: 100% !important;
		max-width: 100% !important;
	}

	/*
	 * That same plugin custom.css file also hides this promo widget entirely on mobile -
	 * `.ubermenu-submenu.ubermenu-submenu-id-51 .ubermenu-item-835 { display:none; }` at
	 * max-width:1024px, and the same again for id-46/Markets - except Markets' own promo
	 * widget item is a *different* numeric ID (ubermenu-item-4313, not 835 - that old rule
	 * lists 835 for both ids, so it's actually a no-op for Markets and this widget was likely
	 * never hidden by it there in the first place). These are WordPress-assigned post/menu-
	 * item IDs, not something to hardcode a second time - targeting the actual structural
	 * pattern (any item whose content-block wraps a .textwidget) covers both mega menus
	 * regardless of their specific IDs, and won't silently stop working if a future edit ever
	 * changes them again.
	 */
	#ubermenu-main-2-main_menu .ubermenu-submenu.ubermenu-submenu-id-51 li:has(.textwidget),
	#ubermenu-main-2-main_menu .ubermenu-submenu.ubermenu-submenu-id-46 li:has(.textwidget) {
		display: block !important;
		/*
		 * display:none was one thing to undo, but the promo box still isn't showing even with
		 * that reverted - :has(.textwidget) matches both the outer column li and the inner
		 * widget li in this chain, and forcing height:auto/overflow:visible on both rules out
		 * any of them (or the .ubermenu-content-block wrapper between them) still collapsing
		 * to zero height and hiding the 180px-tall .textwidget inside regardless of its own
		 * display value.
		 */
		height: auto !important;
		min-height: 180px !important;
		overflow: visible !important;
	}

	/*
	 * Traced via computed-style inspection to content/plugins/ubermenu/custom/custom.css
	 * (UberMenu's own site-specific customization file, separate from the theme entirely):
	 * `.ubermenu-submenu.ubermenu-submenu-id-51 .textwidget { width:237px; height:239px;
	 * display:table-cell; background: url(mega-nav-img.jpg) ...cover; }` - a fixed square
	 * size built for the desktop 6-column grid, with no mobile override. Just overriding
	 * width/height wasn't enough - table-cell layout expands to fit content/context rather
	 * than strictly respecting those values, which is why it stayed the same size. Switching
	 * to flex (for the same centering effect table-cell + vertical-align was giving it) makes
	 * the explicit size actually stick. background-size:cover means the image adapts cleanly
	 * to whatever box size we give it here.
	 */
	#ubermenu-main-2-main_menu .ubermenu-submenu.ubermenu-submenu-id-51 .textwidget,
	#ubermenu-main-2-main_menu .ubermenu-submenu.ubermenu-submenu-id-46 .textwidget {
		display: flex !important;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		width: 100% !important;
		height: 180px !important;
		overflow: hidden;
	}

	/*
	 * Products/Markets used to need a dark-context override here (a frosted white overlay
	 * instead of the badge's default light-gray, plus a light icon color) because the
	 * mega-menu background was dark navy. Now that it's the same light palette as every other
	 * dropdown, the badge's own defaults already work correctly here - nothing left to
	 * override.
	 */
}
