/*!
 * Mobile Nav Bar By Helal - front-end styles
 * Copyright (c) Helal
 */

.mnbh,
.mnbh * {
	box-sizing: border-box;
}

.mnbh {
	position: fixed;
	left: 0;
	right: 0;
	bottom: calc(var(--mnbh-bottom, 14px) + env(safe-area-inset-bottom, 0px));
	width: calc(100% - (var(--mnbh-side, 14px) * 2));
	max-width: var(--mnbh-maxw, 520px);
	margin: 0 auto;
	z-index: var(--mnbh-z, 9999);
	font-family: inherit;
	line-height: 1.2;
	-webkit-text-size-adjust: 100%;
	transition: transform .45s cubic-bezier(.4, 0, .2, 1), opacity .3s ease;
}

.mnbh.is-hidden {
	transform: translateY(calc(100% + var(--mnbh-bottom, 14px) + 70px));
	opacity: 0;
}

.mnbh--layout-full {
	bottom: 0;
	width: 100%;
	max-width: none;
}

.mnbh__bar {
	position: relative;
	height: var(--mnbh-height, 66px);
}

.mnbh__bg {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	border-radius: var(--mnbh-radius, 30px);
	background: var(--mnbh-bg);
	-webkit-backdrop-filter: blur(var(--mnbh-blur, 16px)) saturate(170%);
	backdrop-filter: blur(var(--mnbh-blur, 16px)) saturate(170%);
	border: var(--mnbh-bw, 1px) solid var(--mnbh-border);
	box-shadow: var(--mnbh-shadow);
	pointer-events: none;
}

.mnbh--layout-full .mnbh__bg {
	bottom: calc(-1 * env(safe-area-inset-bottom, 0px));
	border-bottom: 0;
}

.mnbh__list {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: stretch;
	height: 100%;
	margin: 0 !important;
	padding: 0 6px !important;
	list-style: none !important;
}

.mnbh__item {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.mnbh__item::before,
.mnbh__item::marker {
	content: none;
}

/* ---------- Links ---------- */
.mnbh__link {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 0 2px;
	color: var(--mnbh-color);
	text-decoration: none !important;
	border: 0;
	background: none;
	box-shadow: none !important;
	outline: 0;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	-webkit-user-select: none;
	user-select: none;
	transition: color .25s ease;
}

.mnbh__item:not(.is-center) .mnbh__link {
	overflow: hidden;
	border-radius: min(var(--mnbh-r, 30px), 22px);
}

.mnbh__link:focus-visible {
	outline: 2px solid var(--mnbh-active);
	outline-offset: -3px;
}

.mnbh__item.is-active .mnbh__link {
	color: var(--mnbh-active);
}

/* ---------- Icon ---------- */
.mnbh__icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: var(--mnbh-icon, 22px);
	height: var(--mnbh-icon, 22px);
	transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), scale .2s ease;
}

.mnbh__icon svg {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-width: var(--mnbh-stroke, 1.8);
	stroke-linecap: round;
	stroke-linejoin: round;
	overflow: visible;
	transition: filter .3s ease;
}

