/* Voltmen AJAX Add to Cart - popup + small touches */
.vm-toast {
	--vm-accent: var(--wd-primary-color, #2f5be7);
	position: fixed;
	top: 90px;
	right: 20px;
	z-index: 2147483000;
	width: min(92vw, 360px);
	padding: 14px 16px 0;
	overflow: hidden;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 14px 40px rgba(15, 25, 50, .22);
	animation: vm-toast-in .38s cubic-bezier(.2, .9, .3, 1.2) both;
}
.vm-toast--out { animation: vm-toast-out .22s ease forwards; }
@keyframes vm-toast-in {
	from { opacity: 0; transform: translateY(-16px) scale(.92); }
	to   { opacity: 1; transform: none; }
}
@keyframes vm-toast-out {
	to { opacity: 0; transform: translateY(-10px) scale(.96); }
}

.vm-toast button.vm-toast__close {
	position: absolute !important;
	top: 8px !important;
	right: 8px !important;
	left: auto !important;
	bottom: auto !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 22px !important;
	height: 22px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #f2f3f5 !important;
	box-shadow: none !important;
	color: #666 !important;
	font-size: 15px !important;
	font-weight: 400 !important;
	line-height: 1 !important;
	text-transform: none !important;
	transform: none !important;
	cursor: pointer;
	transition: background .15s, color .15s;
}
.vm-toast button.vm-toast__close:hover {
	background: #e3e5e9 !important;
	color: #111 !important;
}

.vm-toast__row { display: flex; align-items: center; gap: 12px; padding-right: 18px; }
.vm-toast__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #1fa45a;
	color: #fff;
	font-weight: 700;
	animation: vm-pop .45s .1s cubic-bezier(.2, 1.6, .4, 1) both;
}
.vm-toast--error .vm-toast__icon { background: #d93c3c; }
@keyframes vm-pop { from { transform: scale(0); } to { transform: scale(1); } }
.vm-check { stroke-dasharray: 24; stroke-dashoffset: 24; animation: vm-draw .4s .3s ease forwards; }
@keyframes vm-draw { to { stroke-dashoffset: 0; } }

.vm-toast__img {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	object-fit: contain;
	border-radius: 8px;
	background: #f6f7f9;
}
.vm-toast__text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.vm-toast__title { font-size: 14.5px; font-weight: 700; color: #1d2330; }
.vm-toast__name {
	font-size: 13px;
	line-height: 1.35;
	color: #5b6472;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.vm-toast__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 0 14px; }
.vm-toast__btn {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 40px;
	border: 1px solid var(--vm-accent);
	border-radius: 8px;
	background: #fff;
	color: var(--vm-accent);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: opacity .15s;
}
.vm-toast__btn--primary { background: var(--vm-accent); color: #fff; }
.vm-toast__btn:hover { opacity: .88; }
.vm-toast__gap { height: 14px; }

.vm-toast__bar {
	position: absolute;
	left: 0;
	bottom: 0;
	height: 3px;
	width: 100%;
	background: var(--vm-accent);
	transform-origin: left;
	animation: vm-bar 4.5s linear forwards;
}
.vm-toast--error .vm-toast__bar { background: #d93c3c; }
.vm-toast:hover .vm-toast__bar { animation-play-state: paused; }
@keyframes vm-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* Phones: slide up from the bottom */
@media (max-width: 600px) {
	.vm-toast { top: auto; bottom: 16px; left: 12px; right: 12px; width: auto; animation-name: vm-toast-in-b; }
	@keyframes vm-toast-in-b {
		from { opacity: 0; transform: translateY(24px) scale(.96); }
		to   { opacity: 1; transform: none; }
	}
}

/* Header cart count bump */
.vm-bump { animation: vm-bump .55s ease; }
@keyframes vm-bump { 0% { transform: scale(1); } 40% { transform: scale(1.6); } 100% { transform: scale(1); } }

/* Hide WooCommerce's extra "View cart" link next to the button (the popup already has it) */
form.cart .added_to_cart { display: none !important; }
.single_add_to_cart_button.vm-loading { opacity: .7; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
	.vm-toast, .vm-toast__icon, .vm-check, .vm-bump { animation: none !important; }
	.vm-check { stroke-dashoffset: 0; }
}
