/**
 * Notificaciones WooCommerce flotantes
 * Estilo: esquina inferior derecha, apiladas hacia arriba, animaciones elegantes.
 * Objetos: .woocommerce-notices-wrapper, .woocommerce-NoticeGroup-checkout, .woocommerce-message, .woocommerce-error, .woocommerce-info
 */

/* Contenedor flotante - carrito, tienda, etc. */
.woocommerce-notices-wrapper,
/* Checkout: usa NoticeGroup en lugar de notices-wrapper */
.woocommerce-NoticeGroup-checkout,
.woocommerce-NoticeGroup-updateOrderReview {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	gap: 12px;
	pointer-events: none;
}

.woocommerce-notices-wrapper > *,
.woocommerce-NoticeGroup-checkout > *,
.woocommerce-NoticeGroup-updateOrderReview > * {
	pointer-events: auto;
}

/* Ocultar cuando está vacío */
.woocommerce-notices-wrapper:empty,
.woocommerce-NoticeGroup-checkout:empty,
.woocommerce-NoticeGroup-updateOrderReview:empty {
	display: none !important;
}

/* Base común para todos los tipos */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-NoticeGroup-checkout .woocommerce-message,
.woocommerce-NoticeGroup-checkout .woocommerce-info,
.woocommerce-NoticeGroup-checkout .woocommerce-error,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-message,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-info,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-error {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 20px;
	min-width: 0;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
	position: relative;
	overflow: hidden;
	animation: puntos-ya-notice-slide-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
	transform-origin: bottom;
	list-style: none;
	margin: 0;
}

/* Icono vía ::before */
.woocommerce-notices-wrapper .woocommerce-message::before,
.woocommerce-notices-wrapper .woocommerce-info::before,
.woocommerce-notices-wrapper .woocommerce-error::before,
.woocommerce-NoticeGroup-checkout .woocommerce-message::before,
.woocommerce-NoticeGroup-checkout .woocommerce-info::before,
.woocommerce-NoticeGroup-checkout .woocommerce-error::before,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-message::before,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-info::before,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-error::before {
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	font-size: 1.25rem;
	flex-shrink: 0;
	margin-top: 2px;
	line-height: 1.5;
}

