/* ============================================================
   AMIR SUITE — Mobile Nav Bar
   ============================================================ */

@property --nm-border-angle {
	syntax: '<angle>';
	initial-value: 0deg;
	inherits: false;
}

@keyframes nm-spin {
	to { --nm-border-angle: 360deg; }
}

/* ---- Bar ---- */
.as-nm-bar {
	--nm-bc1: #4ee08a;
	--nm-bc2: #60a5fa;
	--nm-spin-speed: 4s;
	--nm-h: 64px;
	--nm-h-small: 50px;

	display: block;
	width: 100%;
	background-color: #0d1117;
	transition: transform .35s cubic-bezier(.4,0,.2,1),
	            height .35s cubic-bezier(.4,0,.2,1),
	            padding .35s cubic-bezier(.4,0,.2,1),
	            opacity .3s ease;
}

/* Glass */
.as-nm-bar.bg-glass {
	background-color: rgba(13,17,23,0.82) !important;
	backdrop-filter: blur(18px) saturate(1.6);
	-webkit-backdrop-filter: blur(18px) saturate(1.6);
}

/* Fixed bottom */
.as-nm-bar.is-sticky {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 9998;
}

/* Hide on desktop */
@media (min-width: 1025px) {
	.as-nm-bar.hide-desktop { display: none !important; }
}

/* ---- Gradient border (top edge) ---- */
.as-nm-bar.has-grad-border::before {
	content: '';
	position: absolute;
	top: -2px; left: 0; right: 0;
	height: 2px;
	background: linear-gradient(
		90deg,
		var(--nm-bc1), var(--nm-bc2), var(--nm-bc1)
	);
	border-radius: inherit;
}

.as-nm-bar.has-grad-border.border-spinning::before {
	background: conic-gradient(
		from var(--nm-border-angle),
		var(--nm-bc1), var(--nm-bc2), var(--nm-bc1)
	);
	background-size: 200% 100%;
	animation: nm-spin var(--nm-spin-speed) linear infinite;
}

/* Glow under top border */
.as-nm-bar.has-grad-border::after {
	content: '';
	position: absolute;
	top: -4px; left: 5%; right: 5%;
	height: 6px;
	background: linear-gradient(90deg, var(--nm-bc1), var(--nm-bc2), var(--nm-bc1));
	filter: blur(8px);
	opacity: 0.55;
	border-radius: 50%;
	animation: inherit;
}

/* ---- Shrink state ---- */
.as-nm-bar.can-shrink.is-shrunk .as-nm-inner {
	padding-top: 6px;
	padding-bottom: 6px;
}

.as-nm-bar.can-shrink.is-shrunk .as-nm-label {
	opacity: 0;
	max-height: 0;
	overflow: hidden;
	margin-top: 0;
}

.as-nm-bar.can-shrink.is-shrunk .as-nm-icon {
	transform: scale(0.88);
}

/* ---- Inner ---- */
.as-nm-inner {
	display: flex;
	align-items: center;
	justify-content: space-around;
	padding: 10px 16px;
	gap: 4px;
	transition: padding .3s ease;
}

/* ---- Buttons ---- */
.as-nm-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	flex: 1;
	text-decoration: none;
	color: rgba(240,246,252,0.6);
	padding: 6px 8px;
	border-radius: 12px;
	transition: color .2s ease,
	            background-color .2s ease,
	            transform .2s cubic-bezier(.34,1.56,.64,1);
	position: relative;
	min-width: 0;
}

.as-nm-btn:hover {
	background-color: rgba(255,255,255,0.06);
	color: #f0f6fc;
	transform: translateY(-2px);
}

.as-nm-btn:active { transform: scale(0.93); }

/* Active state */
.as-nm-btn.is-active { color: #4ee08a; }
.as-nm-btn.is-active { color: var(--nm-item-active, #4ee08a); }

/* Active indicator dot */
.as-nm-btn.is-active::after {
	content: '';
	position: absolute;
	bottom: 2px;
	left: 50%; transform: translateX(-50%);
	width: 4px; height: 4px;
	border-radius: 50%;
	background: currentColor;
}

/* ---- Icon wrap ---- */
.as-nm-icon-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.as-nm-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}

.as-nm-btn:hover .as-nm-icon { transform: scale(1.15); }
.as-nm-btn.is-active .as-nm-icon { transform: scale(1.1); }

/* ---- Label ---- */
.as-nm-label {
	font-size: 11px;
	font-weight: 500;
	color: rgba(240,246,252,0.5);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 60px;
	max-height: 20px;
	transition: opacity .25s ease, max-height .25s ease, margin .25s ease;
	line-height: 1.2;
}

.as-nm-btn.is-active .as-nm-label { color: #4ee08a; color: var(--nm-item-active, #4ee08a); }

/* ---- Badge ---- */
.as-nm-badge {
	position: absolute;
	top: -5px; right: -6px;
	min-width: 16px; height: 16px;
	background-color: #f43f5e;
	color: #fff;
	font-size: 9px;
	font-weight: 700;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 3px;
	line-height: 1;
	border: 1.5px solid rgba(13,17,23,0.8);
}

/* RTL adjustments */
.as-nm-bar[dir="rtl"] .as-nm-inner { flex-direction: row-reverse; }
.as-nm-bar[dir="rtl"] .as-nm-badge { right: auto; left: -6px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.as-nm-bar, .as-nm-btn, .as-nm-icon, .as-nm-label { transition: none !important; animation: none !important; }
}
