.hk-mmenu,
.hk-mmenu__overlay {
	--hk-mmenu-color: #1c2340;
	--hk-mmenu-bg: #ffffff;
	--hk-mmenu-overlay: rgba(12, 18, 36, 0.45);
}

.hk-mmenu {
	direction: rtl;
}

.hk-mmenu .hk-mmenu__trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0 !important;
	border: none !important;
	border-radius: 12px !important;
	background: transparent !important;
	color: var(--hk-mmenu-color);
	cursor: pointer;
	box-shadow: none !important;
}

.hk-mmenu__burger {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 22px;
}

.hk-mmenu__burger span {
	display: block;
	width: 100%;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.hk-mmenu.is-open .hk-mmenu__burger span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.hk-mmenu.is-open .hk-mmenu__burger span:nth-child(2) {
	opacity: 0;
}

.hk-mmenu.is-open .hk-mmenu__burger span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.hk-mmenu__overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: stretch;
	justify-content: flex-end;
	padding: 16px 12px;
	background: var(--hk-mmenu-overlay);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition:
		opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
		visibility 0.45s cubic-bezier(0.22, 1, 0.36, 1),
		backdrop-filter 0.45s ease;
	direction: ltr;
}

.hk-mmenu__overlay.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.hk-mmenu__overlay.is-closing {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.hk-mmenu__overlay[hidden] {
	display: none !important;
}

.hk-mmenu__overlay.is-open[hidden],
.hk-mmenu__overlay.is-closing[hidden] {
	display: flex !important;
}

/* Full-screen layer behind the menu — closes menu on click/touch. */
.hk-mmenu__overlay > .hk-mmenu__backdrop {
	position: absolute !important;
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	inset: 0 !important;
	z-index: 1 !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	min-width: 100% !important;
	min-height: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	pointer-events: auto !important;
	cursor: pointer !important;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.hk-mmenu__shell {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: 10px;
	/* Only as wide as panel + social, so left dark area stays on backdrop. */
	width: auto;
	max-width: calc(100vw - 72px);
	height: calc(100vh - 32px);
	max-height: calc(100vh - 32px);
	pointer-events: auto;
	transform: translateX(40px) scale(0.98);
	opacity: 0;
	transition:
		transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
		opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hk-mmenu__overlay.is-open .hk-mmenu__shell {
	transform: translateX(0) scale(1);
	opacity: 1;
}

.hk-mmenu__overlay.is-closing .hk-mmenu__shell {
	transform: translateX(32px) scale(0.98);
	opacity: 0;
	transition:
		transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
		opacity 0.3s ease;
}

.hk-mmenu__social {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	align-self: flex-end;
	gap: 18px;
	width: 56px;
	padding: 18px 0;
	border: none !important;
	outline: none !important;
	border-radius: 22px;
	background: var(--hk-mmenu-bg, #ffffff) !important;
	background-color: var(--hk-mmenu-bg, #ffffff) !important;
	box-shadow: 0 12px 32px rgba(16, 24, 40, 0.14);
	color: var(--hk-mmenu-color, #1c2340);
	flex-shrink: 0;
	transform: translateY(16px);
	opacity: 0;
	transition:
		transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.08s,
		opacity 0.45s ease 0.08s;
}

.hk-mmenu__overlay.is-open .hk-mmenu__social {
	transform: translateY(0);
	opacity: 1;
}

.hk-mmenu__overlay.is-closing .hk-mmenu__social {
	transform: translateY(10px);
	opacity: 0;
	transition:
		transform 0.28s ease,
		opacity 0.24s ease;
}

.hk-mmenu__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	color: inherit;
	text-decoration: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.hk-mmenu__social-link:hover {
	opacity: 0.75;
	transform: translateY(-1px);
}

.hk-mmenu__social-link i,
.hk-mmenu__social-link svg {
	width: 22px;
	height: 22px;
	font-size: 20px;
	line-height: 1;
}

.hk-mmenu__panel {
	flex: 0 1 auto;
	width: min(300px, calc(100vw - 120px));
	min-width: 240px;
	height: 100%;
	overflow-y: auto;
	padding: 28px 22px 24px;
	border: none !important;
	outline: none !important;
	border-radius: 28px;
	background: var(--hk-mmenu-bg, #ffffff) !important;
	background-color: var(--hk-mmenu-bg, #ffffff) !important;
	box-shadow: 0 16px 40px rgba(16, 24, 40, 0.16);
	color: var(--hk-mmenu-color, #1c2340);
	direction: rtl;
	transform: translateX(18px);
	opacity: 0;
	transition:
		transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.04s,
		opacity 0.4s ease 0.04s;
}

.hk-mmenu__overlay.is-open .hk-mmenu__panel {
	transform: translateX(0);
	opacity: 1;
}

.hk-mmenu__overlay.is-closing .hk-mmenu__panel {
	transform: translateX(14px);
	opacity: 0;
	transition:
		transform 0.28s ease,
		opacity 0.24s ease;
}

.hk-mmenu__empty {
	margin: 0;
	padding: 12px 4px;
	font-size: 0.875rem;
	line-height: 1.7;
	color: var(--hk-mmenu-color, #1c2340);
	opacity: 0.7;
}

.hk-mmenu__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hk-mmenu__sub .hk-mmenu__list,
.hk-mmenu__sub {
	list-style: none;
}

.hk-mmenu__sub .hk-mmenu__icon {
	display: none;
}

.hk-mmenu__sub .hk-mmenu__link {
	padding: 10px 4px;
	font-size: 0.9rem;
	opacity: 0.85;
}

.hk-mmenu__sub .hk-mmenu__text {
	font-size: 0.9rem;
	font-weight: 500;
}

.hk-mmenu__item + .hk-mmenu__item {
	margin-top: 6px;
}

.hk-mmenu__row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.hk-mmenu__link {
	display: flex;
	align-items: center;
	gap: 14px;
	flex: 1;
	min-width: 0;
	padding: 14px 4px;
	color: inherit;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.hk-mmenu__link:hover {
	opacity: 0.8;
}

.hk-mmenu__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	flex-shrink: 0;
	color: inherit;
}

.hk-mmenu__icon i,
.hk-mmenu__icon svg {
	width: 22px;
	height: 22px;
	font-size: 20px;
	line-height: 1;
}

.hk-mmenu__text {
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.5;
}

/* Use span[role=button] to avoid theme `button` border/color overrides. */
body .hk-mmenu__toggle,
.hk-mmenu__overlay .hk-mmenu__toggle {
	all: unset;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 20px !important;
	height: 20px !important;
	box-sizing: border-box !important;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
	color: #1a9e8f !important;
	cursor: pointer !important;
	flex-shrink: 0 !important;
	-webkit-tap-highlight-color: transparent !important;
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

body .hk-mmenu__toggle:hover,
body .hk-mmenu__toggle:focus,
body .hk-mmenu__toggle:active,
body .hk-mmenu__toggle:focus-visible,
.hk-mmenu__overlay .hk-mmenu__toggle:hover,
.hk-mmenu__overlay .hk-mmenu__toggle:focus,
.hk-mmenu__overlay .hk-mmenu__toggle:active,
.hk-mmenu__overlay .hk-mmenu__toggle:focus-visible {
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
	color: #168a7d !important;
}

.hk-mmenu__toggle svg {
	width: 14px !important;
	height: 14px !important;
	display: block !important;
	pointer-events: none !important;
	stroke: #1a9e8f !important;
	fill: none !important;
}

.hk-mmenu__item.is-open > .hk-mmenu__row .hk-mmenu__toggle {
	transform: rotate(45deg);
}

.hk-mmenu__sub {
	margin: 0 40px 8px 0;
	padding: 0;
	list-style: none;
	overflow: hidden;
	max-height: 0;
	opacity: 0;
	transition:
		max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
		opacity 0.28s ease;
}

.hk-mmenu__sub[hidden] {
	display: block !important;
	max-height: 0;
	opacity: 0;
	pointer-events: none;
}

.hk-mmenu__item.is-open > .hk-mmenu__sub {
	max-height: 320px;
	opacity: 1;
	pointer-events: auto;
}

.hk-mmenu__item.is-open > .hk-mmenu__sub[hidden] {
	max-height: 320px;
	opacity: 1;
	pointer-events: auto;
}

.hk-mmenu__sub a {
	display: block;
	padding: 10px 4px;
	color: inherit;
	text-decoration: none;
	font-size: 0.9rem;
	opacity: 0.8;
}

.hk-mmenu__sub a:hover {
	opacity: 1;
}

body.hk-mmenu-lock {
	overflow: hidden;
}

@media (min-width: 768px) {
	.hk-mmenu__panel {
		width: 320px;
	}
}
