/*
 * WooCommerce App — header/footer chrome presets (layouts 1–5).
 *
 * Loaded only on /app. Depends on app-shell.css (design tokens + base .wc-app-topbar / .wc-app-tabbar).
 * Picked in WooCommerce → App → Colors & theme. Keep this file separate to limit app-shell.css size.
 */

/* Footer preset: space for fixed tab bar (pairs with --wc-app-main-bottom-tabs on .wc-app-body.wc-app-shell in app-shell.css). */
body.wc-app-shell-footer--1 {
	--wc-app-main-bottom-tabs: calc(108px + env(safe-area-inset-bottom));
}
body.wc-app-shell-footer--2 {
	--wc-app-main-bottom-tabs: calc(102px + env(safe-area-inset-bottom));
}
body.wc-app-shell-footer--3 {
	--wc-app-main-bottom-tabs: calc(72px + env(safe-area-inset-bottom));
}
body.wc-app-shell-footer--4 {
	--wc-app-main-bottom-tabs: calc(96px + env(safe-area-inset-bottom));
}
body.wc-app-shell-footer--5 {
	--wc-app-main-bottom-tabs: calc(100px + env(safe-area-inset-bottom));
}

/* Must load after default .wc-app-topbar--home in app-shell.css so presets can override transparent home bar. */

/* --- Header 1 · Storefront card — same floating card on /app home and inner routes (was full-bleed bar on inner only). --- */
body.wc-app-shell-header--1 .wc-app-topbar.wc-app-topbar--shell-1.wc-app-topbar--home,
body.wc-app-shell-header--1.wc-app-body.wc-app-shell .wc-app-topbar.wc-app-topbar--shell-1:not(.wc-app-topbar--home) {
	background: var(--wc-app-color-surface);
	margin: 10px 14px 0;
	padding: max(0px, env(safe-area-inset-top)) 14px 0;
	border-radius: var(--wc-app-radius-lg);
	border: 1px solid var(--wc-app-color-border-soft);
	box-shadow: 0 8px 32px rgba(15, 23, 42, 0.09);
}

body.wc-app-shell-header--1 .wc-app-topbar__cart {
	--wc-app-topbar-badge-ring: var(--wc-app-color-surface);
}

.wc-app-topbar.wc-app-topbar--light.wc-app-topbar--shell-1 .wc-app-topbar__inner {
	padding: 6px 0;
}

/* --- Header 2 · Sunset gradient — bold marketing bar --- */
body.wc-app-shell-header--2 .wc-app-topbar.wc-app-topbar--shell-2,
body.wc-app-shell-header--2 .wc-app-topbar.wc-app-topbar--shell-2.wc-app-topbar--home {
	background: var(--wc-app-color-accent);
	color: var(--wc-app-color-on-accent) !important;
	border-bottom: none;
	box-shadow: 0 10px 32px rgba(var(--wc-app-color-accent-rgb), 0.42);
}

body.wc-app-shell-header--2.wc-app-body.wc-app-shell .wc-app-topbar.wc-app-topbar--shell-2.wc-app-topbar--light:not(.wc-app-topbar--home) {
	background: var(--wc-app-color-accent);
	border-bottom: none;
	box-shadow: 0 10px 32px rgba(var(--wc-app-color-accent-rgb), 0.42);
}

body.wc-app-shell-header--2 .wc-app-topbar__location,
body.wc-app-shell-header--2 .wc-app-topbar__location-text,
body.wc-app-shell-header--2 .wc-app-topbar__shop-icon {
	color: var(--wc-app-color-on-accent);
}

