/* نوار پایین موبایل ایموگیفت */
.imo-bnav {
	--imo-bnav-h: 60px;
	--imo-bnav-radius: 30px;
	--imo-bnav-pad-x: 6px;
	--imo-bnav-bottom: 12px;
	--imo-bnav-side: 12px;
	--imo-bnav-gap: 10px;
	--imo-bnav-maxw: 560px;
	--imo-bnav-bg: #fff;
	--imo-bnav-color: #3f4152;
	--imo-bnav-active: #111827;
	--imo-bnav-active-icon: #fff;
	--imo-bnav-active-bg: #111827;
	--imo-bnav-active-size: 44px;
	--imo-bnav-icon: 24px;
	--imo-bnav-badge-bg: #ef394e;
	--imo-bnav-badge-color: #fff;
	--imo-bnav-chat-size: 60px;
	--imo-bnav-chat-icon: 26px;
	--imo-bnav-chat-bg: #4f6bff;
	--imo-bnav-chat-color: #fff;
	--imo-bnav-chat-radius: 50%;

	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 9990;
	box-sizing: border-box;
	margin: 0;
	padding: 0 var(--imo-bnav-side) calc(var(--imo-bnav-bottom) + env(safe-area-inset-bottom, 0px));
	font-family: inherit;
	line-height: 1.2;
	pointer-events: none;
	transition: transform .25s ease, opacity .25s ease;
}

.imo-bnav *,
.imo-bnav *::before,
.imo-bnav *::after {
	box-sizing: border-box;
}

.imo-bnav.is-typing {
	transform: translateY(130%);
	opacity: 0;
}

.imo-bnav .imo-bnav__inner {
	display: flex;
	align-items: center;
	gap: var(--imo-bnav-gap);
	max-width: var(--imo-bnav-maxw);
	margin: 0 auto;
}

/* ── نوار ── */
.imo-bnav ul.imo-bnav__bar {
	display: flex;
	flex: 1 1 auto;
	order: 1;
	align-items: center;
	justify-content: space-around;
	min-width: 0;
	height: var(--imo-bnav-h);
	margin: 0;
	padding: 0 var(--imo-bnav-pad-x);
	list-style: none;
	background: var(--imo-bnav-bg);
	border: 1px solid rgba(17, 24, 39, .06);
	border-radius: var(--imo-bnav-radius);
	box-shadow: 0 8px 28px rgba(17, 24, 39, .14);
	pointer-events: auto;
}

