/**
 * Sede, moneda e inicio de sesión — colores de cabecera y off-canvas.
 *
 * Escritorio: fondo #1b2a49, texto #ffffff
 * Móvil (drawer): fondo #ffffff, texto #1b2a49
 */

.is-offcanvas-menu-trigger .nj-mobile-menu-label {
	display: none;
}

/* ── Escritorio: barra superior ── */
@media (min-width: 922px) {
	.main-header-bar .nj-sede-switcher__trigger,
	.main-header-bar .nj-currency-switcher__trigger,
	.main-header-bar .farmacia-login-popup__open,
	.main-header-bar .wp-block-farmacia-login-popup .farmacia-login-popup__open,
	#ast-desktop-header .nj-sede-switcher__trigger,
	#ast-desktop-header .nj-currency-switcher__trigger,
	#ast-desktop-header .farmacia-login-popup__open,
	#ast-desktop-header .wp-block-farmacia-login-popup .farmacia-login-popup__open {
		background: #1b2a49 !important;
		background-color: #1b2a49 !important;
		color: #ffffff !important;
	}

	.main-header-bar .nj-sede-switcher__label,
	.main-header-bar .nj-currency-switcher__label,
	.main-header-bar .farmacia-login-popup__open-text,
	.main-header-bar .nj-sede-switcher__icon-circle,
	.main-header-bar .nj-currency-switcher__icon-circle,
	.main-header-bar .farmacia-login-popup__open-icon,
	.main-header-bar .nj-sede-switcher__caret,
	.main-header-bar .nj-currency-switcher__caret,
	.main-header-bar .farmacia-login-popup__open-caret,
	#ast-desktop-header .nj-sede-switcher__label,
	#ast-desktop-header .nj-currency-switcher__label,
	#ast-desktop-header .farmacia-login-popup__open-text,
	#ast-desktop-header .nj-sede-switcher__icon-circle,
	#ast-desktop-header .nj-currency-switcher__icon-circle,
	#ast-desktop-header .farmacia-login-popup__open-icon,
	#ast-desktop-header .nj-sede-switcher__caret,
	#ast-desktop-header .nj-currency-switcher__caret,
	#ast-desktop-header .farmacia-login-popup__open-caret {
		color: #ffffff !important;
	}

	.main-header-bar .nj-sede-switcher__trigger:hover,
	.main-header-bar .nj-sede-switcher__trigger:focus-visible,
	.main-header-bar .nj-currency-switcher__trigger:hover,
	.main-header-bar .nj-currency-switcher__trigger:focus-visible,
	.main-header-bar .farmacia-login-popup__open:hover,
	.main-header-bar .farmacia-login-popup__open:focus-visible,
	#ast-desktop-header .nj-sede-switcher__trigger:hover,
	#ast-desktop-header .nj-sede-switcher__trigger:focus-visible,
	#ast-desktop-header .nj-currency-switcher__trigger:hover,
	#ast-desktop-header .nj-currency-switcher__trigger:focus-visible,
	#ast-desktop-header .farmacia-login-popup__open:hover,
	#ast-desktop-header .farmacia-login-popup__open:focus-visible {
		background: #1b2a49 !important;
		background-color: #1b2a49 !important;
		color: #dbe72f !important;
	}
}