body.wc-app-shell-header--2 .wc-app-topbar__shop-icon {
	background: rgba(255, 255, 255, 0.2);
	color: var(--wc-app-color-on-accent);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

body.wc-app-shell-header--2 .wc-app-topbar__notif {
	background: rgba(255, 255, 255, 0.2);
	color: var(--wc-app-color-on-accent);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

body.wc-app-shell-header--2 .wc-app-topbar__notif:hover,
body.wc-app-shell-header--2 .wc-app-topbar__notif:focus {
	background: rgba(255, 255, 255, 0.32);
	color: var(--wc-app-color-on-accent);
}

body.wc-app-shell-header--2 .wc-app-topbar__back,
body.wc-app-shell-header--2 .wc-app-topbar__cart {
	background: rgba(255, 255, 255, 0.22);
	color: var(--wc-app-color-on-accent);
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12);
}

body.wc-app-shell-header--2 .wc-app-topbar__back:hover,
body.wc-app-shell-header--2 .wc-app-topbar__back:focus,
body.wc-app-shell-header--2 .wc-app-topbar__cart:hover,
body.wc-app-shell-header--2 .wc-app-topbar__cart:focus {
	background: rgba(255, 255, 255, 0.35);
	color: var(--wc-app-color-on-accent);
}

body.wc-app-shell-header--2 .wc-app-topbar__cart {
	--wc-app-topbar-badge-ring: var(--wc-app-color-accent);
}

body.wc-app-shell-header--2 .wc-app-topbar__badge {
	background: var(--wc-app-color-danger);
	color: #fff;
	box-shadow:
		0 0 0 2px var(--wc-app-color-accent),
		0 2px 8px rgba(0, 0, 0, 0.22);
}

/* --- Header 3 · Wireframe — airy, outline controls, uppercase title --- */
body.wc-app-shell-header--3 .wc-app-topbar.wc-app-topbar--shell-3 {
	background: transparent;
	border-bottom: none;
	box-shadow: none;
	padding-top: max(10px, env(safe-area-inset-top));
	padding-bottom: 6px;
}

body.wc-app-shell-header--3 .wc-app-topbar__inner {
	min-height: 44px;
	border-bottom: 2px dashed color-mix(in srgb, var(--wc-app-color-accent) 35%, var(--wc-app-color-border-soft));
	padding-bottom: 10px;
}

body.wc-app-shell-header--3 .wc-app-topbar__title {
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--wc-app-color-accent-pressed);
}

body.wc-app-shell-header--3 .wc-app-topbar__back,
body.wc-app-shell-header--3 .wc-app-topbar__cart {
	background: transparent;
	border: 2px solid var(--wc-app-color-accent-mid);
	color: var(--wc-app-color-accent);
	box-shadow: none;
}

body.wc-app-shell-header--3 .wc-app-topbar__back:hover,
body.wc-app-shell-header--3 .wc-app-topbar__back:focus,
body.wc-app-shell-header--3 .wc-app-topbar__cart:hover,
body.wc-app-shell-header--3 .wc-app-topbar__cart:focus {
	background: var(--wc-app-color-accent-soft-bg);
}

body.wc-app-shell-header--3 .wc-app-topbar__cart {
	--wc-app-topbar-badge-ring: var(--wc-app-color-surface);
}

body.wc-app-shell-header--3 .wc-app-topbar__badge {
	color: #fff;
	background: var(--wc-app-color-danger);
	box-shadow:
		0 0 0 2px var(--wc-app-color-surface),
		0 2px 6px rgba(15, 23, 42, 0.12);
}

body.wc-app-shell-header--3.wc-app-body.wc-app-shell .wc-app-topbar.wc-app-topbar--shell-3.wc-app-topbar--light:not(.wc-app-topbar--home) {
	background: transparent;
	box-shadow: none;
	border-bottom: none;
}

body.wc-app-shell-header--3 .wc-app-topbar__shop-icon,
body.wc-app-shell-header--3 .wc-app-topbar__notif {
	background: transparent;
	border: 2px solid var(--wc-app-color-border-strong);
	box-shadow: none;
	color: var(--wc-app-color-title);
}

/* --- Header 4 · Midnight glass — dark frosted bar, light typography --- */
body.wc-app-shell-header--4 .wc-app-topbar.wc-app-topbar--shell-4 {
	background: rgba(15, 23, 42, 0.88);
	color: #f8fafc;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
	-webkit-backdrop-filter: blur(16px) saturate(1.15);
	backdrop-filter: blur(16px) saturate(1.15);
}

