/**
 * Dropdown de notificaciones en el header.
 */

.farmacia-notifications-header {
	position: relative;
	display: inline-flex;
	align-items: center;
	z-index: 1;
	font-family: inherit;
}

/* Puente invisible entre el botón y el panel (evita cierre al cruzar el hueco). */
.farmacia-notifications-header::after {
	content: "";
	position: absolute;
	top: 100%;
	inset-inline-end: 0;
	width: min(420px, calc(100vw - 24px));
	height: 32px;
	pointer-events: none;
}

.farmacia-notifications-header:hover::after,
.farmacia-notifications-header:has([aria-expanded="true"])::after {
	pointer-events: auto;
}

.ast-builder-layout-element .farmacia-notifications-header,
.site-header-primary-section-right .farmacia-notifications-header {
	overflow: visible;
}

.ast-header-html .farmacia-notifications-header,
.ast-builder-html-element .farmacia-notifications-header {
	overflow: visible;
}

.farmacia-notifications-header__trigger-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.farmacia-notifications-header__trigger,
.farmacia-notifications-header__trigger-wrap .wp-block-button,
.farmacia-notifications-header__trigger-wrap .wp-block-button__link,
.farmacia-notifications-header__trigger-wrap .btn-notifiaciones-header,
.farmacia-notifications-header__trigger-wrap .btn-notificaciones-header,
.farmacia-notifications-header__trigger-wrap button.btn-notifiaciones-header,
.farmacia-notifications-header__trigger-wrap button.btn-notificaciones-header {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border: 0;
	background: transparent;
	padding: 0;
	line-height: 0;
	min-width: 40px;
	min-height: 40px;
}

.farmacia-notifications-header__trigger-wrap .wp-block-button {
	margin: 0;
}

.farmacia-notifications-header__trigger:hover,
.farmacia-notifications-header__trigger:focus-visible {
	color: #dbe72f;
	outline: none;
}

.farmacia-notifications-header__bell {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	color: currentColor;
	line-height: 0;
	flex-shrink: 0;
}

.farmacia-notifications-header__bell svg {
	display: block;
	width: 24px;
	height: 24px;
	margin: auto;
	flex-shrink: 0;
}

.farmacia-notifications-header__panel-title {
	display: flex;
	align-items: center;
	gap: 8px;
}

.farmacia-notifications-header__panel-title .farmacia-notifications-header__bell {
	width: auto;
	height: auto;
}

.farmacia-notifications-header__panel-title .farmacia-notifications-header__bell svg {
	width: 22px;
	height: 22px;
}

.farmacia-notifications-header__badge {
	position: absolute;
	top: -2px;
	inset-inline-end: -4px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: #ef4444;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	pointer-events: none;
}

.farmacia-notifications-header__panel {
	position: absolute;
	inset-inline-start: auto;
	inset-inline-end: 0;
	top: calc(100% + 28px);
	width: min(420px, calc(100vw - 24px));
	margin: 0;
	overflow: hidden;
	border-radius: 14px 0 14px 14px;
	background: #fff;
	box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
	z-index: 100020;
}

.farmacia-notifications-header__panel.is-loading::after {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.62);
	content: "";
	pointer-events: none;
	z-index: 2;
}

.farmacia-notifications-header__panel.is-loading::before {
	position: absolute;
	inset: 0;
	width: 34px;
	height: 34px;
	margin: auto;
	border: 3px solid rgba(27, 42, 73, 0.12);
	border-top-color: rgba(27, 42, 73, 0.42);
	border-radius: 50%;
	animation: farmacia-notifications-spin 0.9s linear infinite;
	content: "";
	pointer-events: none;
	z-index: 3;
}

.farmacia-notifications-header:has([aria-expanded="true"]) {
	z-index: 100015;
}

.farmacia-notifications-header__panel[hidden] {
	display: none !important;
}

.farmacia-notifications-header__panel > p:not(.farmacia-notifications-header__subhead):not(.farmacia-notifications-header__empty):empty {
	display: none;
	margin: 0;
	padding: 0;
}

.farmacia-notifications-header__panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	box-sizing: border-box;
	padding: 16px 20px;
}

.farmacia-notifications-header__panel-head br {
	display: none;
}

.farmacia-notifications-header__panel-title {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: "Nunito", "Open Sans", sans-serif;
	font-size: 20px;
	font-weight: 800;
	line-height: 1.2;
	color: #0f172a;
}

.woocommerce-js .farmacia-notifications-header__panel-title {
	margin-bottom: 0;
}

.farmacia-notifications-header__center-link {
	flex: 0 0 auto;
	margin: 0;
	margin-inline-start: auto;
	font-family: "Nunito", "Open Sans", sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	color: #047752;
	text-decoration: none;
	white-space: nowrap;
	text-align: end;
}

