/*
 * App-shelf bottom navigation dock.
 *
 * Same markup and behavior as the 2025 dock (inc/bottom-nav.php). The rainbow
 * edge and pink/yellow tape labels are replaced by a frosted Basement shelf,
 * Archivo labels, Aetheryte hover, and a single Lamplight "power light" on the
 * current item, a nod to the amber focal point in every brand graphic.
 */

:root {
	--mc-dock-height: 68px;
	--mc-dock-ink: var(--wp--preset--color--secondary, #efe8df);
	--mc-dock-muted: var(--wp--preset--color--haze, #8d9aa8);
	--mc-dock-hot: var(--wp--preset--color--lamplight, #f59d46);
	--mc-dock-cool: var(--wp--preset--color--aetheryte, #63bfe1);
	--mc-dock-line: var(--wp--custom--hairline, rgba(141, 154, 168, 0.18));
}

html {
	scroll-padding-bottom: calc(var(--mc-dock-height) + 1rem);
}

.mc-dock {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1000;
	padding-bottom: env(safe-area-inset-bottom, 0px);
	pointer-events: none;
}

.mc-dock__bg {
	position: absolute;
	inset: 0;
}

.mc-dock__surface {
	position: absolute;
	inset: 0;
	display: block;
	background-color: rgba(12, 16, 21, 0.94);
	box-shadow: 0 -12px 32px rgba(5, 8, 12, 0.45);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
	.mc-dock__surface {
		background-color: rgba(12, 16, 21, 0.78);
		-webkit-backdrop-filter: blur(16px) saturate(1.2);
		backdrop-filter: blur(16px) saturate(1.2);
	}
}

/* Hairline on the top edge, warming toward the center like a lamp behind it. */
.mc-dock__edge {
	position: absolute;
	inset: 0 0 auto 0;
	display: block;
	height: 1px;
	background-image: linear-gradient(
		90deg,
		var(--mc-dock-line) 0%,
		rgba(99, 191, 225, 0.35) 30%,
		rgba(245, 157, 70, 0.45) 50%,
		rgba(99, 191, 225, 0.35) 70%,
		var(--mc-dock-line) 100%
	);
}

.mc-dock .mc-dock__list {
	position: relative;
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	gap: 2px;
	height: var(--mc-dock-height);
	max-width: 560px;
	margin: 0 auto;
	padding: 0 max(6px, env(safe-area-inset-right, 0px)) 0 max(6px, env(safe-area-inset-left, 0px));
	list-style: none;
	pointer-events: auto;
}

.mc-dock .mc-dock__item {
	display: flex;
	flex: 1 1 0;
	margin: 0;
	padding: 0;
}

.mc-dock .mc-dock__link {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 6px 2px;
	color: var(--mc-dock-muted);
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
}

/* The power light: hidden until the item is current. */
.mc-dock .mc-dock__link::before {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	width: 22px;
	height: 2px;
	border-radius: 0 0 2px 2px;
	background-color: var(--mc-dock-hot);
	box-shadow: 0 0 10px 1px rgba(245, 157, 70, 0.65);
	opacity: 0;
	transform: translateX(-50%) scaleX(0.4);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.mc-dock .mc-dock__icon {
	display: grid;
	place-items: center;
	width: 30px;
	height: 26px;
	color: inherit;
	transition: color 0.16s ease, transform 0.16s ease;
}

.mc-dock .mc-dock__glyph {
	display: block;
	width: 22px;
	height: 22px;
}

.mc-dock .mc-dock__label {
	display: block;
	font-family: var(--wp--preset--font-family--body, "Archivo", sans-serif);
	font-size: 10.5px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	white-space: nowrap;
	color: inherit;
	transition: color 0.16s ease;
}

.mc-dock .mc-dock__link.is-current {
	color: var(--mc-dock-ink);
}

.mc-dock .mc-dock__link.is-current::before {
	opacity: 1;
	transform: translateX(-50%) scaleX(1);
}

.mc-dock .mc-dock__link.is-current .mc-dock__icon {
	color: var(--mc-dock-hot);
}

@media (hover: hover) {
	.mc-dock .mc-dock__link:hover {
		color: var(--mc-dock-cool);
	}

	.mc-dock .mc-dock__link:hover .mc-dock__icon {
		transform: translateY(-2px);
	}

	.mc-dock .mc-dock__link.is-current:hover .mc-dock__icon {
		color: var(--mc-dock-hot);
	}
}

.mc-dock .mc-dock__link:focus-visible {
	outline: 2px solid var(--mc-dock-cool);
	outline-offset: -4px;
	border-radius: 6px;
}

.mc-dock .mc-dock__link:active .mc-dock__icon {
	transform: translateY(0) scale(0.92);
}

@media (min-width: 800px) {
	:root {
		--mc-dock-height: 76px;
	}

	.mc-dock .mc-dock__list {
		gap: 10px;
		max-width: 640px;
	}

	.mc-dock .mc-dock__icon {
		width: 40px;
		height: 32px;
	}

	.mc-dock .mc-dock__glyph {
		width: 28px;
		height: 28px;
	}

	.mc-dock .mc-dock__label {
		font-size: 11.5px;
	}
}

@media (max-width: 380px) {
	.mc-dock .mc-dock__glyph {
		width: 20px;
		height: 20px;
	}

	.mc-dock .mc-dock__label {
		font-size: 9.5px;
		letter-spacing: 0.1em;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mc-dock .mc-dock__link::before,
	.mc-dock .mc-dock__icon,
	.mc-dock .mc-dock__label {
		transition: none;
	}

	.mc-dock .mc-dock__link:hover .mc-dock__icon,
	.mc-dock .mc-dock__link:active .mc-dock__icon {
		transform: none;
	}
}

@media print {
	.mc-dock {
		display: none;
	}
}