body.wc-app-shell-header--4.wc-app-body.wc-app-shell .wc-app-topbar.wc-app-topbar--shell-4.wc-app-topbar--light:not(.wc-app-topbar--home) {
	background: rgba(15, 23, 42, 0.9);
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.32);
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
}

body.wc-app-shell-header--4 .wc-app-topbar__title,
body.wc-app-shell-header--4 .wc-app-topbar__location,
body.wc-app-shell-header--4 .wc-app-topbar__location-text {
	color: #f8fafc;
}

body.wc-app-shell-header--4 .wc-app-topbar__shop-icon {
	background: rgba(255, 255, 255, 0.12);
	color: #f8fafc;
	box-shadow: none;
}

body.wc-app-shell-header--4 .wc-app-topbar__notif {
	background: rgba(255, 255, 255, 0.14);
	color: #f8fafc;
	box-shadow: none;
}

body.wc-app-shell-header--4 .wc-app-topbar__notif:hover,
body.wc-app-shell-header--4 .wc-app-topbar__notif:focus {
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
}

body.wc-app-shell-header--4 .wc-app-topbar__back,
body.wc-app-shell-header--4 .wc-app-topbar__cart {
	background: rgba(255, 255, 255, 0.14);
	color: #f8fafc;
	box-shadow: none;
}

body.wc-app-shell-header--4 .wc-app-topbar__back:hover,
body.wc-app-shell-header--4 .wc-app-topbar__back:focus,
body.wc-app-shell-header--4 .wc-app-topbar__cart:hover,
body.wc-app-shell-header--4 .wc-app-topbar__cart:focus {
	background: rgba(255, 255, 255, 0.24);
	color: #fff;
}

body.wc-app-shell-header--4 .wc-app-topbar__cart {
	--wc-app-topbar-badge-ring: rgba(15, 23, 42, 0.88);
}

body.wc-app-shell-header--4 .wc-app-topbar__badge {
	background: var(--wc-app-color-danger);
	color: #fff;
	box-shadow:
		0 0 0 2px rgba(15, 23, 42, 0.88),
		0 2px 8px rgba(0, 0, 0, 0.35);
}

/* --- Header 5 · Orbit pill — strong floating capsule --- */
body.wc-app-shell-header--5 .wc-app-device {
	padding-top: 12px;
}

body.wc-app-shell-header--5 .wc-app-topbar.wc-app-topbar--shell-5 {
	margin: 0 16px;
	border-radius: var(--wc-app-radius-pill);
	border: 1px solid var(--wc-app-color-border-soft);
	background: var(--wc-app-color-surface);
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.9) inset,
		0 14px 44px rgba(15, 23, 42, 0.14),
		0 0 0 1px rgba(var(--wc-app-color-accent-rgb), 0.06);
	padding-top: max(5px, env(safe-area-inset-top));
	padding-right: 16px;
	padding-bottom: 5px;
	padding-left: 16px;
}

body.wc-app-shell-header--5.wc-app-body.wc-app-shell .wc-app-topbar.wc-app-topbar--shell-5.wc-app-topbar--light:not(.wc-app-topbar--home) {
	margin: 0 16px;
	border-radius: var(--wc-app-radius-pill);
	border-bottom: 1px solid var(--wc-app-color-border-soft);
}

body.wc-app-shell-header--5 .wc-app-topbar.wc-app-topbar--shell-5.wc-app-topbar--home {
	background: var(--wc-app-color-surface);
}

body.wc-app-shell-header--5 .wc-app-topbar__cart {
	--wc-app-topbar-badge-ring: var(--wc-app-color-surface);
}

/* --- Footer 1 · Nebula pill (default floating) — tighter glow on active --- */
body.wc-app-shell-footer--1 .wc-app-tabbar.wc-app-tabbar--footer-1.wc-app-tabbar--floating {
	background: rgba(252, 252, 253, 0.96);
	border: 1px solid color-mix(in srgb, var(--wc-app-color-accent) 18%, rgba(255, 255, 255, 0.85));
	box-shadow:
		0 4px 28px rgba(var(--wc-app-color-accent-rgb), 0.18),
		0 14px 48px rgba(15, 23, 42, 0.14);
}

