/**
 * Modal de selección — solo móvil dentro del menú off-canvas.
 */

html.nj-mobile-picker-open,
html.nj-mobile-picker-open body {
	overflow: hidden;
}

.nj-mobile-picker {
	position: fixed;
	inset: 0;
	z-index: 100050;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 0;
	box-sizing: border-box;
}

.nj-mobile-picker--hidden {
	display: none;
}

.nj-mobile-picker__backdrop {
	position: absolute;
	inset: 0;
	background: rgb(15 25 45 / 55%);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.nj-mobile-picker__sheet {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 100%;
	max-height: min(85vh, 640px);
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 20px 20px 0 0;
	box-shadow: 0 -8px 40px rgb(15 31 54 / 18%);
	animation: nj-mobile-picker-slide-up 0.28s ease-out;
}

@keyframes nj-mobile-picker-slide-up {
	from {
		transform: translateY(100%);
		opacity: 0.6;
	}

	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.nj-mobile-picker__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.1rem 1.25rem 0.75rem;
	border-bottom: 1px solid rgb(15 31 54 / 8%);
	flex-shrink: 0;
}

.nj-mobile-picker__title {
	margin: 0;
	font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 1.05rem;
	font-weight: 700;
	color: #1b2a49;
	line-height: 1.3;
}

.nj-mobile-picker__close {
	flex-shrink: 0;
	margin: 0;
	padding: 0.35rem;
	border: 0;
	background: transparent;
	background-color: transparent;
	box-shadow: none;
	cursor: pointer;
	line-height: 0;
	border-radius: 10px;
}

.nj-mobile-picker__close:hover,
.nj-mobile-picker__close:focus,
.nj-mobile-picker__close:active {
	background: transparent;
	background-color: transparent;
	box-shadow: none;
}

.nj-mobile-picker__close:focus-visible {
	outline: 2px solid #1b2a49;
	outline-offset: 2px;
	background: transparent;
	background-color: transparent;
}

.nj-mobile-picker__body {
	overflow: auto;
	padding: 0.75rem 1rem 1.25rem;
	-webkit-overflow-scrolling: touch;
}

/* Menús teletransportados al modal */
.nj-mobile-picker__panel-menu,
.nj-mobile-picker .nj-mobile-picker__panel-menu {
	position: static !important;
	inset: auto !important;
	top: auto !important;
	right: auto !important;
	left: auto !important;
	min-width: 0 !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	transform: none !important;
}

.nj-mobile-picker__panel-menu .nj-currency-switcher__item,
.nj-mobile-picker__panel-menu .nj-sede-switcher__item {
	display: block;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nj-mobile-picker__panel-menu[hidden] {
	display: block !important;
}

.nj-mobile-picker .nj-sede-switcher__option,
.nj-mobile-picker .nj-currency-switcher__option {
	padding: 0.85rem 0.75rem;
	border-radius: 12px;
	font-size: 0.95rem;
	color: #1b2a49 !important;
	background: transparent !important;
}

.nj-mobile-picker .nj-sede-switcher__text,
.nj-mobile-picker .nj-currency-switcher__text {
	color: #1b2a49 !important;
}

.nj-mobile-picker .nj-sede-switcher__sym,
.nj-mobile-picker .nj-currency-switcher__sym {
	color: #1b2a49 !important;
}

.nj-mobile-picker .nj-sede-switcher__option:hover,
.nj-mobile-picker .nj-sede-switcher__option:focus-visible,
.nj-mobile-picker .nj-currency-switcher__option:hover,
.nj-mobile-picker .nj-currency-switcher__option:focus-visible {
	background: transparent !important;
	color: #dbe72f !important;
}

.nj-mobile-picker .nj-sede-switcher__option.is-selected,
.nj-mobile-picker .nj-currency-switcher__option.is-selected {
	background: transparent !important;
	color: #1b2a49 !important;
}

.nj-mobile-picker .nj-sede-switcher__option.is-selected:hover,
.nj-mobile-picker .nj-sede-switcher__option.is-selected:focus-visible,
.nj-mobile-picker .nj-currency-switcher__option.is-selected:hover,
.nj-mobile-picker .nj-currency-switcher__option.is-selected:focus-visible {
	background: transparent !important;
	color: #dbe72f !important;
}

.nj-mobile-picker .farmacia-login-popup__open-link {
	display: flex;
	align-items: center;
	padding: 0.85rem 0.75rem;
	border-radius: 12px;
	font-size: 0.95rem;
	font-weight: 700;
	color: #1b2a49;
	text-decoration: none;
}

.nj-mobile-picker .farmacia-login-popup__open-link:hover,
.nj-mobile-picker .farmacia-login-popup__open-link:focus-visible {
	background: transparent;
	color: #dbe72f;
	outline: none;
}

/* Panel de cuenta (logueado) teletransportado al modal */
.nj-mobile-picker .farmacia-login-popup__open-dropdown,
.nj-mobile-picker .farmacia-login-popup__open-dropdown.is-dropdown-visible,
.nj-mobile-picker .farmacia-login-popup__open-dropdown.nj-mobile-picker__panel-menu {
	display: block !important;
	position: static !important;
	inset: auto !important;
	min-width: 0 !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	transform: none !important;
}

/* Off-canvas móvil: ocultar paneles inline (solo se muestran en el modal). */
@media (max-width: 921px) {
	#ast-mobile-popup .nj-sede-switcher__menu,
	#ast-mobile-popup .nj-currency-switcher__menu,
	.ast-mobile-popup-content .nj-sede-switcher__menu,
	.ast-mobile-popup-content .nj-currency-switcher__menu,
	.ast-desktop-popup-content .nj-sede-switcher__menu,
	.ast-desktop-popup-content .nj-currency-switcher__menu,
	.ast-mobile-header-content .nj-sede-switcher__menu,
	.ast-mobile-header-content .nj-currency-switcher__menu {
		display: none !important;
	}

	#ast-mobile-popup .farmacia-login-popup__open-dropdown,
	.ast-mobile-popup-content .farmacia-login-popup__open-dropdown,
	.ast-desktop-popup-content .farmacia-login-popup__open-dropdown,
	.ast-mobile-header-content .farmacia-login-popup__open-dropdown {
		display: none !important;
	}

	#ast-mobile-popup .nj-sede-switcher::after,
	#ast-mobile-popup .nj-currency-switcher::after,
	.ast-mobile-popup-content .nj-sede-switcher::after,
	.ast-mobile-popup-content .nj-currency-switcher::after,
	.ast-desktop-popup-content .nj-sede-switcher::after,
	.ast-desktop-popup-content .nj-currency-switcher::after {
		display: none;
	}
}
