/**
 * Minimal View (?view=minimal) — layout, sticky header, suppression rules.
 *
 * Ported verbatim from `mm_minimal_view_styles()` in the Code Snippets export,
 * Live 2026-08-12 lines 17271–17570. Live was the source of truth: Stage had
 * z-index 9999 (which covers the filter sidebar), and was missing the page-heading
 * and filter-slot rules entirely.
 *
 * Loaded only when mm_is_minimal_view() is true, so none of this leaks into normal view.
 * Every rule is therefore already scoped by the request; the .mm-minimal-view prefix is
 * kept where the original had it so selector specificity is unchanged.
 */

/* ── Page shell ──────────────────────────────────────────────────────────── */

/* Ensure minimal view pages have enough height */
html,
body.mm-minimal-view {
	min-height: 100vh;
}

body.mm-minimal-view {
	display: flex;
	flex-direction: column;
}

.mm-minimal-spacer {
	flex: 1 0 auto;
	min-height: 300px;
}

.main-content-container {
	margin: 20px 0 !important;
}

/* ── Suppression list ────────────────────────────────────────────────────── */

/*
 * `.hide-for-minimal` is the opt-out class other templates apply to their own markup.
 * The rest are specific elements that make no sense in a QR-driven microsite: the
 * customer is standing in the shop, so breadcrumbs, add-to-cart and quote CTAs go.
 */
.mm-minimal-view .hide-for-minimal,
.woocommerce-breadcrumb,
.trade_in_breadcrumbs,
.single_add_to_cart_button,
.get_quote_wrapper,
.trade-in-cart-button,
.new-used-urls-below,
.back-btn-new {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.woobt-wrap {
	display: none !important;
}

#circular-checkout-widget,
[id^="circular-"],
[class*="circular-checkout"] {
	display: none !important;
}

.woo-variation-items-wrapper .reset_variations {
	display: inline;
	padding: 8px 16px !important;
	margin: 2px !important;
	white-space: nowrap !important;
}

/* ── Sticky header ───────────────────────────────────────────────────────── */

/*
 * z-index is intentionally kept below 999 so the product-category-v2 filter sidebar
 * (z-index 1000) and its overlay (z-index 999) can cover the header when opened.
 * Do not raise this to 9999 — that was the Stage regression.
 */
.mm-minimal-header {
	position: sticky;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	background-color: #fff;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
	width: 100%;
}

.mm-minimal-header-inner {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 10px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	box-sizing: border-box;
}

.mm-minimal-back-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 15px;
	font-weight: 500;
	color: #333;
	text-decoration: none !important;
	padding: 6px 10px 6px 4px;
	border-radius: 6px;
	transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
	line-height: 1;
	cursor: pointer;
}

.mm-minimal-back-btn:hover,
.mm-minimal-back-btn:focus {
	color: #000;
	background-color: rgba(0, 0, 0, 0.04);
	text-decoration: none;
	outline: none;
	padding: 6px 10px 6px 10px;
}

.mm-minimal-back-btn:hover .mm-minimal-back-arrow,
.mm-minimal-back-btn:focus .mm-minimal-back-arrow {
	transform: translateX(-3px);
}

.mm-minimal-back-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	transition: transform 0.15s ease;
}

.mm-minimal-back-arrow svg {
	display: block;
	width: 20px;
	height: 20px;
}

.mm-minimal-back-label {
	line-height: 1;
}

.mm-minimal-home-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #333;
	text-decoration: none !important;
	padding: 6px 8px;
	border-radius: 6px;
	line-height: 1;
	cursor: pointer;
	transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.mm-minimal-home-btn:hover,
.mm-minimal-home-btn:focus {
	color: #000;
	background-color: rgba(0, 0, 0, 0.04);
	text-decoration: none;
	outline: none;
	transform: translateY(-1px);
}

.mm-minimal-home-btn svg {
	display: block;
	width: 22px;
	height: 22px;
}

/* ── Filter slot (second header row) ─────────────────────────────────────── */

/*
 * Empty slot is hidden so the header collapses to a single row on product and other
 * pages, and on desktop where the plugin keeps the filter toggle display:none.
 */
