@keyframes spin {
	from {
		rotate: 0;
	}
	to {
		rotate: 360deg;
	}
}

[data-loading],
button[aria-busy="true"] {
	&::before {
		content: "";
		display: inline-block;
		vertical-align: text-bottom;
		margin-right: 0.5ch;
		animation: spin 1s linear infinite;
		width: 1em;
		aspect-ratio: 1;
		border-radius: 50%;
		border: 0.2rem solid color-mix(in srgb, currentColor, transparent 66%);
		border-top-color: currentColor;

		@media (prefers-contrast: more) {
			clip-path: polygon(50% 15%, 65% 115%, -5% 115%);
		}
	}

	&:is(button)::before {
		margin-right: 1ch;
	}
}
