/* HMenu Scroll — frontend styles */

.hmenu-scroll-wrap {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	direction: inherit;
}

.hmenu-scroll-wrap.hmenu-sticky {
	position: sticky;
	top: 0;
	z-index: 999;
	background: #fff;
}

.hmenu-scroll-track {
	display: flex;
	align-items: center;
	gap: var(--hmenu-gap, 10px);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	flex: 1 1 auto;
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE/Edge */
	padding: 6px 4px;
	cursor: grab;
}

.hmenu-scroll-track:active {
	cursor: grabbing;
}

.hmenu-scroll-track::-webkit-scrollbar {
	display: none; /* Chrome/Safari */
}

.hmenu-item {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	white-space: nowrap;
	text-decoration: none !important;
	border-radius: var(--hmenu-radius, 999px);
	padding: var(--hmenu-pad-v, 10px) var(--hmenu-pad-h, 20px);
	font-family: var(--hmenu-font, inherit);
	font-size: var(--hmenu-font-size, 16px);
	font-weight: 700;
	transition: transform .15s ease, filter .15s ease;
	position: relative;
	min-width: var(--hmenu-min-w, auto);
	min-height: var(--hmenu-min-h, auto);
	box-sizing: border-box;
}

.hmenu-item:hover {
	filter: brightness(0.92);
	transform: translateY(-1px);
	background-color: var(--hmenu-i-hover-bg, inherit);
	color: var(--hmenu-i-hover-text, inherit);
}

.hmenu-item-icon {
	font-size: var(--hmenu-icon-size, 18px);
	line-height: 1;
	flex-shrink: 0;
}

.hmenu-item-label {
	line-height: 1;
}

.hmenu-item-badge {
	position: absolute;
	top: -6px;
	inset-inline-end: -6px;
	background: #e53935;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	border-radius: 999px;
	padding: 2px 6px;
	line-height: 1.4;
}

/* Fade edges */
.hmenu-scroll-wrap.hmenu-fade {
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
	mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
[dir="rtl"] .hmenu-scroll-wrap.hmenu-fade {
	-webkit-mask-image: linear-gradient(to left, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
	mask-image: linear-gradient(to left, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

/* Arrows */
.hmenu-arrow {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid #ddd;
	background: #fff;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	box-shadow: 0 1px 4px rgba(0,0,0,.1);
}

.hmenu-arrow:hover {
	background: #f2f2f2;
}

@media (max-width: 767px) {
	.hmenu-arrow {
		display: none;
	}
}

/* داخل ادیتور المنتور، فضای پیش‌نمایش معمولاً به‌خاطر باز بودن پنل باریک‌تر
 * می‌شود و ممکن است در همان بازه‌ی موبایل قرار بگیرد؛ برای این‌که دکمه‌های
 * فلش همیشه برای اسکرول در دسترس بمانند، داخل خودِ ادیتور مجبور به نمایش
 * می‌شوند صرف‌نظر از عرض پیش‌نمایش. */
body.elementor-editor-active .hmenu-arrow {
	display: flex !important;
}