.mnbh__icon img {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.mnbh__emoji {
	position: relative;
	z-index: 1;
	font-size: calc(var(--mnbh-icon, 22px) * .95);
	line-height: 1;
}

/* ---------- Label ---------- */
.mnbh__label {
	position: relative;
	z-index: 1;
	max-width: 100%;
	max-height: 20px;
	margin-top: 4px;
	overflow: hidden;
	font-size: var(--mnbh-lsize, 11px);
	font-weight: var(--mnbh-lweight, 600);
	letter-spacing: .2px;
	line-height: 1.15;
	text-overflow: ellipsis;
	white-space: nowrap;
	transition: opacity .25s ease, max-height .3s ease, margin .3s ease;
}

.mnbh--labels-none .mnbh__item:not(.is-center) .mnbh__label,
.mnbh__item.is-center:not(.has-clabel) .mnbh__label {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.mnbh--labels-active .mnbh__item:not(.is-active):not(.is-center) .mnbh__label {
	max-height: 0;
	margin-top: 0;
	opacity: 0;
}

/* ---------- Badge ---------- */
.mnbh__badge {
	position: absolute;
	top: -6px;
	right: -11px;
	z-index: 3;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 99px;
	background: var(--mnbh-badge-bg, #ef4444);
	color: var(--mnbh-badge-c, #fff);
	font-size: 10px;
	font-weight: 700;
	line-height: 16px;
	text-align: center;
}

.mnbh__badge.is-empty {
	display: none;
}

/* ---------- Active styles ---------- */
.mnbh--active-pill .mnbh__item.is-active:not(.is-center) .mnbh__link::before {
	content: '';
	position: absolute;
	z-index: 0;
	top: 8px;
	bottom: 8px;
	left: 5px;
	right: 5px;
	border-radius: min(var(--mnbh-r, 30px), 20px);
	background: var(--mnbh-active-bg);
	animation: mnbh-pill .35s cubic-bezier(.34, 1.56, .64, 1);
}

.mnbh--active-dot .mnbh__item.is-active:not(.is-center) .mnbh__link::after {
	content: '';
	position: absolute;
	bottom: 5px;
	left: 50%;
	width: 5px;
	height: 5px;
	margin-left: -2.5px;
	border-radius: 50%;
	background: var(--mnbh-active);
	animation: mnbh-pill .35s cubic-bezier(.34, 1.56, .64, 1);
}

.mnbh--active-line .mnbh__item.is-active:not(.is-center) .mnbh__link::after {
	content: '';
	position: absolute;
	top: 0;
	left: 50%;
	width: 24px;
	height: 3px;
	margin-left: -12px;
	border-radius: 0 0 4px 4px;
	background: var(--mnbh-active);
	box-shadow: 0 2px 10px var(--mnbh-active);
	animation: mnbh-line .35s ease;
}

.mnbh--active-glow .mnbh__item.is-active:not(.is-center) .mnbh__icon svg {
	filter: drop-shadow(0 0 7px var(--mnbh-active));
}

@keyframes mnbh-pill {
	from { opacity: 0; transform: scale(.6); }
	to   { opacity: 1; transform: scale(1); }
}

@keyframes mnbh-line {
	from { opacity: 0; transform: scaleX(.2); }
	to   { opacity: 1; transform: scaleX(1); }
}

/* ---------- Highlighted (center) button ---------- */
.mnbh__item.is-center .mnbh__link {
	overflow: visible;
}

.mnbh__item.is-center .mnbh__icon {
	position: absolute;
	top: calc(var(--mnbh-c-raise, 24px) * -1);
	left: 0;
	right: 0;
	width: var(--mnbh-c-size, 60px);
	height: var(--mnbh-c-size, 60px);
	margin: 0 auto;
	color: var(--mnbh-c-icon, #fff);
}

.mnbh__item.is-center .mnbh__icon svg,
.mnbh__item.is-center .mnbh__icon img {
	width: var(--mnbh-c-isize, 26px);
	height: var(--mnbh-c-isize, 26px);
}

.mnbh__item.is-center .mnbh__emoji {
	font-size: var(--mnbh-c-isize, 26px);
}

.mnbh__item.is-center .mnbh__icon::before,
.mnbh__item.is-center .mnbh__icon::after {
	content: '';
	position: absolute;
	z-index: 0;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	border-radius: 50%;
	pointer-events: none;
}

.mnbh__item.is-center .mnbh__icon::before {
	background: var(--mnbh-c-bg);
	box-shadow: var(--mnbh-c-shadow);
}

.mnbh__item.is-center .mnbh__icon::after {
	opacity: 0;
}

.mnbh__item.is-center .mnbh__label {
	position: absolute;
	left: 0;
	right: 0;
	bottom: calc(var(--mnbh-height, 66px) * .13);
	margin: 0;
	text-align: center;
}

/* shapes */
.mnbh--shape-squircle .mnbh__item.is-center .mnbh__icon::before,
.mnbh--shape-squircle .mnbh__item.is-center .mnbh__icon::after { border-radius: 34%; }

.mnbh--shape-square .mnbh__item.is-center .mnbh__icon::before,
.mnbh--shape-square .mnbh__item.is-center .mnbh__icon::after { border-radius: 16px; }

.mnbh--shape-pill .mnbh__item.is-center .mnbh__icon {
	width: calc(var(--mnbh-c-size, 60px) * 1.55);
	height: calc(var(--mnbh-c-size, 60px) * .78);
}

.mnbh--shape-pill .mnbh__item.is-center .mnbh__icon::before,
.mnbh--shape-pill .mnbh__item.is-center .mnbh__icon::after { border-radius: 999px; }

.mnbh--shape-diamond .mnbh__item.is-center .mnbh__icon::before,
.mnbh--shape-diamond .mnbh__item.is-center .mnbh__icon::after {
	top: 13%;
	left: 13%;
	right: 13%;
	bottom: 13%;
	border-radius: 22%;
	transform: rotate(45deg);
}

/* highlighted button animations */
.mnbh--canim-float .mnbh__item.is-center .mnbh__icon { animation: mnbh-float 2.6s ease-in-out infinite; }
.mnbh--canim-bounce .mnbh__item.is-center .mnbh__icon { animation: mnbh-cbounce 1.9s ease-in-out infinite; }

.mnbh--canim-pulse .mnbh__item.is-center .mnbh__icon::after {
	background: none;
	border: 2px solid var(--mnbh-c-glowc);
	animation: mnbh-pulse 1.9s ease-out infinite;
}

.mnbh--canim-glow .mnbh__item.is-center .mnbh__icon::before { animation: mnbh-glow 2.4s ease-in-out infinite; }

.mnbh--canim-ring .mnbh__item.is-center .mnbh__icon::after {
	top: -5px;
	left: -5px;
	right: -5px;
	bottom: -5px;
	opacity: 1;
	background: conic-gradient(from 0deg, transparent 0 55%, var(--mnbh-c-glowc) 100%);
	-webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
	mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
	animation: mnbh-spin 2.2s linear infinite;
}

@keyframes mnbh-float {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-6px); }
}

@keyframes mnbh-cbounce {
	0%, 100% { transform: translateY(0); }
	20%      { transform: translateY(-10px); }
	40%      { transform: translateY(0); }
	55%      { transform: translateY(-4px); }
	70%      { transform: translateY(0); }
}

@keyframes mnbh-pulse {
	0%   { opacity: .8; scale: 1; }
	100% { opacity: 0; scale: 1.6; }
}

@keyframes mnbh-glow {
	0%, 100% { box-shadow: var(--mnbh-c-ring), 0 8px 18px var(--mnbh-c-glow-a); }
	50%      { box-shadow: var(--mnbh-c-ring), 0 10px 40px var(--mnbh-c-glow-b); }
}

@keyframes mnbh-spin {
	to { rotate: 360deg; }
}

/* ---------- Active icon animations ---------- */
.mnbh--aicon-bounce .mnbh__item.is-active:not(.is-center) .mnbh__icon { animation: mnbh-a-bounce .7s cubic-bezier(.34, 1.56, .64, 1); }
.mnbh--aicon-pop .mnbh__item.is-active:not(.is-center) .mnbh__icon    { animation: mnbh-a-pop .5s cubic-bezier(.34, 1.56, .64, 1); }
.mnbh--aicon-wiggle .mnbh__item.is-active:not(.is-center) .mnbh__icon { animation: mnbh-a-wiggle .7s ease; }
.mnbh--aicon-spin .mnbh__item.is-active:not(.is-center) .mnbh__icon   { animation: mnbh-a-spin .6s ease; }

@keyframes mnbh-a-bounce {
	0%   { transform: translateY(8px) scale(.8); }
	50%  { transform: translateY(-5px) scale(1.12); }
	100% { transform: none; }
}

@keyframes mnbh-a-pop {
	0%   { transform: scale(.5); }
	60%  { transform: scale(1.25); }
	100% { transform: scale(1); }
}

@keyframes mnbh-a-wiggle {
	0%, 100% { transform: rotate(0); }
	20% { transform: rotate(-14deg); }
	40% { transform: rotate(12deg); }
	60% { transform: rotate(-8deg); }
	80% { transform: rotate(5deg); }
}

@keyframes mnbh-a-spin {
	to { transform: rotate(360deg); }
}

/* ---------- Tap effects ---------- */
.mnbh__ripple {
	position: absolute;
	z-index: 0;
	width: 10px;
	height: 10px;
	margin: -5px 0 0 -5px;
	border-radius: 50%;
	background: currentColor;
	opacity: .22;
	pointer-events: none;
	transform: scale(0);
	animation: mnbh-ripple .6s ease-out forwards;
}

.mnbh__ripple--c {
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	background: transparent;
	border: 2px solid currentColor;
	opacity: .6;
	transform: none;
	animation: mnbh-cripple .55s ease-out forwards;
}

@keyframes mnbh-ripple {
	to { transform: scale(14); opacity: 0; }
}

@keyframes mnbh-cripple {
	from { transform: scale(1); opacity: .6; }
	to   { transform: scale(1.7); opacity: 0; }
}

.mnbh--tap-press .mnbh__link:active .mnbh__icon { scale: .84; }

/* ---------- Entry animations ---------- */
.mnbh--entry-slide_up .mnbh__bar { animation: mnbh-e-slide var(--mnbh-dur, 700ms) cubic-bezier(.22, 1.2, .36, 1) .1s backwards; }
.mnbh--entry-fade .mnbh__bar     { animation: mnbh-e-fade var(--mnbh-dur, 700ms) ease .1s backwards; }
.mnbh--entry-zoom .mnbh__bar     { animation: mnbh-e-zoom var(--mnbh-dur, 700ms) cubic-bezier(.22, 1.2, .36, 1) .1s backwards; }
.mnbh--entry-bounce .mnbh__bar   { animation: mnbh-e-bounce var(--mnbh-dur, 700ms) ease .1s backwards; }

@keyframes mnbh-e-slide {
	from { transform: translateY(150%); opacity: 0; }
	to   { transform: none; opacity: 1; }
}

@keyframes mnbh-e-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes mnbh-e-zoom {
	from { transform: scale(.6); opacity: 0; }
	to   { transform: none; opacity: 1; }
}

@keyframes mnbh-e-bounce {
	0%   { transform: translateY(170%); opacity: 0; }
	55%  { transform: translateY(-14%); opacity: 1; }
	75%  { transform: translateY(6%); }
	90%  { transform: translateY(-3%); }
	100% { transform: none; }
}

/* ---------- Admin live preview ---------- */
.mnbh.mnbh--preview {
	position: absolute;
	bottom: var(--mnbh-bottom, 14px);
	transition: none;
}

.mnbh--preview.mnbh--layout-full { bottom: 0; }
.mnbh--preview .mnbh__bg { bottom: 0 !important; }
.mnbh--static .mnbh__bar { animation: none !important; }

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
	.mnbh *,
	.mnbh *::before,
	.mnbh *::after {
		animation: none !important;
		transition: none !important;
	}
}
