.cb-comparison {
	--comparison-position: 50%;
	position: relative;
	width: 100%;
	margin: 0;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #e8e5e1;
	touch-action: pan-y;
}

.cb-comparison__image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.cb-comparison__image--before {
	clip-path: inset(0 calc(100% - var(--comparison-position)) 0 0);
}

.cb-comparison__divider {
	position: absolute;
	z-index: 2;
	top: 0;
	bottom: 0;
	left: var(--comparison-position);
	width: 3px;
	background: rgba(255, 255, 255, 0.85);
	box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
	transform: translateX(-50%);
	pointer-events: none;
}

.cb-comparison__handle {
	position: absolute;
	z-index: 3;
	top: 50%;
	left: var(--comparison-position);
	display: grid;
	width: 70px;
	height: 70px;
	place-items: center;
	color: #111;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.cb-comparison__handle svg {
	width: 30px;
	height: 30px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.cb-comparison__control {
	position: absolute;
	z-index: 4;
	top: 50%;
	left: 0;
	width: 100%;
	height: 70px;
	margin: 0;
	padding: 0;
	appearance: none;
	background: transparent;
	border: 0;
	outline: 0;
	transform: translateY(-50%);
	cursor: ew-resize;
	touch-action: pan-y;
}

.cb-comparison__control::-webkit-slider-runnable-track {
	height: 70px;
	background: transparent;
}

.cb-comparison__control::-webkit-slider-thumb {
	width: 70px;
	height: 70px;
	appearance: none;
	background: transparent;
	border: 0;
}

.cb-comparison__control::-moz-range-track {
	height: 70px;
	background: transparent;
	border: 0;
}

.cb-comparison__control::-moz-range-thumb {
	width: 70px;
	height: 70px;
	background: transparent;
	border: 0;
}

.cb-comparison__control:focus-visible ~ .cb-comparison__handle {
	outline: 3px solid #891703;
	outline-offset: 4px;
}

@media (max-width: 767px) {
	.cb-comparison__handle {
		width: 54px;
		height: 54px;
	}

	.cb-comparison__handle svg {
		width: 25px;
		height: 25px;
	}

	.cb-comparison__control,
	.cb-comparison__control::-webkit-slider-runnable-track,
	.cb-comparison__control::-moz-range-track {
		height: 54px;
	}

	.cb-comparison__control::-webkit-slider-thumb,
	.cb-comparison__control::-moz-range-thumb {
		width: 54px;
		height: 54px;
	}
}