/* ── Móvil: menú off-canvas ── */
@media (max-width: 921px) {
	#ast-mobile-popup,
	.ast-mobile-popup-content,
	.ast-desktop-popup-content,
	.ast-mobile-header-content {
		--nj-trigger-color: #1b2a49;
		--sede-trigger-color: #1b2a49;
	}

	#ast-mobile-popup .nj-currency-switcher,
	.ast-mobile-popup-content .nj-currency-switcher,
	.ast-desktop-popup-content .nj-currency-switcher,
	.ast-mobile-header-content .nj-currency-switcher,
	#ast-mobile-popup .nj-sede-switcher,
	.ast-mobile-popup-content .nj-sede-switcher,
	.ast-desktop-popup-content .nj-sede-switcher,
	.ast-mobile-header-content .nj-sede-switcher {
		--nj-trigger-color: #1b2a49;
		--sede-trigger-color: #1b2a49;
	}

	#ast-mobile-popup .nj-sede-switcher-item,
	#ast-mobile-popup .nj-currency-switcher-item,
	#ast-mobile-popup .nj-offcanvas-action-item,
	.ast-mobile-popup-content .nj-sede-switcher-item,
	.ast-mobile-popup-content .nj-currency-switcher-item,
	.ast-mobile-popup-content .nj-offcanvas-action-item,
	.ast-mobile-header-content .nj-sede-switcher-item,
	.ast-mobile-header-content .nj-currency-switcher-item,
	.ast-mobile-header-content .nj-offcanvas-action-item,
	.nj-offcanvas-menu-shell .nj-sede-switcher-item,
	.nj-offcanvas-menu-shell .nj-currency-switcher-item,
	.nj-offcanvas-menu-shell .nj-offcanvas-action-item {
		display: list-item !important;
		visibility: visible !important;
	}

	#ast-mobile-popup .nj-sede-switcher-item > .nj-sede-switcher__trigger,
	#ast-mobile-popup .nj-currency-switcher-item > .nj-currency-switcher__trigger,
	.ast-mobile-header-content .nj-sede-switcher-item > .nj-sede-switcher__trigger,
	.ast-mobile-header-content .nj-currency-switcher-item > .nj-currency-switcher__trigger,
	.ast-mobile-header-content .nj-sede-switcher__trigger,
	#ast-mobile-popup .nj-currency-switcher__trigger,
	#ast-mobile-popup .farmacia-login-popup__open,
	#ast-mobile-popup .wp-block-farmacia-login-popup .farmacia-login-popup__open,
	#ast-mobile-popup .nj-header-builder-action .nj-sede-switcher__trigger,
	#ast-mobile-popup .nj-header-builder-action .nj-currency-switcher__trigger,
	#ast-mobile-popup .nj-header-builder-action .farmacia-login-popup__open,
	.ast-mobile-header-content .nj-currency-switcher__trigger,
	.ast-mobile-header-content .farmacia-login-popup__open,
	.ast-mobile-header-content .wp-block-farmacia-login-popup .farmacia-login-popup__open,
	.ast-mobile-header-content .nj-header-builder-action .nj-sede-switcher__trigger,
	.ast-mobile-header-content .nj-header-builder-action .nj-currency-switcher__trigger,
	.ast-mobile-header-content .nj-header-builder-action .farmacia-login-popup__open,
	.ast-mobile-popup-content .nj-sede-switcher-item > .nj-sede-switcher__trigger,
	.ast-mobile-popup-content .nj-currency-switcher-item > .nj-currency-switcher__trigger,
	.ast-mobile-popup-content .nj-sede-switcher__trigger,
	.ast-mobile-popup-content .nj-currency-switcher__trigger,
	.ast-mobile-popup-content .farmacia-login-popup__open,
	.ast-mobile-popup-content .wp-block-farmacia-login-popup .farmacia-login-popup__open,
	.ast-mobile-popup-content .nj-header-builder-action .nj-sede-switcher__trigger,
	.ast-mobile-popup-content .nj-header-builder-action .nj-currency-switcher__trigger,
	.ast-mobile-popup-content .nj-header-builder-action .farmacia-login-popup__open,
	.ast-mobile-popup-content .nj-offcanvas-action-menu .nj-sede-switcher__trigger,
	.ast-mobile-popup-content .nj-offcanvas-action-menu .nj-currency-switcher__trigger,
	.ast-mobile-popup-content .nj-offcanvas-action-menu .farmacia-login-popup__open,
	.ast-desktop-popup-content .nj-sede-switcher__trigger,
	.ast-desktop-popup-content .nj-currency-switcher__trigger,
	.ast-desktop-popup-content .farmacia-login-popup__open,
	.ast-desktop-popup-content .wp-block-farmacia-login-popup .farmacia-login-popup__open,
	.ast-desktop-popup-content .nj-header-builder-action .nj-sede-switcher__trigger,
	.ast-desktop-popup-content .nj-header-builder-action .nj-currency-switcher__trigger,
	.ast-desktop-popup-content .nj-header-builder-action .farmacia-login-popup__open {
		display: flex !important;
		width: 100% !important;
		background: #ffffff !important;
		background-color: #ffffff !important;
		color: #1b2a49 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
	}

	#ast-mobile-popup .nj-sede-switcher-item > .nj-sede-switcher__label,
	#ast-mobile-popup .nj-sede-switcher__label,
	#ast-mobile-popup .nj-currency-switcher__label,
	#ast-mobile-popup .farmacia-login-popup__open-text,
	.ast-mobile-popup-content .nj-sede-switcher-item > .nj-sede-switcher__label,
	.ast-mobile-popup-content .nj-sede-switcher__label,
	.ast-mobile-popup-content .nj-currency-switcher__label,
	.ast-mobile-popup-content .farmacia-login-popup__open-text,
	.ast-mobile-header-content .nj-sede-switcher__label,
	.ast-mobile-header-content .nj-currency-switcher__label,
	.ast-mobile-header-content .farmacia-login-popup__open-text,
	.ast-desktop-popup-content .nj-sede-switcher__label,
	.ast-desktop-popup-content .nj-currency-switcher__label,
	.ast-desktop-popup-content .farmacia-login-popup__open-text {
		color: #1b2a49 !important;
	}

	.is-offcanvas-menu-trigger .nj-mobile-menu-label {
		display: inline;
		white-space: normal;
		text-align: left;
	}

	.is-offcanvas-menu-trigger .nj-desktop-menu-label {
		display: none !important;
	}

	#ast-mobile-popup .nj-sede-switcher__trigger:hover,
	#ast-mobile-popup .nj-sede-switcher__trigger:focus-visible,
	#ast-mobile-popup .nj-currency-switcher__trigger:hover,
	#ast-mobile-popup .nj-currency-switcher__trigger:focus-visible,
	#ast-mobile-popup .farmacia-login-popup__open:hover,
	#ast-mobile-popup .farmacia-login-popup__open:focus-visible,
	.ast-mobile-popup-content .nj-sede-switcher__trigger:hover,
	.ast-mobile-popup-content .nj-sede-switcher__trigger:focus-visible,
	.ast-mobile-popup-content .nj-currency-switcher__trigger:hover,
	.ast-mobile-popup-content .nj-currency-switcher__trigger:focus-visible,
	.ast-mobile-popup-content .farmacia-login-popup__open:hover,
	.ast-mobile-popup-content .farmacia-login-popup__open:focus-visible,
	.ast-desktop-popup-content .nj-sede-switcher__trigger:hover,
	.ast-desktop-popup-content .nj-sede-switcher__trigger:focus-visible,
	.ast-desktop-popup-content .nj-currency-switcher__trigger:hover,
	.ast-desktop-popup-content .nj-currency-switcher__trigger:focus-visible,
	.ast-desktop-popup-content .farmacia-login-popup__open:hover,
	.ast-desktop-popup-content .farmacia-login-popup__open:focus-visible {
		background: #ffffff !important;
		background-color: #ffffff !important;
		color: #1b2a49 !important;
	}

	#ast-mobile-popup .nj-sede-switcher__icon-circle,
	#ast-mobile-popup .nj-currency-switcher__icon-circle,
	#ast-mobile-popup .farmacia-login-popup__open-icon,
	#ast-mobile-popup .nj-sede-switcher__caret,
	#ast-mobile-popup .nj-currency-switcher__caret,
	#ast-mobile-popup .farmacia-login-popup__open-caret,
	.ast-mobile-popup-content .nj-sede-switcher__icon-circle,
	.ast-mobile-popup-content .nj-currency-switcher__icon-circle,
	.ast-mobile-popup-content .farmacia-login-popup__open-icon,
	.ast-mobile-popup-content .nj-sede-switcher__caret,
	.ast-mobile-popup-content .nj-currency-switcher__caret,
	.ast-mobile-popup-content .farmacia-login-popup__open-caret,
	.ast-mobile-header-content .nj-sede-switcher__icon-circle,
	.ast-mobile-header-content .nj-currency-switcher__icon-circle,
	.ast-mobile-header-content .farmacia-login-popup__open-icon,
	.ast-mobile-header-content .nj-sede-switcher__caret,
	.ast-mobile-header-content .nj-currency-switcher__caret,
	.ast-mobile-header-content .farmacia-login-popup__open-caret,
	.ast-desktop-popup-content .nj-sede-switcher__icon-circle,
	.ast-desktop-popup-content .nj-currency-switcher__icon-circle,
	.ast-desktop-popup-content .farmacia-login-popup__open-icon,
	.ast-desktop-popup-content .nj-sede-switcher__caret,
	.ast-desktop-popup-content .nj-currency-switcher__caret,
	.ast-desktop-popup-content .farmacia-login-popup__open-caret,
	.nj-offcanvas-menu-shell .nj-sede-switcher__icon-circle,
	.nj-offcanvas-menu-shell .nj-currency-switcher__icon-circle,
	.nj-offcanvas-menu-shell .farmacia-login-popup__open-icon,
	.nj-offcanvas-menu-shell .nj-sede-switcher__caret,
	.nj-offcanvas-menu-shell .nj-currency-switcher__caret,
	.nj-offcanvas-menu-shell .farmacia-login-popup__open-caret {
		display: none !important;
	}

	/* Alineación y padding igual que los ítems del menú móvil nativo. */
	.ast-mobile-header-content .nj-offcanvas-menu-shell,
	.ast-mobile-header-content .nj-offcanvas-action-menu,
	#ast-mobile-popup .nj-offcanvas-menu-shell,
	#ast-mobile-popup .nj-offcanvas-action-menu,
	.ast-mobile-popup-content .nj-offcanvas-menu-shell,
	.ast-mobile-popup-content .nj-offcanvas-action-menu {
		margin: 0 !important;
		padding: 0 !important;
	}

	.ast-mobile-header-content .main-header-menu > .menu-item > .menu-link,
	.ast-mobile-header-content .nj-offcanvas-action-menu > .menu-item > .menu-link,
	.ast-mobile-header-content .nj-offcanvas-action-item > .nj-sede-switcher__trigger,
	.ast-mobile-header-content .nj-offcanvas-action-item > .nj-currency-switcher__trigger,
	.ast-mobile-header-content .nj-offcanvas-action-item .farmacia-login-popup__open,
	.ast-mobile-header-content .nj-sede-switcher__trigger,
	.ast-mobile-header-content .nj-currency-switcher__trigger,
	.ast-mobile-header-content .farmacia-login-popup__open,
	#ast-mobile-popup .main-header-menu > .menu-item > .menu-link,
	#ast-mobile-popup .nj-offcanvas-action-menu > .menu-item > .menu-link,
	#ast-mobile-popup .nj-offcanvas-action-item > .nj-sede-switcher__trigger,
	#ast-mobile-popup .nj-offcanvas-action-item > .nj-currency-switcher__trigger,
	#ast-mobile-popup .nj-offcanvas-action-item .farmacia-login-popup__open,
	.ast-mobile-popup-content .main-header-menu > .menu-item > .menu-link,
	.ast-mobile-popup-content .nj-offcanvas-action-menu > .menu-item > .menu-link,
	.ast-mobile-popup-content .nj-offcanvas-action-item > .nj-sede-switcher__trigger,
	.ast-mobile-popup-content .nj-offcanvas-action-item > .nj-currency-switcher__trigger,
	.ast-mobile-popup-content .nj-offcanvas-action-item .farmacia-login-popup__open {
		display: flex !important;
		align-items: center !important;
		justify-content: flex-start !important;
		gap: 0 !important;
		width: 100% !important;
		min-height: 2.75rem !important;
		margin: 0 !important;
		padding: 0.75em 1.25em !important;
		box-sizing: border-box !important;
		text-align: left !important;
	}

	.ast-mobile-header-content .nj-offcanvas-action-item.nj-login-popup-item,
	#ast-mobile-popup .nj-offcanvas-action-item.nj-login-popup-item,
	.ast-mobile-popup-content .nj-offcanvas-action-item.nj-login-popup-item,
	.nj-offcanvas-menu-shell .nj-offcanvas-action-item.nj-login-popup-item {
		margin: 0 !important;
		padding: 0 !important;
	}

	.ast-mobile-header-content .nj-offcanvas-action-item .farmacia-login-popup,
	.ast-mobile-header-content .nj-offcanvas-action-item .farmacia-login-popup__open-wrap,
	#ast-mobile-popup .nj-offcanvas-action-item .farmacia-login-popup,
	#ast-mobile-popup .nj-offcanvas-action-item .farmacia-login-popup__open-wrap,
	.ast-mobile-popup-content .nj-offcanvas-action-item .farmacia-login-popup,
	.ast-mobile-popup-content .nj-offcanvas-action-item .farmacia-login-popup__open-wrap {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	.ast-mobile-header-content .farmacia-login-popup.nj-offcanvas-menu-control.wp-block-farmacia-login-popup,
	#ast-mobile-popup .farmacia-login-popup.nj-offcanvas-menu-control.wp-block-farmacia-login-popup,
	.ast-mobile-popup-content .farmacia-login-popup.nj-offcanvas-menu-control.wp-block-farmacia-login-popup,
	.nj-offcanvas-menu-shell .farmacia-login-popup.nj-offcanvas-menu-control.wp-block-farmacia-login-popup {
		display: block !important;
		align-items: stretch !important;
		width: 100% !important;
		max-width: none !important;
		margin: 0 !important;
		padding: 0 !important;
		gap: 0 !important;
		text-align: left !important;
	}

	.farmacia-login-popup.nj-offcanvas-menu-control .farmacia-login-popup__open-wrap,
	.farmacia-login-popup.nj-offcanvas-menu-control .farmacia-login-popup__open-wrap--logged,
	.farmacia-login-popup.nj-offcanvas-menu-control [class*="is-offcanvas-menu-trigger-wrap"] {
		display: block !important;
		width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
		min-height: 0 !important;
		background: transparent !important;
		border: 0 !important;
		box-shadow: none !important;
	}

	.farmacia-login-popup.nj-offcanvas-menu-control .farmacia-login-popup__open-text,
	.farmacia-login-popup.nj-offcanvas-menu-control [class*="is-offcanvas-menu-trigger-text"] {
		display: inline !important;
		margin: 0 !important;
		padding: 0 !important;
		background: transparent !important;
	}

	.farmacia-login-popup.nj-offcanvas-menu-control .farmacia-login-popup__open,
	.farmacia-login-popup.nj-offcanvas-menu-control .farmacia-login-popup__open-wrap--logged .farmacia-login-popup__open {
		display: flex !important;
		align-items: center !important;
		justify-content: flex-start !important;
		gap: 0 !important;
		width: 100% !important;
		min-height: 2.75rem !important;
		margin: 0 !important;
		padding: 0.75em 1.25em !important;
		border-radius: 0 !important;
		box-sizing: border-box !important;
		text-align: left !important;
	}

	.farmacia-login-popup.nj-offcanvas-menu-control .farmacia-login-popup__open-text {
		max-width: none !important;
		flex: 1 1 auto !important;
		text-align: left !important;
	}

	.farmacia-login-popup.nj-offcanvas-menu-control .farmacia-login-popup__open-icon,
	.farmacia-login-popup.nj-offcanvas-menu-control .farmacia-login-popup__open-icon svg,
	.farmacia-login-popup.nj-offcanvas-menu-control .farmacia-login-popup__open.is-offcanvas-menu-trigger-icon,
	.farmacia-login-popup.nj-offcanvas-menu-control .farmacia-login-popup__open.menu-link.is-offcanvas-menu-trigger-icon {
		display: none !important;
		width: 0 !important;
		height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: hidden !important;
	}

	/* El dialog reserva ~689px de alto en el flex del bloque aunque esté cerrado. */
	.farmacia-login-popup.nj-offcanvas-menu-control .farmacia-login-popup__dialog:not([open]) {
		display: none !important;
		position: absolute !important;
		width: 0 !important;
		height: 0 !important;
		min-height: 0 !important;
		max-height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		border: 0 !important;
		overflow: hidden !important;
		visibility: hidden !important;
		pointer-events: none !important;
	}

	.farmacia-login-popup.nj-offcanvas-menu-control .farmacia-login-popup__dialog[open] {
		display: block !important;
		position: fixed !important;
		width: min(100vw - 2rem, 739px) !important;
		height: min(90vh, 689px) !important;
		max-height: 689px !important;
		min-height: 0 !important;
		margin: auto !important;
		visibility: visible !important;
		pointer-events: auto !important;
	}

	.ast-mobile-header-content .nj-sede-switcher__label,
	.ast-mobile-header-content .nj-currency-switcher__label,
	.ast-mobile-header-content .farmacia-login-popup__open-text,
	#ast-mobile-popup .nj-sede-switcher__label,
	#ast-mobile-popup .nj-currency-switcher__label,
	#ast-mobile-popup .farmacia-login-popup__open-text,
	.ast-mobile-popup-content .nj-sede-switcher__label,
	.ast-mobile-popup-content .nj-currency-switcher__label,
	.ast-mobile-popup-content .farmacia-login-popup__open-text {
		flex: 1 1 auto !important;
		min-width: 0 !important;
		text-align: left !important;
	}

	.farmacia-login-popup__watermark,
	.farmacia-login-popup__watermark--custom {
		display: none !important;
	}
}

@media (min-width: 922px) {
	.is-offcanvas-menu-trigger .nj-mobile-menu-label {
		display: none !important;
	}

	.is-offcanvas-menu-trigger .nj-desktop-menu-label {
		display: inline;
	}
}
