/* ==========================================================================
   EQUIPPEDLY — TPC CONFIGURE HOST ISOLATION
   Store-side only. Does not modify TPC core CSS/JS or the TPC grid.

   Active when html.eq-tpc-configure is present (valid mapped configure request).
   ========================================================================== */

/*
 * Bricks frontend sets html { font-size: 62.5% } (~10px). TPC rem chrome was
 * authored for a ~16px root (as on equippedly-local). Restore 100% only here.
 * Do NOT set font-size on .tpc-public-configurator — rem still reads <html>.
 */
html.eq-tpc-configure {
	font-size: 100%;
}

/*
 * Keep fixed-header clearance; drop extra Bricks section breathing room that
 * stacks under the workspace on configure mode.
 */
html.eq-tpc-configure #brx-content {
	padding-top: var(--eq-header-h-scrolled);
	padding-bottom: 0;
}

html.eq-tpc-configure .brxe-section.eq-section {
	padding-top: 0;
	padding-bottom: 0;
}

/* Newsletter/promo is nonessential around the configurator workspace. */
html.eq-tpc-configure .eq-newsletter {
	display: none !important;
}

/*
 * Equippedly header/footer tokens are mostly px-based, so the 16px root does
 * not redesign them. Bottom nav stays available on mobile for continuity.
 */

/*
 * Mobile Add to Cart conflict (store-side only — do not edit TPC plugin CSS):
 *
 * TPC storefront (max-width: 720px) shows a fixed sticky purchase bar:
 *   .tpc-mobile-cart-action { position:fixed; bottom:0; z-index:40 }
 * Equippedly mobile chrome (max-width: 767px) shows:
 *   .eq-bottom-nav { position:fixed; bottom:0; z-index:120 }
 *
 * Same bottom edge + higher nav z-index completely covers price + Add to Cart.
 * Lift the TPC bar above the nav and expand TPC's reserved --tpc-mobile-cart-h
 * so panel sticky nav / shell padding clear both chrome layers.
 *
 * Chat launcher (.eq-chat-launcher) previously cleared only the bottom nav
 * (56px + 14px). On configure hosts it must also clear the sticky ATC bar.
 * CSS fallbacks below; tpc-configure-host.js overwrites with measured heights.
 */
@media (max-width: 720px) {
	html.eq-tpc-configure {
		--eq-bottom-nav-h: 56px;
		--eq-tpc-atc-bar-h: 3.85rem;
		--eq-chat-clearance: 14px;
		--eq-tpc-bottom-nav-offset: calc(var(--eq-bottom-nav-h) + env(safe-area-inset-bottom, 0px));
		--eq-chat-launcher-bottom: calc(
			var(--eq-tpc-bottom-nav-offset) + var(--eq-tpc-atc-bar-h) + var(--eq-chat-clearance)
		);
	}

	html.eq-tpc-configure .tpc-mobile-cart-action {
		bottom: var(--eq-tpc-bottom-nav-offset);
		z-index: 130;
		/* Safe-area is already occupied by .eq-bottom-nav. */
		padding-bottom: 0.45rem;
		/* Match Equippedly page surface (not TPC pure white). */
		background: var(--eq-color-chalk-white);
		border-top: 1px solid var(--eq-color-border-light);
		box-shadow: 0 -6px 18px rgba(14, 14, 16, 0.06);
	}

	/* Sticky price only — chalk bar needs dark ink; leave Volt for the ATC button. */
	html.eq-tpc-configure .tpc-mobile-cart-action__price-value,
	html.eq-tpc-configure .tpc-mobile-cart-action__price-value .woocommerce-Price-amount,
	html.eq-tpc-configure .tpc-mobile-cart-action__price-value .amount {
		color: #141414;
		font-weight: 750;
	}

	/*
	 * Sit above sticky ATC + bottom nav. More specific than support-chat.css
	 * so this wins after that sheet loads. Measured vars refine at runtime.
	 */
	html.eq-tpc-configure .eq-chat-launcher {
		inset-block-end: var(--eq-chat-launcher-bottom);
		z-index: 140;
	}

	html.eq-tpc-configure .tpc-public-shell,
	html.eq-tpc-configure .tpc-public-shell--storefront {
		/*
		 * TPC default: calc(3.85rem + safe-area). Add the 56px nav band so
		 * sticky zone nav and shell padding-bottom clear ATC + bottom nav.
		 */
		--tpc-mobile-cart-h: calc(var(--eq-tpc-atc-bar-h) + var(--eq-bottom-nav-h) + env(safe-area-inset-bottom, 0px));
	}

	/*
	 * Shell padding now clears ATC + nav. Drop the generic body pad on
	 * configure hosts to avoid a double empty band under the workspace.
	 */
	html.eq-tpc-configure body {
		padding-bottom: 0;
	}
}