/* Tipo Success - .woocommerce-message */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-NoticeGroup-checkout .woocommerce-message,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-message {
	background: linear-gradient(135deg, #ffffff 0%, #f8fdf9 100%);
	border: 1px solid rgba(15, 131, 77, 0.2);
}

.woocommerce-notices-wrapper .woocommerce-message::before,
.woocommerce-NoticeGroup-checkout .woocommerce-message::before,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-message::before {
	content: "\f058";
	color: #0f834d;
}

/* Tipo Error - .woocommerce-error (ul con li) */

/* Carrito/tienda: un solo card con varios li */
.woocommerce-notices-wrapper .woocommerce-error {
	background: linear-gradient(135deg, #ffffff 0%, #fff8f8 100%);
	border: 1px solid rgba(179, 45, 46, 0.2);
	padding-left: 48px;
}

.woocommerce-notices-wrapper .woocommerce-error::before {
	content: "\f06a";
	color: #b32d2e;
	position: absolute;
	left: 20px;
	top: 16px;
	margin-top: 0;
}

.woocommerce-notices-wrapper .woocommerce-error li {
	list-style: none;
	margin: 0;
	padding: 0;
	color: #333;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.woocommerce-notices-wrapper .woocommerce-error li + li {
	margin-top: 6px;
}

/* Checkout: cada li como tarjeta independiente */
.woocommerce-NoticeGroup-checkout .woocommerce-error,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-error {
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: none;
	border: none;
	padding: 0;
	min-width: 0;
	box-shadow: none;
	animation: none;
}

.woocommerce-NoticeGroup-checkout .woocommerce-error::before,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-error::before {
	display: none;
}

.woocommerce-NoticeGroup-checkout .woocommerce-error li,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-error li {
	display: flex;
	align-items: center;
	gap: 14px;
	list-style: none;
	margin: 0;
	padding: 16px 20px;
	padding-left: 48px;
	color: #333;
	font-size: 0.9375rem;
	line-height: 1.5;
	background: linear-gradient(135deg, #ffffff 0%, #fff8f8 100%);
	border: 1px solid rgba(179, 45, 46, 0.2);
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
	position: relative;
	overflow: hidden;
	animation: puntos-ya-notice-slide-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
	transform-origin: bottom;
}

.woocommerce-NoticeGroup-checkout .woocommerce-error li::before,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-error li::before {
	content: "\f06a";
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	font-size: 1.25rem;
	color: #b32d2e;
	position: absolute;
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
	line-height: 1;
}

.woocommerce-NoticeGroup-checkout .woocommerce-error li + li,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-error li + li {
	margin-top: 0;
}

/* Tipo Notice/Info - .woocommerce-info */
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-NoticeGroup-checkout .woocommerce-info,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-info {
	background: linear-gradient(135deg, #ffffff 0%, #f4f8fc 100%);
	border: 1px solid rgba(34, 113, 177, 0.2);
}

.woocommerce-notices-wrapper .woocommerce-info::before,
.woocommerce-NoticeGroup-checkout .woocommerce-info::before,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-info::before {
	content: "\f05a";
	color: #2271b1;
}

/* Contenido del mensaje */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-NoticeGroup-checkout .woocommerce-message,
.woocommerce-NoticeGroup-checkout .woocommerce-info,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-message,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-info {
	color: #333;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.woocommerce-notices-wrapper .woocommerce-message a,
.woocommerce-notices-wrapper .woocommerce-info a,
.woocommerce-notices-wrapper .woocommerce-error a,
.woocommerce-NoticeGroup-checkout .woocommerce-message a,
.woocommerce-NoticeGroup-checkout .woocommerce-info a,
.woocommerce-NoticeGroup-checkout .woocommerce-error a,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-message a,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-info a,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-error a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.woocommerce-notices-wrapper .woocommerce-message a:hover,
.woocommerce-notices-wrapper .woocommerce-info a:hover,
.woocommerce-notices-wrapper .woocommerce-error a:hover,
.woocommerce-NoticeGroup-checkout .woocommerce-message a:hover,
.woocommerce-NoticeGroup-checkout .woocommerce-info a:hover,
.woocommerce-NoticeGroup-checkout .woocommerce-error a:hover,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-message a:hover,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-info a:hover,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-error a:hover {
	opacity: 0.85;
}

/* Restore-item / Undo */
.woocommerce-notices-wrapper .restore-item {
	font-weight: 500;
}

/* Animación de entrada */
@keyframes puntos-ya-notice-slide-in {
	from {
		opacity: 0;
		transform: translateY(40px) scale(0.95);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* Animación de salida */
.puntos-ya-notice-dismissing {
	animation: puntos-ya-notice-slide-out 0.4s cubic-bezier(0.36, 0, 0.66, -0.56) forwards !important;
	pointer-events: none !important;
}

@keyframes puntos-ya-notice-slide-out {
	from {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
	to {
		opacity: 0;
		transform: translateY(30px) scale(0.95);
	}
}

/* Botón cerrar en notificaciones (inyectado por JS) */
.puntos-ya-notice-close {
	background: none;
	border: none;
	color: #666;
	cursor: pointer;
	padding: 4px;
	margin-left: 4px;
	opacity: 0.6;
	transition: opacity 0.2s;
	flex-shrink: 0;
}

.puntos-ya-notice-close:hover {
	opacity: 1;
	color: #333;
}

/* Barra de progreso para auto-dismiss */
.puntos-ya-notice-progress {
	position: absolute;
	bottom: 0;
	left: 0;
	height: 3px;
	background: rgba(0, 0, 0, 0.1);
	width: 100%;
	border-radius: 0 0 12px 12px;
	overflow: hidden;
}

.puntos-ya-notice-progress-bar {
	height: 100%;
	animation: puntos-ya-shrink-bar 5s linear forwards;
}

.woocommerce-message .puntos-ya-notice-progress-bar,
.woocommerce-info .puntos-ya-notice-progress-bar {
	background: #0f834d;
}

.woocommerce-error .puntos-ya-notice-progress-bar,
.woocommerce-error li .puntos-ya-notice-progress-bar {
	background: #b32d2e;
}

@keyframes puntos-ya-shrink-bar {
	from { width: 100%; }
	to { width: 0%; }
}