.farmacia-notifications-header__center-link:hover,
.farmacia-notifications-header__center-link:focus-visible {
	text-decoration: underline;
}

.farmacia-notifications-header__subhead {
	margin: 0;
	padding: 10px 20px;
	background: #dbeafe;
	font-family: "Nunito", "Open Sans", sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	color: #1e3a8a;
}

.farmacia-notifications-header__body {
	max-height: 420px;
	overflow-y: auto;
}

.farmacia-notifications-header__body[aria-busy="true"] {
	pointer-events: none;
}

.farmacia-notifications-header__empty {
	margin: 0;
	padding: 24px 20px;
	font-size: 14px;
	line-height: 1.5;
	color: #64748b;
}

.farmacia-notifications-header__list.farmacia-account-notifications__list,
ul.farmacia-notifications-header__list.farmacia-account-notifications__list,
.woocommerce-js ul.farmacia-notifications-header__list.farmacia-account-notifications__list {
	margin: 0;
	padding: 8px 12px;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.farmacia-notifications-header__list > .farmacia-account-notifications__item {
	display: block;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	list-style: none;
}

.farmacia-notifications-header__list > .farmacia-account-notifications__item.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

.farmacia-notifications-header__item {
	display: grid;
	grid-template-columns: 68px minmax(0, 1fr);
	gap: 12px 16px;
	align-items: center;
	max-height: 100px;
	box-sizing: border-box;
	padding: 12px 14px;
	overflow: hidden;
}

.farmacia-notifications-header__list > .farmacia-account-notifications__item:nth-child(odd) .farmacia-notifications-header__item {
	background: #fff;
}

.farmacia-notifications-header__list > .farmacia-account-notifications__item:nth-child(even) .farmacia-notifications-header__item {
	background: #c6d9f3;
	border-radius: 8px;
}

.farmacia-notifications-header__item .farmacia-account-notifications__thumb {
	position: relative;
	display: block;
	width: 68px;
	height: 68px;
	min-width: 68px;
	max-width: 68px;
	max-height: 68px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 6.3px 0 #00000040;
	overflow: hidden;
	flex-shrink: 0;
	padding: 0;
	margin: 0;
	line-height: 0;
}

.farmacia-notifications-header__item .farmacia-account-notifications__thumb img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.farmacia-notifications-header__item .farmacia-account-notifications__thumb-fallback {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
}

.farmacia-notifications-header__item .farmacia-account-notifications__thumb-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin: 0;
	padding: 0;
	color: #1b2a49;
	line-height: 0;
}

.farmacia-notifications-header__item .farmacia-account-notifications__thumb-icon svg {
	display: block;
	width: 23px;
	height: 23px;
	margin: 0;
	flex-shrink: 0;
}

.farmacia-notifications-header__item .farmacia-account-notifications__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	min-height: 0;
}

.farmacia-notifications-header__item .farmacia-account-notifications__body br {
	display: none;
}

.farmacia-notifications-header__item .farmacia-account-notifications__head {
	align-items: flex-start;
}

.farmacia-notifications-header__item .farmacia-account-notifications__title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.2;
	color: #0f172a;
}

.farmacia-notifications-header__item .farmacia-account-notifications__title a {
	color: inherit;
	text-decoration: none;
}

.farmacia-notifications-header__item .farmacia-account-notifications__title a:hover,
.farmacia-notifications-header__item .farmacia-account-notifications__title a:focus-visible {
	text-decoration: underline;
}

.farmacia-notifications-header__item .farmacia-account-notifications__dot {
	display: inline-block;
	flex-shrink: 0;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #22c55e;
}

.farmacia-notifications-header__item .farmacia-account-notifications__description {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.4;
	color: #64748b;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.farmacia-notifications-header__footer {
	padding: 14px 20px;
	background: #1b2a49;
	display: flex;
}

.farmacia-notifications-header__footer br {
	display: none;
}

.farmacia-notifications-header__mark-all {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.farmacia-notifications-header__mark-all:disabled {
	opacity: 0.55;
	cursor: default;
}

.farmacia-notifications-header__mark-all.is-loading {
	cursor: wait;
}

.farmacia-notifications-header__mark-all-icon {
	display: inline-flex;
	line-height: 0;
}

.farmacia-notifications-header__mark-all-icon img {
	display: block;
	width: 24px;
	height: 24px;
}

@keyframes farmacia-notifications-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 768px) {
	.farmacia-notifications-header__panel {
		inset-inline-end: -8px;
		top: calc(100% + 24px);
		width: min(360px, calc(100vw - 16px));
	}

	.farmacia-notifications-header__panel-head {
		padding: 14px 16px;
		gap: 12px;
	}

	.farmacia-notifications-header__panel-title {
		font-size: 18px;
	}

	.farmacia-notifications-header__center-link {
		font-size: 13px;
	}
}
