/* ============================================================================
   LUMALUX — AJAX Add to Cart (toast + stati pulsante)
   ============================================================================ */

/* ─── TOAST CONTAINER ────────────────────────────────────────────────────── */
#lmx-toast-container {
	position: fixed;
	top: 24px;
	right: 24px;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	gap: 10px;
	pointer-events: none;
}

.lmx-toast {
	pointer-events: auto;
	min-width: 260px;
	max-width: 380px;
	padding: 14px 22px 14px 50px;
	background: linear-gradient(180deg, #141414 0%, #0d0d0d 100%);
	color: #f5f1e6;
	font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.04em;
	border: 1px solid rgba(186, 153, 63, 0.35);
	border-left: 3px solid #BA993F;
	border-radius: 4px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
	position: relative;
	transform: translateX(120%);
	opacity: 0;
	transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.lmx-toast.is-visible {
	transform: translateX(0);
	opacity: 1;
}

.lmx-toast::before {
	content: '';
	position: absolute;
	left: 18px;
	top: 50%;
	width: 20px;
	height: 20px;
	transform: translateY(-50%);
	background: no-repeat center / contain;
}

.lmx-toast-success::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23BA993F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='8 12.5 11 15.5 16 9.5'/%3E%3C/svg%3E");
}

.lmx-toast-error {
	border-left-color: #c54a4a;
}

.lmx-toast-error::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c54a4a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='13'/%3E%3Ccircle cx='12' cy='16.5' r='0.5' fill='%23c54a4a'/%3E%3C/svg%3E");
}

/* ─── STATI PULSANTE ─────────────────────────────────────────────────────── */
a.lmx-cart-loading,
button.lmx-cart-loading {
	position: relative;
	pointer-events: none;
	opacity: 0.85;
}

a.lmx-cart-loading::after,
button.lmx-cart-loading::after {
	content: '';
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: 10px;
	vertical-align: -2px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: lmx-cart-spin 0.7s linear infinite;
}

@keyframes lmx-cart-spin {
	to { transform: rotate(360deg); }
}

a.lmx-cart-success,
button.lmx-cart-success {
	background: #BA993F !important;
	color: #0d0d0d !important;
	border-color: #BA993F !important;
	transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.lmx-cart-success-mark {
	display: inline-block;
	margin-right: 4px;
	font-weight: 700;
}

/* ─── MOBILE ────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
	#lmx-toast-container {
		top: auto;
		bottom: 18px;
		left: 14px;
		right: 14px;
	}
	.lmx-toast {
		min-width: 0;
		max-width: none;
		width: 100%;
		font-size: 14px;
	}
}

/* ─── Pulso del cart counter quando aggiornato ─────────────────────────── */
@keyframes lmx-cart-pulse {
	0%   { transform: scale(1); }
	35%  { transform: scale(1.25); }
	100% { transform: scale(1); }
}
.lmx-cart-pulse {
	animation: lmx-cart-pulse 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
