/* ─────────────────────────────────────────
   Mired Nav Menu — nav-menu.css
───────────────────────────────────────── */

/* Wrapper */
.mnm-wrapper {
	position: relative;
}

/* ── Desktop menu ── */
.mnm-menu {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
}

.mnm-menu li {
	margin: 0;
	padding: 0;
}

.mnm-menu a {
	display: inline-block;
	text-decoration: none;
	transition: color 0.2s ease, background-color 0.2s ease;
}

/* Active item */
.mnm-item--active > a {
	color: var(--mnm-color-active, #22c55e);
	background-color: var(--mnm-bg-active, transparent);
}

/* ── Toggle button ── */
.mnm-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border: 0 solid transparent;
	background: transparent;
	line-height: 1;
	/* Neutraliza el color verde que el tema pueda heredar a los íconos FA */
	color: #333333;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.mnm-toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.mnm-toggle__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	/* Hereda el color del botón toggle, no del tema */
	color: inherit;
}

/* El <i> de Font Awesome hereda color del padre; neutralizamos cualquier override del tema */
.mnm-toggle__icon i,
.mnm-toggle__icon svg {
	color: inherit;
	fill: currentColor;
}

.mnm-toggle__close {
	display: none;
}

/* ── Drawer ── */
.mnm-drawer {
	position: fixed;
	left: 0;
	top: 0;
	height: 100%;
	overflow: hidden;
	visibility: hidden;
	transform: translateX(-100%);
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.4s;
	z-index: 100001;
	box-shadow: 10px 0 40px rgba(0, 0, 0, 0.08);
	display: flex;
	flex-direction: column;
	border-right: 1px solid rgba(0, 0, 0, 0.04);
}

.mnm-drawer.is-open {
	visibility: visible;
	transform: translateX(0);
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0s;
}

/* ── Drawer inner scroll body — vertically centers the menu ── */
.mnm-drawer-body {
	flex: 1;
	overflow-y: auto;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* ── Drawer footer — wraps the close button ── */
.mnm-drawer-footer {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px 20px 24px;
	border-top: 1px solid rgba(0, 0, 0, 0.04);
}

/* ── Close button — mismo estilo que los botones azules del sitio ── */
.mnm-drawer-close {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 0 24px;
	height: 52px;
	border-radius: 8px;
	border: none;
	background-color: #00AEF0;
	color: #ffffff;
	cursor: pointer;
	font-family: 'Nunito', sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	transition: filter 0.2s ease, transform 0.15s ease;
}

/* Hide the FA icon */
.mnm-drawer-close i,
.mnm-drawer-close svg,
.mnm-drawer-close img {
	display: none;
}

/* × en SVG (trazo fino y nítido, alineado con el texto) */
.mnm-drawer-close::before {
	content: '';
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mnm-drawer-close:hover {
	filter: brightness(0.92);
}

.mnm-drawer-close:active {
	transform: scale(0.98);
}

.mnm-drawer-close:focus-visible {
	outline: 2px solid #00AEF0;
	outline-offset: 3px;
}

/* ── Overlay ── */
.mnm-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	opacity: 0;
	backdrop-filter: blur(0px);
	-webkit-backdrop-filter: blur(0px);
	pointer-events: none;
	transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), backdrop-filter 0.4s cubic-bezier(0.16, 1, 0.3, 1), -webkit-backdrop-filter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	z-index: 100000;
}

.mnm-overlay.is-visible {
	opacity: 1;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	pointer-events: auto;
}

/* ── Drawer menu (vertical list) ── */
.mnm-drawer-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mnm-drawer-menu li {
	margin: 0;
	opacity: 0; /* Prepared for staggered fade slide-in animation */
}

.mnm-drawer-menu a {
	display: block;
	text-decoration: none;
	font-size: 1.2rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	padding: 14px 20px;
	border-radius: 12px;
	margin-bottom: 6px;
	transition: color 0.25s ease, background-color 0.25s ease, padding-left 0.25s ease, transform 0.25s ease;
}

.mnm-drawer-menu a:hover {
	background-color: rgba(0, 0, 0, 0.04);
	padding-left: 26px;
	transform: translateX(4px);
}

/* Default active styling fallback (modified dynamically in widgets) */
.mnm-drawer-menu li.mnm-item--active > a {
	background-color: rgba(80, 185, 64, 0.08);
	font-weight: 600;
}

/* Staggered entry animation for drawer items when open */
@keyframes mnmFadeSlideIn {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.mnm-drawer.is-open .mnm-drawer-menu li {
	animation: mnmFadeSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.mnm-drawer.is-open .mnm-drawer-menu li:nth-child(1) { animation-delay: 0.08s; }
.mnm-drawer.is-open .mnm-drawer-menu li:nth-child(2) { animation-delay: 0.14s; }
.mnm-drawer.is-open .mnm-drawer-menu li:nth-child(3) { animation-delay: 0.20s; }
.mnm-drawer.is-open .mnm-drawer-menu li:nth-child(4) { animation-delay: 0.26s; }
.mnm-drawer.is-open .mnm-drawer-menu li:nth-child(5) { animation-delay: 0.32s; }
.mnm-drawer.is-open .mnm-drawer-menu li:nth-child(6) { animation-delay: 0.38s; }

/* ── Fallback breakpoint (overridden by scoped inline <style> per widget instance) ── */
@media (max-width: 768px) {
	.mnm-menu {
		display: none;
	}
	.mnm-toggle {
		display: flex;
	}
}

/* Editor notice */
.mnm-no-menu-notice {
	padding: 12px 16px;
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 4px;
	color: #856404;
	font-size: 14px;
	margin: 0;
}
