/**
 * WooCommerce notices → toasts Everything Flamenco
 */
:root {
	--ef-toast-yellow: var(--ef-yellow, #ffd71f);
	--ef-toast-gold: var(--ef-gold, #f4bd16);
	--ef-toast-red: var(--ef-red, #e01020);
	--ef-toast-cream: var(--ef-cream, #faf0e6);
	--ef-toast-ink: var(--ef-ink, #281e1e);
	--ef-toast-muted: var(--ef-muted, #69727d);
	--ef-toast-line: var(--ef-line, #cfcfcf);
	--ef-toast-top: 96px;
	--ef-toast-bottom-bar: 64px;
}

/* Contenedor flotante */
.ef-toast-stack {
	position: fixed;
	top: var(--ef-toast-top);
	right: 24px;
	z-index: 100050;
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 420px;
	max-width: calc(100vw - 48px);
	pointer-events: none;
}

.ef-toast-stack > * {
	pointer-events: auto;
}

/* Toast / notice base */
.ef-toast,
.ef-notice--inline.woocommerce-message,
.ef-notice--inline.woocommerce-info,
.ef-notice--inline.woocommerce-error {
	position: relative;
	display: flex !important;
	align-items: flex-start;
	gap: 12px;
	width: 100%;
	margin: 0 !important;
	padding: 16px !important;
	background: #fff !important;
	border: 1px solid var(--ef-toast-line) !important;
	border-left: 4px solid var(--ef-toast-gold) !important;
	border-radius: 0 !important;
	box-shadow: 0 8px 24px rgba(40, 30, 30, 0.14);
	color: var(--ef-toast-ink) !important;
	font-family: Manrope, Arial, sans-serif !important;
	font-size: 14px !important;
	line-height: 1.45 !important;
	list-style: none !important;
	overflow: hidden;
	box-sizing: border-box;
}

.ef-toast.woocommerce-info,
.ef-notice--inline.woocommerce-info {
	border-left-color: var(--ef-toast-ink) !important;
}

.ef-toast.woocommerce-error,
.ef-notice--inline.woocommerce-error {
	border-left-color: var(--ef-toast-red) !important;
}

/* Oculta iconos/pseudos nativos de Woo */
.ef-toast::before,
.ef-toast::after,
.ef-notice--inline.woocommerce-message::before,
.ef-notice--inline.woocommerce-info::before,
.ef-notice--inline.woocommerce-error::before {
	display: none !important;
	content: none !important;
}

.ef-toast__icon {
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	display: grid;
	place-items: center;
	background: var(--ef-toast-yellow);
	color: var(--ef-toast-ink);
}

.ef-toast.woocommerce-info .ef-toast__icon,
.ef-notice--inline.woocommerce-info .ef-toast__icon {
	background: var(--ef-toast-cream);
	color: var(--ef-toast-ink);
}

.ef-toast.woocommerce-error .ef-toast__icon,
.ef-notice--inline.woocommerce-error .ef-toast__icon {
	background: var(--ef-toast-red);
	color: #fff;
}

.ef-toast__icon svg {
	display: block;
	width: 18px;
	height: 18px;
}

.ef-toast__body {
	flex: 1 1 auto;
	min-width: 0;
	padding-right: 24px;
}

.ef-toast__text,
.ef-toast__body > .ef-toast__text {
	margin: 0;
}

.ef-toast__text ul,
.ef-notice--inline.woocommerce-error {
	margin: 0;
	padding-left: 16px;
}

.ef-toast__text li,
.ef-notice--inline.woocommerce-error li {
	margin: 0 0 4px;
}

.ef-toast__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.ef-toast__actions .button,
.ef-toast .button,
.ef-notice--inline .button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	height: 40px !important;
	min-height: 40px !important;
	padding: 0 16px !important;
	margin: 0 !important;
	float: none !important;
	background: var(--ef-toast-gold) !important;
	color: var(--ef-toast-ink) !important;
	border: 0 !important;
	border-radius: 0 !important;
	font-family: Manrope, Arial, sans-serif !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em;
	text-transform: uppercase !important;
	text-decoration: none !important;
	line-height: 1 !important;
	box-shadow: none !important;
}

.ef-toast__actions .button:hover,
.ef-toast .button:hover,
.ef-notice--inline .button:hover {
	background: var(--ef-toast-yellow) !important;
	color: var(--ef-toast-ink) !important;
}

.ef-toast__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 32px;
	height: 32px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ef-toast-ink);
	cursor: pointer;
	line-height: 0;
}

.ef-toast__close:hover,
.ef-toast__close:focus-visible {
	background: var(--ef-toast-cream);
	outline: none;
}

.ef-toast__close svg {
	width: 14px;
	height: 14px;
	display: block;
}

.ef-toast__bar {
	position: absolute;
	left: -4px;
	bottom: -1px;
	height: 3px;
	width: 100%;
	transform-origin: left center;
	transform: scaleX(1);
	background: var(--ef-toast-ink);
	pointer-events: none;
}

.ef-toast.is-autohide .ef-toast__bar {
	animation: ef-toast-bar 6s linear forwards;
}

.ef-toast.is-paused .ef-toast__bar {
	animation-play-state: paused;
}

@keyframes ef-toast-bar {
	from { transform: scaleX(1); }
	to { transform: scaleX(0); }
}

/* Entrada */
.ef-toast.is-enter {
	animation: ef-toast-in 200ms ease-out;
}

@keyframes ef-toast-in {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ef-toast.is-enter,
	.ef-toast.is-autohide .ef-toast__bar {
		animation: none !important;
	}
}

/* Inline en cart/checkout (errores de validación, toggles login/cupón) */
.ef-notice--inline {
	margin: 0 0 16px !important;
	max-width: 100%;
	box-shadow: none;
}

.ef-notice--error-wrap {
	list-style: none !important;
}

.ef-notice--error-wrap > .ef-toast__text {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0;
	margin: 0;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

.woocommerce-form-login-toggle .woocommerce-info,
.woocommerce-form-coupon-toggle .woocommerce-info {
	/* se estiliza vía .ef-notice--inline al procesar */
}

/* Evita salto de layout: wrappers vacíos sin altura */
.woocommerce-notices-wrapper:empty,
.woocommerce-NoticeGroup:empty {
	display: none !important;
}

/* Mientras flota, el sitio original no debe ocupar espacio */
.woocommerce-notices-wrapper .ef-toast-moved,
.woocommerce-NoticeGroup .ef-toast-moved {
	display: none !important;
}

@media (max-width: 767px) {
	.ef-toast-stack {
		top: auto;
		right: 12px;
		left: 12px;
		bottom: calc(var(--ef-toast-bottom-bar) + 12px);
		width: auto;
		max-width: none;
	}

	@keyframes ef-toast-in {
		from {
			opacity: 0;
			transform: translateY(12px);
		}
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}
}
