/*
 * Kahur Checkout — add-to-cart button feedback (whole site).
 * Selectors are doubled up on purpose: the theme styles the same button
 * (label in ::before, "added" state in ::after) with !important rules.
 */

/* WooCommerce's "Zobrazit košík" link after the button. The second rule
   out-ranks Nest's card button rules (".product-cart-wrap.style_one
   .product-card-bottom .add-cart a", !important); assets/js/add-to-cart.js
   also removes the link as soon as it's inserted. */
html body a.added_to_cart.wc-forward,
html body .product-cart-wrap .product-card-bottom .add-cart a.added_to_cart.wc-forward.wc-forward.wc-forward,
html body .products a.added_to_cart.wc-forward.wc-forward.wc-forward.wc-forward {
	display: none !important;
}

html body .kc-atc-loading.kc-atc-loading,
html body .kc-atc-done.kc-atc-done {
	position: relative !important;
	color: transparent !important;
	pointer-events: none;
}

html body .kc-atc-loading.kc-atc-loading > *,
html body .kc-atc-done.kc-atc-done > * {
	visibility: hidden !important;
}

/* Theme label drawn in ::before (Nest "Přidat"). */
html body .kc-atc-loading.kc-atc-loading::before,
html body .kc-atc-done.kc-atc-done::before {
	color: transparent !important;
}

html body .kc-atc-loading.kc-atc-loading.kc-atc-loading::after,
html body .kc-atc-done.kc-atc-done.kc-atc-done::after {
	content: "" !important;
	display: block !important;
	position: absolute !important;
	top: 50% !important;
	left: 50% !important;
	right: auto !important;
	bottom: auto !important;
	margin: 0 !important;
	opacity: 1 !important;
	visibility: visible !important;
	transform: translate(-50%, -50%);
}

/* Spinner */
html body .kc-atc-loading.kc-atc-loading.kc-atc-loading::after {
	width: 18px !important;
	height: 18px !important;
	border: 2px solid rgba(37, 61, 78, .2) !important;
	border-top-color: var(--color-brand-dark, #29a56c) !important;
	border-radius: 50% !important;
	background: none !important;
	animation: kc-atc-spin .7s linear infinite;
}

/* Check mark */
html body .kc-atc-done.kc-atc-done.kc-atc-done::after {
	width: 22px !important;
	height: 22px !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: var(--color-brand-dark, #29a56c) !important;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
	animation: kc-atc-pop .25s ease-out;
}

@keyframes kc-atc-spin {
	to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes kc-atc-pop {
	from { transform: translate(-50%, -50%) scale(.4); opacity: 0; }
	to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	html body .kc-atc-loading.kc-atc-loading.kc-atc-loading::after { animation-duration: 2.4s; }
	html body .kc-atc-done.kc-atc-done.kc-atc-done::after { animation: none; }
}