.mm-minimal-header-filter-slot:empty {
	display: none;
}

.mm-minimal-header-filter-slot {
	padding: 0 14px 10px;
}

/* Matches the plugin's own mobile-only visibility for the toggle. */
@media (min-width: 1024px) {
	.mm-minimal-header-filter-slot {
		display: none !important;
	}
}

/*
 * Override the plugin's standalone-sticky styling now that the toggle lives inside our
 * sticky header. Keeps the full-width button look.
 */
.mm-minimal-header .mm-filter-toggle.mm-filter-toggle--in-header {
	position: static !important;
	top: auto !important;
	margin: 0 !important;
	width: 100% !important;
	z-index: auto !important;
}

/* ── Typography ──────────────────────────────────────────────────────────── */

.mm-minimal-view .mm-minimal-page-heading .elementor-heading-title,
.mm-minimal-view .mm-minimal-page-heading.elementor-heading-title,
.mm-minimal-view .elementor-widget-theme-page-title .elementor-heading-title {
	text-align: left !important;
	font-size: 24px !important;
	font-weight: bold !important;
	margin: 20px 0 0 !important;
	color: #000 !important;
}

@media (max-width: 768px) {
	.mm-minimal-view .mm-minimal-page-heading .elementor-heading-title,
	.mm-minimal-view .mm-minimal-page-heading.elementor-heading-title,
	.mm-minimal-view .elementor-widget-theme-page-title .elementor-heading-title {
		font-size: 16px !important;
	}
}

.mm-minimal-view .next-to-back-btn-title {
	font-size: 16px !important;
}

.mm-minimal-view .trade-in-tax-intro {
	font-size: 13px !important;
}

.mm-minimal-view .mm-minimal-page-subtitle .elementor-widget-container,
.mm-minimal-view .mm-minimal-page-subtitle .elementor-widget-container p {
	text-align: left !important;
	font-family: "Montserrat", sans-serif !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	line-height: 28px !important;
	color: #656565 !important;
	margin: 0 0 16px !important;
}

.mm-minimal-view .mm-minimal-page-subtitle .elementor-widget-container p:first-child {
	margin-top: 0 !important;
}

/* ── "Model not listed" copy swap ────────────────────────────────────────── */

/*
 * The source paragraph is kept in the DOM (height reserved) and its text replaced via
 * ::after, because the wording differs between normal view ("contact us") and the
 * in-store microsite ("reach out to my staff"). Replacing it in CSS avoided touching
 * the Elementor template.
 */
.mm-minimal-view .mm-not-listed-text p {
	visibility: hidden;
	position: relative;
	height: 1.5em;
	font-size: 13px !important;
	font-weight: 500 !important;
	line-height: 28px !important;
	color: #656565 !important;
}

.mm-minimal-view .mm-not-listed-text p::after {
	content: "If your device's model is not listed, please reach out to my staff for assistance.";
	visibility: visible;
	position: absolute;
	left: 0;
	white-space: normal;
}

/* ── Child-category cards ────────────────────────────────────────────────── */

/*
 * The non-minimal twin of this rule is `mm_child_category_card_styles_mobile()` — a snippet
 * in the Code Snippets plugin, present on **Live only** (Live export 2026-08-12 line 17579).
 * Not in this plugin, and not on Stage. Edit both together.
 */
.mm-minimal-view .child-categories .category a {
	display: block;
	margin: 4px;
	padding: 4px 8px;
	background: #ffffff;
	box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	text-align: center;
	text-decoration: none !important;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
	.mm-sticky-left--minimal {
		display: none !important;
	}

	.mm-minimal-view .mm-sticky-right {
		width: 100%;
	}

	.mm-minimal-view .mm-save-selection-qr {
		width: 100%;
	}
}

@media (max-width: 480px) {
	.mm-minimal-header-inner {
		padding: 8px 14px;
	}

	.mm-minimal-back-btn {
		font-size: 14px;
	}

	.mm-minimal-back-arrow svg {
		width: 18px;
		height: 18px;
	}

	.mm-minimal-home-btn svg {
		width: 20px;
		height: 20px;
	}

	.mm-minimal-header-filter-slot {
		padding: 0 14px 8px;
	}
}