.imo-bnav li.imo-bnav__item {
	display: flex;
	flex: 1 1 0;
	justify-content: center;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.imo-bnav li.imo-bnav__item::before,
.imo-bnav li.imo-bnav__item::marker {
	content: none;
}

nav.imo-bnav a.imo-bnav__link,
nav.imo-bnav a.imo-bnav__link:hover,
nav.imo-bnav a.imo-bnav__link:focus,
nav.imo-bnav a.imo-bnav__link:visited {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	min-width: 44px;
	min-height: 44px;
	color: var(--imo-bnav-color);
	text-decoration: none;
	background: none;
	box-shadow: none;
	-webkit-tap-highlight-color: transparent;
}

.imo-bnav .imo-bnav__icon {
	position: relative;
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: var(--imo-bnav-active-size);
	height: var(--imo-bnav-active-size);
	border-radius: 50%;
	transition: background-color .2s ease, color .2s ease;
}

.imo-bnav--labels .imo-bnav__icon {
	width: calc(var(--imo-bnav-icon) + 16px);
	height: calc(var(--imo-bnav-icon) + 8px);
	border-radius: 999px;
}

.imo-bnav .imo-bnav__icon svg,
.imo-bnav .imo-bnav__icon i {
	display: block;
	width: var(--imo-bnav-icon);
	height: var(--imo-bnav-icon);
	font-size: var(--imo-bnav-icon);
	line-height: 1;
}

.imo-bnav .imo-bnav__icon--custom svg {
	fill: currentColor;
}

.imo-bnav .imo-bnav__label {
	max-width: 100%;
	overflow: hidden;
	font-size: 11px;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* فعال */
nav.imo-bnav .is-active a.imo-bnav__link {
	color: var(--imo-bnav-active);
}

.imo-bnav .is-active .imo-bnav__icon {
	color: var(--imo-bnav-active-icon);
	background: var(--imo-bnav-active-bg);
}

nav.imo-bnav a.imo-bnav__link:focus-visible,
nav.imo-bnav a.imo-bnav__chat:focus-visible {
	outline: 2px solid var(--imo-bnav-active-bg);
	outline-offset: 2px;
	border-radius: 14px;
}

/* ── نشان عددی ── */
.imo-bnav .imo-bnav__badge {
	position: absolute;
	/* گوشه بالا-راست خود آیکن، مستقل از اندازه دایره */
	top: calc(50% - var(--imo-bnav-icon) / 2 - 11px);
	right: calc(50% - var(--imo-bnav-icon) / 2 - 19px);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	color: var(--imo-bnav-badge-color);
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	background: var(--imo-bnav-badge-bg);
	border: 2px solid var(--imo-bnav-bg);
	border-radius: 10px;
	box-sizing: content-box;
	pointer-events: none;
}

.imo-bnav .imo-bnav__badge:empty,
.imo-bnav .imo-bnav__badge[data-count="0"] {
	display: none;
}

/* ── دکمه گفتگو ── */
nav.imo-bnav a.imo-bnav__chat,
nav.imo-bnav a.imo-bnav__chat:hover,
nav.imo-bnav a.imo-bnav__chat:focus,
nav.imo-bnav a.imo-bnav__chat:visited {
	position: relative;
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: var(--imo-bnav-chat-size);
	height: var(--imo-bnav-chat-size);
	color: var(--imo-bnav-chat-color);
	text-decoration: none;
	background: var(--imo-bnav-chat-bg);
	border-radius: var(--imo-bnav-chat-radius);
	box-shadow: 0 8px 24px rgba(17, 24, 39, .22);
	pointer-events: auto;
	-webkit-tap-highlight-color: transparent;
}

.imo-bnav .imo-bnav__chat .imo-bnav__icon {
	width: auto;
	height: auto;
	background: none;
}

.imo-bnav .imo-bnav__chat .imo-bnav__icon svg,
.imo-bnav .imo-bnav__chat .imo-bnav__icon i {
	width: var(--imo-bnav-chat-icon);
	height: var(--imo-bnav-chat-icon);
	font-size: var(--imo-bnav-chat-icon);
}

.imo-bnav .imo-bnav__chat .imo-bnav__badge {
	top: -3px;
	right: -3px;
	border-color: #fff;
}

/* جای دکمه گفتگو (چپ/راست) در هر دو جهت متن */
.imo-bnav--chat-left .imo-bnav__chat { order: 0; }
.imo-bnav--chat-right .imo-bnav__chat { order: 2; }
.rtl .imo-bnav--chat-left .imo-bnav__chat,
[dir="rtl"] .imo-bnav--chat-left .imo-bnav__chat { order: 2; }
.rtl .imo-bnav--chat-right .imo-bnav__chat,
[dir="rtl"] .imo-bnav--chat-right .imo-bnav__chat { order: 0; }

/* ویرایشگر المنتور: سر جای خودش، قابل انتخاب */
.imo-bnav.imo-bnav--editor {
	position: relative;
	padding: 12px var(--imo-bnav-side);
	pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
	.imo-bnav,
	.imo-bnav .imo-bnav__icon {
		transition: none;
	}
}

@media print {
	.imo-bnav {
		display: none !important;
	}
}

/* ظرف انتقال به انتهای body (بدون کلاس elementor) */
.imo-bnav-portal,
.imo-bnav-portal > .elementor-widget {
	margin: 0;
	padding: 0;
}