body.wc-app-shell-footer--1 .wc-app-tabbar--floating .wc-app-tabbar__link.is-active {
	background: var(--wc-app-color-accent);
	box-shadow: 0 6px 22px rgba(var(--wc-app-color-accent-rgb), 0.5);
}

/* --- Footer 2 · Metro rail — tall dock + accent notch over active tab --- */
body.wc-app-shell-footer--2 .wc-app-tabbar.wc-app-tabbar--footer-2 {
	background: var(--wc-app-color-surface);
	border-top: 3px solid var(--wc-app-color-border-soft);
	box-shadow: 0 -6px 28px rgba(15, 23, 42, 0.08);
}

body.wc-app-shell-footer--2 .wc-app-tabbar__list {
	padding: 0 6px 8px;
}

body.wc-app-shell-footer--2 .wc-app-tabbar__link {
	position: relative;
	flex-direction: column;
	gap: 6px;
	padding: 12px 8px 10px;
	min-width: 56px;
	border-radius: 0;
}

body.wc-app-shell-footer--2 .wc-app-tabbar__link::before {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	width: 36px;
	height: 4px;
	border-radius: 0 0 6px 6px;
	background: var(--wc-app-color-accent);
	transform: translateX(-50%) scaleX(0);
	opacity: 0;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

body.wc-app-shell-footer--2 .wc-app-tabbar__link.is-active::before {
	transform: translateX(-50%) scaleX(1);
	opacity: 1;
}

body.wc-app-shell-footer--2 .wc-app-tabbar__link.is-active {
	background: transparent;
	color: var(--wc-app-color-accent);
}

body.wc-app-shell-footer--2 .wc-app-tabbar__icon .wc-app-fa {
	font-size: 1.42rem;
}

body.wc-app-shell-footer--2 .wc-app-tabbar__label {
	position: static;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0;
	overflow: visible;
	clip: auto;
	clip-path: none;
	border: 0;
	font-size: 0.58rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-align: center;
	max-width: 72px;
	color: inherit;
}

/* --- Footer 3 · Spotlight — icon-only row + glowing circle for active (compact) --- */
body.wc-app-shell-footer--3 .wc-app-tabbar.wc-app-tabbar--footer-3 {
	background: var(--wc-app-color-surface);
	border-top: 1px solid var(--wc-app-color-border-soft);
}

body.wc-app-shell-footer--3 .wc-app-tabbar__list {
	justify-content: space-between;
	padding: 4px 8px 6px;
}

body.wc-app-shell-footer--3 .wc-app-tabbar__link {
	position: relative;
	z-index: 0;
	min-width: 48px;
	min-height: 44px;
	padding: 6px 8px;
	justify-content: center;
	border-radius: var(--wc-app-radius-pill);
}

body.wc-app-shell-footer--3 .wc-app-tabbar__link.is-active {
	background: transparent;
	color: var(--wc-app-color-accent);
}

body.wc-app-shell-footer--3 .wc-app-tabbar__link.is-active::after {
	content: "";
	position: absolute;
	inset: 3px 5px;
	border-radius: var(--wc-app-radius-pill);
	background: color-mix(in srgb, var(--wc-app-color-accent) 20%, transparent);
	z-index: -1;
}

body.wc-app-shell-footer--3 .wc-app-tabbar__icon {
	width: 24px;
	height: 24px;
}

body.wc-app-shell-footer--3 .wc-app-tabbar__icon .wc-app-fa {
	font-size: 1.28rem;
}

body.wc-app-shell-footer--3 .wc-app-tabbar__label {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* --- Footer 4 · Harbor shelf — full-width lifted panel (not a narrow chip) --- */
body.wc-app-shell-footer--4 .wc-app-tabbar.wc-app-tabbar--footer-4 {
	left: 0;
	right: 0;
	transform: none;
	width: 100%;
	max-width: 410px;
	margin: 0 auto;
	bottom: 0;
	padding: 14px 12px calc(14px + env(safe-area-inset-bottom));
	border: none;
	border-top: 1px solid var(--wc-app-color-border-soft);
	border-radius: 22px 22px 0 0;
	background: var(--wc-app-color-well);
	box-shadow:
		0 -10px 40px rgba(15, 23, 42, 0.12),
		0 -1px 0 rgba(255, 255, 255, 0.7) inset;
}

body.wc-app-shell-footer--4 .wc-app-tabbar__list {
	padding: 0 8px;
	gap: 8px;
}

body.wc-app-shell-footer--4 .wc-app-tabbar__link {
	padding: 10px 12px;
	border-radius: 14px;
	color: var(--wc-app-color-footer4-tab-muted, var(--wc-app-color-muted));
}

body.wc-app-shell-footer--4 .wc-app-tabbar__link:hover,
body.wc-app-shell-footer--4 .wc-app-tabbar__link:focus {
	color: var(--wc-app-color-footer4-tab, var(--wc-app-color-accent));
	background: rgba(255, 255, 255, 0.08);
}

body.wc-app-shell-footer--4 .wc-app-tabbar__link.is-active {
	background: var(--wc-app-color-surface);
	color: var(--wc-app-color-footer4-tab-active, var(--wc-app-color-accent));
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
}

body.wc-app-shell-footer--4 .wc-app-tabbar__icon {
	opacity: 1;
	color: inherit;
}

body.wc-app-shell-footer--4 .wc-app-tabbar__label {
	position: static;
	width: auto;
	height: auto;
	margin: 5px 0 0;
	padding: 0;
	overflow: visible;
	clip: auto;
	clip-path: none;
	border: 0;
	font-size: 0.6rem;
	font-weight: 600;
	text-align: center;
	max-width: 70px;
}

/* --- Footer 5 · Segmented tray — molded inset control --- */
body.wc-app-shell-footer--5 .wc-app-tabbar.wc-app-tabbar--footer-5 {
	background: var(--wc-app-color-well-alt);
	border-top: 1px solid var(--wc-app-color-border-soft);
	box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.06);
	padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
}

body.wc-app-shell-footer--5 .wc-app-tabbar__list {
	margin: 0 4px;
	padding: 5px;
	border-radius: 16px;
	background: color-mix(in srgb, var(--wc-app-color-title) 7%, var(--wc-app-color-surface));
	box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.08);
	gap: 4px;
	justify-content: flex-start;
}

