/*
App-style fixed bottom nav, shown only below 1024px (footer.php, gated on
WooCommerce being active) -- four tabs: home, products, cart, profile.
Mirrors the tab-bar pattern of a native shopping app rather than a normal
in-flow site footer element.
*/

.app-bottom-nav {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 80;
	display: flex;
	background: var(--color-bg);
	border-top: 2px solid var(--color-border);
	box-shadow: var(--shadow-sm);
	/* Room for the home-indicator area on notched phones -- the bar's
	   content stays pinned to --bottom-nav-h, this just pads underneath it. */
	padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (min-width: 1024px) {
	.app-bottom-nav {
		display: none;
	}
}

.app-bottom-nav__item {
	position: relative;
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	min-height: var(--bottom-nav-h);
	color: var(--color-muted);
	font-size: 11px;
	font-weight: var(--font-medium);
}

.app-bottom-nav__item.is-active {
	color: var(--color-primary);
}

.app-bottom-nav__item .icon {
	width: 22px;
	height: 22px;
}

.app-bottom-nav__icon-img {
	display: block;
	width: 22px;
	height: 22px;
	border-radius: 5px;
}

.app-bottom-nav__label-img {
	display: block;
	width: 40px;
	height: 11px;
}

.app-bottom-nav__badge {
	position: absolute;
	top: 2px;
	inset-inline-start: calc(50% + 6px);
	min-width: 16px;
	height: 16px;
	padding-inline: 4px;
	border-radius: var(--radius-full);
	background: var(--color-sale);
	color: #fff;
	font-size: 10px;
	font-weight: var(--font-semibold);
	line-height: 16px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

/* Room at the bottom of every page so normal content and the site footer
   never end up underneath the fixed nav. */
@media (max-width: 1023.98px) {
	body {
		padding-block-end: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
	}
}
