/**
 * ESPE Nav móvil off-canvas
 *
 * @package Widgets_ESPE
 */

.wespe-mnav {
	position: relative;
	box-sizing: border-box;
	width: 100%;
}

/* Nivel 1: siempre visible en el flujo del documento */
.wespe-mnav__l1 {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	background: #fff;
}

.elementor-editor .wespe-mnav__l1:empty::before {
	content: '';
	display: block;
	min-height: 48px;
}

.wespe-mnav *,
.wespe-mnav *::before,
.wespe-mnav *::after {
	box-sizing: inherit;
}

html.wespe-mnav--lock,
body.wespe-mnav--lock {
	overflow: hidden;
}

.wespe-mnav__trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	color: inherit;
}

.wespe-mnav__trigger-bars {
	display: block;
	width: 22px;
	height: 2px;
	background: currentColor;
	box-shadow: 0 -7px 0 currentColor, 0 7px 0 currentColor;
}

.wespe-mnav__overlay {
	position: fixed;
	inset: 0;
	z-index: 99980;
	background: rgba(0, 0, 0, 0.45);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.wespe-mnav.is-open .wespe-mnav__overlay {
	opacity: 1;
	visibility: visible;
}

.wespe-mnav__drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	max-width: 420px;
	z-index: 99990;
	background: #fff;
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
	transform: translateX(100%);
	transition: transform 0.28s ease;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.wespe-mnav.is-open .wespe-mnav__drawer {
	transform: translateX(0);
}

.wespe-mnav__track {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
}

.wespe-mnav__sheet {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	min-height: 0;
	background: inherit;
	overflow: hidden;
}

/*
 * El atributo [hidden] por defecto es display:none, pero muchos temas/Elementor
 * cargan reglas que igualan o superan la especificidad de .wespe-mnav__sheet,
 * dejando todas las hojas con display:flex y apiladas. Forzar ocultación.
 */
.wespe-mnav__sheet[hidden] {
	display: none !important;
}

.wespe-mnav__drawer[hidden] {
	display: none !important;
}

.wespe-mnav__head {
	display: grid;
	grid-template-columns: 44px 1fr 44px;
	align-items: center;
	min-height: 52px;
	padding: 0 4px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	flex-shrink: 0;
}

.wespe-mnav__head--l1 {
	grid-template-columns: 44px 1fr 44px;
}

.wespe-mnav__head-spacer {
	display: block;
}

.wespe-mnav__head-title {
	text-align: center;
	font-weight: 600;
	font-size: 0.95rem;
	padding: 0 8px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wespe-mnav__head-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: inherit;
}

.wespe-mnav__close {
	font-size: 1.35rem;
	font-weight: 400;
}

.wespe-mnav__list {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wespe-mnav__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin: 0;
	padding: 14px 16px;
	border: 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	background: transparent;
	text-align: left;
	font: inherit;
	color: inherit;
	cursor: pointer;
	text-decoration: none;
}

.wespe-mnav__row--link {
	cursor: pointer;
}

.wespe-mnav__row--static {
	cursor: default;
}

.wespe-mnav__row-label {
	flex: 1 1 auto;
}

.wespe-mnav__row-meta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: 12px;
	color: rgba(0, 0, 0, 0.45);
	font-size: 0.9rem;
}

.wespe-mnav__badge {
	font-variant-numeric: tabular-nums;
}

.wespe-mnav__l3-scroll {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 0 0 24px;
}

.wespe-mnav__l3-links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wespe-mnav__l3-li {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.wespe-mnav__l3-a {
	display: block;
	padding: 14px 16px;
	color: inherit;
	text-decoration: none;
	font: inherit;
}

.wespe-mnav__l3-template {
	padding: 12px 16px 0;
}

.wespe-mnav__tpl-note {
	margin: 0;
	padding: 12px;
	background: rgba(0, 106, 68, 0.08);
	border-radius: 8px;
	font-size: 0.875rem;
}
