.mh-auto-image-skeleton {
	position: relative !important;
	overflow: hidden;
	background-color: transparent !important;
}

.mh-auto-image-skeleton::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 20;
	pointer-events: none;
	background: linear-gradient(
		105deg,
		rgba(255, 255, 255, 0) 20%,
		rgba(255, 255, 255, 0.12) 42%,
		rgba(255, 255, 255, 0.32) 50%,
		rgba(255, 255, 255, 0.12) 58%,
		rgba(255, 255, 255, 0) 80%
	);
	background-size: 220% 100%;
	animation: mh-auto-image-shimmer 1.25s linear infinite;
	opacity: 1;
	transition: opacity 220ms ease;
}

.mh-auto-image-skeleton > img,
.mh-auto-image-skeleton > picture > img,
.mh-auto-image-skeleton a > img,
.mh-auto-image-skeleton a > picture > img {
	opacity: 0;
	transition: opacity 300ms ease;
}

.mh-auto-image-skeleton.mh-auto-image-loaded::after {
	opacity: 0;
	animation: none;
}

.mh-auto-image-skeleton.mh-auto-image-loaded > img,
.mh-auto-image-skeleton.mh-auto-image-loaded > picture > img,
.mh-auto-image-skeleton.mh-auto-image-loaded a > img,
.mh-auto-image-skeleton.mh-auto-image-loaded a > picture > img {
	opacity: 1;
}

@keyframes mh-auto-image-shimmer {
	from {
		background-position: 200% 0;
	}

	to {
		background-position: -20% 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mh-auto-image-skeleton::after {
		animation: none;
	}
}
