/**
 * Mobile multi-level "خدمات" navigation overlay (Digikala-like
 * architecture: level list -> tap -> sub-level slides in -> clear
 * back button). Scoped entirely to its own "#pejvak-services-overlay"
 * markup, injected by pejvak-mobile-services-menu.js by cloning the
 * real WordPress menu markup - this file never duplicates menu
 * content, only styles the clone.
 *
 * Breakpoint matches the theme's own existing mobile/tablet range
 * (<=1024px, same as assets/js/pejvak-mobile-menu-toggle.js and the
 * "fat-nav" mobile wrapper) - no new breakpoint introduced.
 */

#pejvak-services-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: #ffffff;
	direction: rtl;
	font-family: inherit;
}

#pejvak-services-overlay.is-open {
	display: flex;
	flex-direction: column;
}

.pejvak-sm-header {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 56px;
	padding: 8px 12px;
	background: #233A7A;
	color: #ffffff;
}

.pejvak-sm-back,
.pejvak-sm-close {
	display: flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	min-width: 44px;
	padding: 8px 12px;
	background: transparent;
	border: none;
	color: #ffffff;
	font-size: 14px;
	font-family: inherit;
	cursor: pointer;
	border-radius: 8px;
}

.pejvak-sm-back:active,
.pejvak-sm-close:active {
	background: rgba(255, 255, 255, 0.15);
}

.pejvak-sm-back[hidden] {
	visibility: hidden;
	pointer-events: none;
}

.pejvak-sm-title {
	flex: 1 1 auto;
	text-align: center;
	font-size: 15px;
	font-weight: 700;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pejvak-sm-viewport {
	position: relative;
	flex: 1 1 auto;
	overflow: hidden;
}

.pejvak-sm-panels {
	display: flex;
	width: 200%;
	height: 100%;
	transition: transform 0.28s ease;
	transform: translateX(0);
}

.pejvak-sm-panels.is-level-2 {
	transform: translateX(50%);
}

.pejvak-sm-panel {
	flex: 0 0 50%;
	max-width: 50%;
	height: 100%;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 4px 0 24px;
	box-sizing: border-box;
}

.pejvak-sm-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.pejvak-sm-list li {
	border-bottom: 1px solid #EEF1F6;
}

.pejvak-sm-list a,
.pejvak-sm-list span.pejvak-sm-noop {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 48px;
	padding: 12px 16px;
	font-size: 15px;
	line-height: 1.5;
	color: #0F172A;
	text-decoration: none;
	word-break: break-word;
}

.pejvak-sm-list a:active {
	background: #F2FAFD;
}

.pejvak-sm-list span.pejvak-sm-noop {
	color: #94A3B8;
	cursor: default;
}

.pejvak-sm-list .pejvak-sm-chevron {
	flex: 0 0 auto;
	color: #29AAE1;
	font-size: 18px;
	line-height: 1;
}

@media (max-width: 1439px) {
	body.pejvak-services-open {
		overflow: hidden;
	}
}
