// A buy button while it adds, and the moment it has: a check that draws itself
// and the new words coming in.
.ewps-cart,
.ewps-tape-buy,
.ewps-stage-cart {

	&.is-adding {
		cursor: progress;
		opacity: 0.6;
		transition: opacity 120ms ease;
	}

	&.is-added {
		align-items: center;
		box-sizing: border-box;
		display: inline-flex;
		gap: 0.4em;
		justify-content: center;
		animation: ewps-added-press 240ms cubic-bezier(0.23, 1, 0.32, 1);
	}
}

.ewps-added-check {
	flex: none;
	height: 1.1em;
	width: 1.1em;

	path {
		animation: ewps-added-draw 240ms cubic-bezier(0.23, 1, 0.32, 1) 40ms backwards;
		fill: none;
		stroke: currentcolor;
		stroke-dasharray: 1;
		stroke-linecap: round;
		stroke-linejoin: round;
		stroke-width: 2;
	}
}

.ewps-added-label {
	animation: ewps-added-label 220ms cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes ewps-added-press {

	from {
		transform: scale(0.96);
	}
}

@keyframes ewps-added-draw {

	from {
		stroke-dashoffset: 1;
	}
}

@keyframes ewps-added-label {

	from {
		filter: blur(2px);
		opacity: 0;
		transform: translateY(0.35em);
	}
}

@media (prefers-reduced-motion: reduce) {

	.is-added,
	.ewps-added-check path,
	.ewps-added-label {
		animation: none;
	}
}
