/* =============================================================
   Aquareader — Mobile Bottom Navigation Bar
   Visible only on ≤768 px. Hidden on desktop. Not rendered on
   reader pages (functions.php skips it there).
   ============================================================= */

/* ── Bottom clearance so page content isn't hidden behind the bar ── */
@media (max-width: 768px) {
	body:not(.aqua-reader-page) {
		padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
	}
}

/* ── Floating pill nav (UTOON-style) ────────────────────────── */
/* ── Bottom clearance so page content isn't hidden behind the bar ── */
@media (max-width: 768px) {
	body:not(.aqua-reader-page) {
		padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
	}
}

/* ── Full-width bar floating above the gesture area ─────────── */
.aqua-mobile-nav {
	display: none; /* shown via media query below */
	position: fixed;
	bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
	left: 10px;
	right: 10px;
	z-index: 900;
	height: 60px;
	background: rgba(12, 12, 14, 0.82);
	backdrop-filter: blur(16px) saturate(150%);
	-webkit-backdrop-filter: blur(16px) saturate(150%);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 20px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
	flex-direction: row;
	align-items: stretch;
	justify-content: space-around;
	/* Auto-hide animation */
	transform: translateY(0);
	transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
}
.aqua-mobile-nav.is-hidden {
	transform: translateY(calc(100% + 12px));
}

@media (max-width: 768px) {
	.aqua-mobile-nav { display: flex; }
}

/* ── Individual tab ─────────────────────────────────────────── */
.aqua-mobile-nav__item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	position: relative;
	color: rgba(255, 255, 255, 0.45);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-decoration: none !important;
	-webkit-tap-highlight-color: transparent;
	padding: 8px 0 6px;
	transition: color 0.15s;
}

.aqua-mobile-nav__item:hover,
.aqua-mobile-nav__item.is-active {
	color: #48CAE4;
	text-decoration: none !important;
}

.aqua-mobile-nav__item.is-active .aqua-mobile-nav__icon {
	stroke: #48CAE4;
	filter: drop-shadow(0 0 6px rgba(72, 202, 228, 0.7));
}

/* Cyan glow under the active icon */
.aqua-mobile-nav__item.is-active::before {
	content: '';
	position: absolute;
	top: 4px;
	left: 50%;
	transform: translateX(-50%);
	width: 38px;
	height: 28px;
	background: radial-gradient(ellipse at center, rgba(72, 202, 228, 0.35) 0%, rgba(72, 202, 228, 0) 70%);
	border-radius: 50%;
	pointer-events: none;
	z-index: 0;
}
.aqua-mobile-nav__icon,
.aqua-mobile-nav__label {
	position: relative;
	z-index: 1;
}

.aqua-mobile-nav__label {
	display: block;
	line-height: 1;
	margin-top: 1px;
}

/* ── Ensure site footer clears the bar on mobile ────────────── */
@media (max-width: 768px) {
	body:not(.aqua-reader-page) .c-footer,
	body:not(.aqua-reader-page) footer.site-footer {
		margin-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
	}
}
