/* ============================================================
   LEVEL UP SMARTER — MOBILE & TABLET LAYOUT
   Added 2026-08-12.

   Every rule below sits inside a max-width media query. Desktop
   (>1024px) is deliberately untouched.

   WHY THIS FILE EXISTS
   --------------------
   The site was built desktop-first and header template 36 never
   got a small-screen pass. Its top section (#header-main) carries

       #header-main { position: fixed; top: 0; z-index: 999 }

   in its own Elementor custom CSS, and nothing compensates for it
   — no body padding, no offset. So that section is a transparent
   ~257px-tall box pinned over the top of every page.

   On a phone the announcement bar (normal flow, ~158px tall once
   its copy wrapped) sat directly underneath that box. Because the
   header paints later in the DOM it won every hit test in the band
   it covered: the bar's "Get Access" CTA and its close button were
   both untappable, the header logo landed on top of the bar's text,
   and the desktop "Start Here" pill floated over the middle of it.
   That is the "can't click anything, nav and banner are a mess"
   report.

   THE FIX
   -------
   Put the section back in normal flow and move the stickiness up to
   the <header> element itself. <header> is a direct child of <body>,
   so `position: sticky` there holds for the whole document scroll;
   sticky on the section would only have held inside <header>'s own
   (short) box.

   NOTE: nothing may set `overflow-x` on html or body while this is
   in place — that turns the sticky header back into a static one.

   The remainder is sizing: the logo's 80px desktop drop, the 35px
   nav spacer and the desktop "Start Here" pill are suppressed so
   the mobile header is an ordinary ~65px bar.
   ============================================================ */


/* ══════════════════════════════════════════════════════════
   1 — HEADER  (tablet + mobile)
   ══════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {

	/* Out of the fixed layer, back into the flow, below the bar. */
	#header-main {
		position: static !important;
		width: auto !important;
		padding: 8px 16px !important;
	}

	/* Stickiness moves to the element that can actually carry it. */
	header.elementor-location-header {
		position: sticky;
		top: 0;
		z-index: 999;
		background: #fff;
	}

	/* Keep the sticky bar clear of the WP admin bar (logged-in only). */
	body.admin-bar header.elementor-location-header {
		top: 32px;
	}

	#header-main > .elementor-container {
		min-height: 0 !important;
		align-items: center;
	}

	#header-main .elementor-column > .elementor-element-populated {
		padding: 0 !important;
	}

	/* Elementor's default 25px gap under every widget stacks the
	   header's four widgets into a column on a narrow screen. */
	#header-main .elementor-widget:not(:last-child) {
		margin-bottom: 0 !important;
	}

	/* Logo: drop the 80px offset that places it on the desktop hero.
	   Elementor writes _margin onto .elementor-widget-container, not
	   onto the element wrapper, so both are cleared. */
	#header-main .elementor-element-f92a73e,
	#header-main .elementor-element-f92a73e > .elementor-widget-container {
		margin: 0 !important;
	}

	#header-main .elementor-element-f92a73e {
		width: auto !important;
	}

	#header-main .elementor-element-f92a73e img {
		width: auto !important;
		max-width: 100%;
		max-height: 56px;
		height: auto;
		display: block;
	}

	/* 35px spacer that separates the desktop nav from the logo row. */
	#header-main .elementor-element-8f4f14b {
		display: none !important;
	}

	/* Right-hand cluster stays on one line, vertically centred.
	   NOTE: .elementor-widget-wrap and .elementor-element-populated are the
	   SAME element, not nested — a descendant chain between the two matches
	   nothing at all. */
	#header-main .elementor-element-c928f98 > .elementor-widget-wrap {
		flex-wrap: nowrap;
		align-items: center;
		justify-content: flex-end;
		gap: 4px;
	}

	/* Hamburger: real 44px tap target, no stray tablet padding. */
	#header-main .elementor-element-b64fe08,
	#header-main .elementor-element-b64fe08 > .elementor-widget-container {
		padding: 0 !important;
		margin: 0 !important;
	}

	#header-main .elementor-element-b64fe08 a,
	#header-main .elementor-element-b64fe08 .elementor-image {
		display: flex;
		align-items: center;
		justify-content: center;
		min-width: 44px;
		min-height: 44px;
	}

	#header-main .elementor-element-b64fe08 img {
		width: 26px !important;
		max-width: 26px !important;
		height: auto;
	}

	/* Cart toggle: same. */
	#header-main .elementor-element-edd847d .elementor-menu-cart__toggle .elementor-button {
		min-width: 44px;
		min-height: 44px;
		padding: 0 10px;
	}
}


/* ── Mobile only ────────────────────────────────────────── */

@media (max-width: 767px) {

	/* The admin bar is 46px tall below 783px. */
	body.admin-bar header.elementor-location-header {
		top: 46px;
	}

	#header-main {
		padding: 6px 14px !important;
	}

	#header-main .elementor-element-f92a73e img {
		max-height: 50px;
	}

	/* The desktop "Start Here" pill has nowhere to go at this width and
	   was landing on top of the announcement bar. The mobile menu opens
	   with the same link as its first item. */
	#header-main .elementor-element-3ebd1e1 {
		display: none !important;
	}

	/* The mega-menu panel is opened by #megamenu-btn, which Elementor
	   hides on mobile — so the panel is unreachable here. It is a
	   position: fixed, 388px-tall element; keep it out of the layer
	   stack entirely rather than leaving it parked at top: 0. */
	#megamenu {
		display: none !important;
	}
}


