/**
 * Toast WooCommerce: rectangulo naranja liso (abajo izquierda).
 */

/* El aviso nativo (verde Woodmart) no se pinta hasta que el JS lo mueve al host. */
.woocommerce-notices-wrapper .woocommerce-message:not(.ls-wc-toast),
.woocommerce-notices-wrapper .woocommerce-info:not(.ls-wc-toast),
.woocommerce-notices-wrapper .woocommerce-error:not(.ls-wc-toast),
.woocommerce-notices-wrapper .woocommerce-Message:not(.ls-wc-toast) {
	display: none !important;
	animation: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

body.notifications-sticky .woocommerce-message:not(.ls-wc-toast),
body.notifications-sticky .woocommerce-info:not(.ls-wc-toast),
body.notifications-sticky .woocommerce-error:not(.ls-wc-toast),
body.notifications-sticky .woocommerce-Message:not(.ls-wc-toast) {
	animation: none !important;
	transform: translate3d(0, 200%, 0) !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

body.notifications-sticky .woocommerce-form-coupon-toggle .woocommerce-info,
body.notifications-sticky .woocommerce-form-login-toggle .woocommerce-info,
body.notifications-sticky .login-form-side .woocommerce-info,
body.notifications-sticky .login-form-side .woocommerce-error,
body.notifications-sticky .login-form-side .woocommerce-message,
body.notifications-sticky form.checkout_coupon .woocommerce-error,
body.notifications-sticky form.woocommerce-form-login .woocommerce-error,
body.notifications-sticky form.woocommerce-form-login .woocommerce-message,
body.notifications-sticky .mfp-content .woocommerce-message,
body.notifications-sticky .mfp-content .woocommerce-info,
body.notifications-sticky .mfp-content .woocommerce-error,
body.notifications-sticky .wd-popup .woocommerce-message,
body.notifications-sticky .widget_shopping_cart .woocommerce-message,
body.notifications-sticky .woocommerce-MyAccount-content .woocommerce-message,
body.notifications-sticky .woocommerce-MyAccount-content .woocommerce-info,
body.notifications-sticky .woocommerce-MyAccount-content .woocommerce-error,
body.notifications-sticky .woocommerce-MyAccount-content .woocommerce-Message {
	display: flex !important;
	visibility: visible !important;
	animation: none !important;
	transform: none !important;
	pointer-events: auto !important;
}

#ls-wc-notice-host {
	position: fixed;
	left: max(20px, env(safe-area-inset-left));
	bottom: max(20px, env(safe-area-inset-bottom));
	z-index: 100080;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	width: min(380px, calc(100vw - 40px));
	pointer-events: none;
}

#ls-wc-notice-host .ls-wc-toast {
	pointer-events: auto;
	position: relative;
	display: flex;
	visibility: visible !important;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0 !important;
	padding: 20px 48px 20px 22px !important;
	min-height: 72px !important;
	color: var(--btn-accented-color, #fff) !important;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
	text-align: left;
	/* Mismo naranja que "Anadir al carrito" (Woodmart: --btn-accented-bgcolor). */
	background: var(--btn-accented-bgcolor, #fe9a0c) !important;
	border: 0 !important;
	border-radius: 28px;
	cursor: default;
	transform: none !important;
	animation: ls-wc-toast-in 0.32s ease both;
}

#ls-wc-notice-host .ls-wc-toast.ls-wc-toast-out {
	animation: ls-wc-toast-out 0.22s ease forwards;
}

#ls-wc-notice-host .woocommerce-message.ls-wc-toast,
#ls-wc-notice-host .woocommerce-Message.ls-wc-toast,
#ls-wc-notice-host .wc-block-components-notice-banner.is-success.ls-wc-toast,
#ls-wc-notice-host .woocommerce-info.ls-wc-toast,
#ls-wc-notice-host .wc-block-components-notice-banner.is-info.ls-wc-toast {
	background: var(--btn-accented-bgcolor, #fe9a0c) !important;
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

#ls-wc-notice-host .woocommerce-error.ls-wc-toast,
#ls-wc-notice-host .wc-block-components-notice-banner.is-error.ls-wc-toast {
	background: #d63b2a !important;
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

/* Quitar iconos Woodmart. */
#ls-wc-notice-host .ls-wc-toast:before,
#ls-wc-notice-host .ls-wc-toast::before,
#ls-wc-notice-host .ls-wc-toast:after,
#ls-wc-notice-host .ls-wc-toast::after {
	content: none !important;
	display: none !important;
}

#ls-wc-notice-host .ls-wc-toast a {
	color: #fff !important;
	text-decoration: underline;
	text-underline-offset: 2px;
}

#ls-wc-notice-host .ls-wc-toast a:hover {
	color: #fff4e8 !important;
}

#ls-wc-notice-host .ls-wc-toast .amount {
	color: #fff !important;
}

#ls-wc-notice-host .ls-wc-toast p {
	margin: 0;
}

#ls-wc-notice-host .ls-wc-toast li {
	display: block;
	margin: 0;
	list-style: none;
}

#ls-wc-notice-host .ls-wc-toast :is(.button, .wc-forward, .wc-backward) {
	order: 2;
	display: inline-flex;
	align-items: center;
	margin: 6px 0 0;
	padding: 6px 14px !important;
	min-height: 0;
	border: 2px solid rgba(255, 255, 255, 0.95) !important;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12) !important;
	color: #fff !important;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none !important;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

#ls-wc-notice-host .ls-wc-toast :is(.button, .wc-forward, .wc-backward):hover {
	background: #fff !important;
	color: var(--btn-accented-bgcolor, #fe9a0c) !important;
	border-color: #fff !important;
	box-shadow: none;
}

#ls-wc-notice-host .ls-wc-toast-close {
	position: absolute !important;
	top: 8px !important;
	right: 8px !important;
	left: auto !important;
	bottom: auto !important;
	z-index: 5 !important;
	box-sizing: border-box !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex: 0 0 32px !important;
	width: 32px !important;
	height: 32px !important;
	min-width: 32px !important;
	min-height: 32px !important;
	max-width: 32px !important;
	max-height: 32px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 2px solid #fff !important;
	border-radius: 50% !important;
	aspect-ratio: 1 / 1 !important;
	overflow: hidden !important;
	background: var(--btn-accented-bgcolor, #fe9a0c) !important;
	background-image: none !important;
	color: #fff !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	font-family: Arial, Helvetica, sans-serif !important;
	text-indent: 0 !important;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35) !important;
	cursor: pointer !important;
	appearance: none !important;
	--btn-height: 32px;
}

#ls-wc-notice-host .ls-wc-toast-close:hover,
#ls-wc-notice-host .ls-wc-toast-close:focus {
	background: var(--btn-accented-bgcolor-hover, #f86511) !important;
	color: #fff !important;
	outline: 2px solid #fff !important;
	outline-offset: 1px !important;
}

@keyframes ls-wc-toast-in {
	from {
		opacity: 0;
		transform: translate3d(0, 14px, 0);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes ls-wc-toast-out {
	to {
		opacity: 0;
		transform: translate3d(0, 10px, 0);
	}
}

@media (max-width: 600px) {
	#ls-wc-notice-host {
		width: calc(100vw - 28px);
		left: 14px;
		bottom: max(14px, env(safe-area-inset-bottom));
	}

	#ls-wc-notice-host .ls-wc-toast {
		font-size: 14px;
		min-height: 64px !important;
		padding: 16px 42px 16px 18px !important;
		border-radius: 24px;
	}
}
