/* distortion-new-css (#2877) */
.distortion {
	position: relative;
	width: 100%;
	min-height: 400px;
	overflow: hidden;
	background-color: var(--wp--preset--color--primary, #202020);
}

.distortion > img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	object-position: center;
	transition: opacity 0.2s ease;
}

.distortion > img:nth-of-type(2) {
	position: absolute;
	inset: 0;
	height: 100%;
	opacity: 0;
}

.distortion.mws-distortion-ready > img {
	opacity: 0;
}

.distortion.mws-distortion-failed > img:first-of-type {
	opacity: 1;
}

.distortion.mws-distortion-failed > img:nth-of-type(2) {
	opacity: 0;
}

.mws-distortion-canvas {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: block;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	.distortion > img:first-of-type {
		opacity: 1;
	}

	.distortion > img:nth-of-type(2) {
		opacity: 0;
	}
}