/* ══════════════════════════════════════════════════════════
   2 — MOBILE MENU POPUP (Elementor popup 324)
   The popup is sized 100vw. 100vw counts the scrollbar gutter,
   so opening it gives the page a horizontal scrollbar. Width,
   not viewport width.
   ══════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
	.elementor-popup-modal .dialog-widget-content {
		max-width: 100%;
	}
}


/* ══════════════════════════════════════════════════════════
   3 — BOOSTER PACK POPUP  (WPCode snippet 818, #lusPopupOverlay)
   The overlay is a fixed, vertically-centred flex box and the
   dialog inside it has no max-height and `overflow: hidden`. On a
   short phone the dialog is taller than the viewport, so it is
   clipped at BOTH ends with no way to scroll: measured at a
   375x500 viewport the close ✕ sits 77px above the top of the
   screen and the CTA 39px below the bottom — the popup can
   neither be used nor dismissed.

   Anchor it to the top and let the overlay scroll instead.

   !important because WPCode prints the snippet's <style> inline in
   the body, so it beats anything in <head> on document order at
   equal specificity.
   ══════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
	.lus-popup-overlay {
		align-items: flex-start !important;
		overflow-y: auto !important;
		padding: 16px 16px 32px !important;
		-webkit-overflow-scrolling: touch;
	}
}


/* ══════════════════════════════════════════════════════════
   4 — PRODUCT PAGES
   form.cart is display:flex / flex-wrap:nowrap, and it holds two
   items sized for a desktop row: the Add to Cart button (~290px
   intrinsic) and Square's digital-wallet block (#wc-square-
   digital-wallet, a fixed 240px). 530px of content in a 322px
   container with nowrap pushed the page 102px wider than the
   screen on /product/library-membership/, so the whole page
   scrolled sideways and the Add to Cart button hung off the left
   edge at x = -78.

   Let the row wrap and stack the two buttons instead.
   ══════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
	.woocommerce div.product form.cart {
		flex-wrap: wrap !important;
		justify-content: center;
		gap: 12px;
	}

	.woocommerce div.product form.cart .single_add_to_cart_button {
		width: 100%;
		max-width: 100%;
	}

	#wc-square-digital-wallet,
	#wc-square-google-pay,
	#wc-square-digital-wallet * {
		max-width: 100% !important;
	}
}


/* ══════════════════════════════════════════════════════════
   5 — PAGE-SPECIFIC: Booster Pack (596)
   Two separate blow-outs in the hero, both clipped rather than
   scrolled because .bp-hero has overflow: hidden — so the copy
   was simply cut off at the right edge of the phone.

   a) .bp-hero-grid collapses to `grid-template-columns: 1fr`
      below 900px, but `1fr` is `minmax(auto, 1fr)` and the
      automatic minimum is the item's min-content width. The
      card's contents held the track open at 442px inside a
      307px container. min-width: 0 lets the track shrink.

   b) .bp-hero-title is authored for 'Barlow Condensed' but
      resolves to Archivo Black — a far wider face — so at the
      5rem the page sets below 900px, "BOOSTER" measured 442px
      against a 307px column. Sized in vw so it tracks the
      viewport. (The font-family override itself is left alone:
      it is not mobile-specific and the page reads correctly
      with it on desktop.)
   ══════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
	.bp-hero-grid > * {
		min-width: 0;
	}
}

@media (max-width: 767px) {
	.bp-hero-title {
		font-size: clamp(2.6rem, 13.5vw, 5rem) !important;
	}
}


/* ══════════════════════════════════════════════════════════
   6 — PAGE-SPECIFIC: /confirmation/ (756)
   .lus-confirm-wrap goes full-bleed with `width: calc(100% + 40px)`
   and `margin: 0 -20px`, which assumes its container has exactly
   20px of side padding. On a phone the container's padding is 10px,
   so the block ran 10px past each edge and the page scrolled
   sideways. Break out of whatever the padding actually is instead.
   ══════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
	.lus-confirm-wrap {
		width: auto !important;
		margin-left: calc(50% - 50vw) !important;
		margin-right: calc(50% - 50vw) !important;
	}
}


/* ══════════════════════════════════════════════════════════
   7 — PAGE-SPECIFIC: /start-here/ (875)
   The page's own <style> sizes its display headings with a
   clamp() whose *minimum* is wider than a phone viewport:
   `clamp(4rem, 8vw, 8rem)` never goes below 64px, so "YOU
   BEGIN?" renders ~450px wide inside a 375px screen and is
   clipped by .sh-wrap's overflow-x: hidden.

   Corrected here rather than in the post body: pasting markup
   back through this site's editor has silently stripped it
   before, and the page is correct on desktop as it stands.
   ══════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
	.sh-wrap .sh-h1 {
		font-size: clamp(2.6rem, 12vw, 4rem) !important;
	}

	/* The [style] variant catches the inline clamp(3.5rem, …) on the
	   closing section's heading, which has the same problem. */
	.sh-wrap .sh-h2,
	.sh-wrap h2.sh-h2[style] {
		font-size: clamp(2rem, 9vw, 2.8rem) !important;
	}

	.sh-wrap .sh-h3 {
		font-size: 1.5rem;
	}

	.sh-wrap .sh-step-dot-label {
		white-space: normal;
	}
}
