/* =========================================================
   Mobile Menu Drawer - estilos base
   Los colores/tipografías se inyectan por Elementor (Style tab).
   Aquí solo va estructura, posicionamiento y animación.
========================================================= */

.mmd-wrapper {
	display: inline-block;
	position: relative;
}

/* Botón toggle */
.mmd-toggle-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: transparent;
	border: none;
	border-width: 0;
	outline: none;
	cursor: pointer;
	line-height: 1;
	font: inherit;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}

.mmd-toggle-btn .mmd-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

.mmd-toggle-btn .mmd-icon svg {
	display: block;
}

.mmd-toggle-btn .mmd-icon i {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.mmd-toggle-btn .mmd-icon-close {
	display: none;
	font-size: 1.4em;
	line-height: 1;
}

.mmd-wrapper.mmd-is-open .mmd-toggle-btn .mmd-icon-open {
	display: none;
}
.mmd-wrapper.mmd-is-open .mmd-toggle-btn .mmd-icon-close {
	display: inline-flex;
}

.mmd-btn-text.mmd-icon-pos-right {
	order: -1;
}

/* Overlay */
.mmd-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--mmd-speed, 350ms) ease;
	z-index: 999998;
}

.mmd-wrapper.mmd-is-open .mmd-overlay {
	opacity: 1;
	visibility: visible;
}

/* Panel / Drawer */
.mmd-drawer {
	position: fixed;
	top: 0;
	background: #ffffff;
	z-index: 999999;
	overflow-y: auto;
	box-sizing: border-box;
	transition: transform var(--mmd-speed, 350ms) ease;
	-webkit-overflow-scrolling: touch;
}

/* Izquierda / Derecha */
.mmd-drawer.mmd-pos-left,
.mmd-drawer.mmd-pos-right {
	height: 100%;
	width: 360px;
	max-width: 90vw;
}
.mmd-drawer.mmd-pos-left {
	left: 0;
	transform: translateX(-100%);
}
.mmd-drawer.mmd-pos-right {
	right: 0;
	transform: translateX(100%);
}

/* Arriba / Abajo */
.mmd-drawer.mmd-pos-top,
.mmd-drawer.mmd-pos-bottom {
	left: 0;
	width: 100%;
	height: 60vh;
	max-height: 90vh;
}
.mmd-drawer.mmd-pos-top {
	top: 0;
	transform: translateY(-100%);
}
.mmd-drawer.mmd-pos-bottom {
	top: auto;
	bottom: 0;
	transform: translateY(100%);
}

/* Estado abierto: todas las posiciones vuelven a su lugar */
.mmd-wrapper.mmd-is-open .mmd-drawer {
	transform: translate(0, 0) !important;
}

/* Botón cerrar dentro del panel */
.mmd-close-btn {
	position: absolute;
	top: 16px;
	right: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	border-width: 0;
	outline: none;
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}

/* Lista del menú */
.mmd-drawer-nav {
	width: 100%;
}

.mmd-menu-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	width: 100%;
}

.mmd-menu-list a {
	display: inline-block;
	text-decoration: none;
	transition: color 150ms ease;
}

/* Alineación de ítems, elegible desde el panel de Elementor */
.mmd-align-left .mmd-menu-list {
	align-items: flex-start;
	text-align: left;
}
.mmd-align-center .mmd-menu-list {
	align-items: center;
	text-align: center;
}
.mmd-align-right .mmd-menu-list {
	align-items: flex-end;
	text-align: right;
}

/* Submenús (si el menú de WP tiene hijos) */
.mmd-menu-list .sub-menu {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
	width: 100%;
}
.mmd-menu-list .sub-menu a {
	opacity: 0.75;
	font-size: 0.9em;
}

/* Separador entre ítems (se activa/desactiva y personaliza desde el panel de Elementor) */
.mmd-menu-list > li:not(:last-child)::after {
	content: '';
	display: block;
	border-bottom: 0 solid transparent; /* sin valores por defecto: invisible hasta que Elementor inyecte grosor/color */
	box-sizing: border-box;
}

.mmd-align-left .mmd-menu-list > li:not(:last-child)::after {
	margin-left: 0;
	margin-right: auto;
}
.mmd-align-center .mmd-menu-list > li:not(:last-child)::after {
	margin-left: auto;
	margin-right: auto;
}
.mmd-align-right .mmd-menu-list > li:not(:last-child)::after {
	margin-left: auto;
	margin-right: 0;
}

/* Bloqueo de scroll cuando el panel está abierto */
html.mmd-scroll-locked,
html.mmd-scroll-locked body {
	overflow: hidden !important;
	height: 100%;
}

/* Botón inferior dentro del panel */
.mmd-bottom-btn-wrap {
	display: flex;
	width: 100%;
	box-sizing: border-box;
}
.mmd-bottom-btn-wrap.mmd-bottom-btn-align-left {
	justify-content: flex-start;
}
.mmd-bottom-btn-wrap.mmd-bottom-btn-align-center {
	justify-content: center;
}
.mmd-bottom-btn-wrap.mmd-bottom-btn-align-right {
	justify-content: flex-end;
}
.mmd-bottom-btn-wrap.mmd-bottom-btn-align-stretch {
	justify-content: stretch;
}
.mmd-bottom-btn-wrap.mmd-bottom-btn-align-stretch .mmd-bottom-btn {
	width: 100%;
}

.mmd-bottom-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	cursor: pointer;
	box-sizing: border-box;
	transition: all 200ms ease;
	line-height: 1;
}

.mmd-bottom-btn svg {
	width: 1em;
	height: 1em;
}