body.wc-app-shell-footer--5 .wc-app-tabbar.wc-app-tabbar--footer-5 .wc-app-tabbar__list > li {
	flex: 1 1 0;
	min-width: 0;
}

body.wc-app-shell-footer--5 .wc-app-tabbar__link {
	flex-direction: column;
	gap: 4px;
	margin: 0;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	padding: 10px 6px;
	border-radius: 12px;
	background: transparent;
	color: var(--wc-app-color-muted);
	font-size: 0.58rem;
	font-weight: 600;
}

body.wc-app-shell-footer--5 .wc-app-tabbar__link.is-active {
	background: var(--wc-app-color-surface);
	color: var(--wc-app-color-accent);
	box-shadow:
		0 2px 8px rgba(15, 23, 42, 0.08),
		0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

body.wc-app-shell-footer--5 .wc-app-tabbar__icon .wc-app-fa {
	font-size: 1.22rem;
}

body.wc-app-shell-footer--5 .wc-app-tabbar__label {
	position: static;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0;
	overflow: visible;
	clip: auto;
	clip-path: none;
	border: 0;
	text-align: center;
	max-width: none;
	line-height: 1.2;
	color: inherit;
}

/* Sticky header: header presets may use gradients/transparency — force theme surface over scrolling .wc-app-device */
body.wc-app-shell-header-sticky.wc-app-body.wc-app-shell .wc-app-topbar {
	background: var(--wc-app-color-surface) !important;
}
