.bacw-comparison {
	width: 100%;
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
}

.bacw-image-container {
	position: relative;
	width: 100%;
	height: 450px;
	overflow: hidden;
	cursor: ew-resize;
}

.bacw-orientation-vertical .bacw-image-container {
	cursor: ns-resize;
}

.bacw-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.bacw-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
}

.bacw-image-before {
	z-index: 1;
}

.bacw-image-after {
	z-index: 2;
	/* clip-path is set dynamically by JS */
}

.bacw-orientation-horizontal .bacw-image-after {
	clip-path: inset(0 0 0 50%);
}

.bacw-orientation-vertical .bacw-image-after {
	clip-path: inset(50% 0 0 0);
}

.bacw-label {
	position: absolute;
	bottom: 12px;
	padding: 4px 12px;
	border-radius: 4px;
	font-size: 13px;
	line-height: 1.4;
	background-color: rgba(0, 0, 0, 0.55);
	color: #fff;
	z-index: 3;
	pointer-events: none;
	white-space: nowrap;
}

.bacw-label-before {
	left: 12px;
}

.bacw-label-after {
	right: 12px;
}

/* Slider handle */
.bacw-slider-handle {
	position: absolute;
	z-index: 4;
	top: 0;
	touch-action: none;
}

.bacw-orientation-horizontal .bacw-slider-handle {
	left: 50%;
	top: 0;
	height: 100%;
	width: 0;
}

.bacw-orientation-vertical .bacw-slider-handle {
	top: 50%;
	left: 0;
	width: 100%;
	height: 0;
}

.bacw-handle-line {
	position: absolute;
	background-color: #fff;
}

.bacw-orientation-horizontal .bacw-handle-line {
	top: 0;
	left: 0;
	width: 3px;
	height: 100%;
	margin-left: -1.5px;
}

.bacw-orientation-vertical .bacw-handle-line {
	top: 0;
	left: 0;
	height: 3px;
	width: 100%;
	margin-top: -1.5px;
}

.bacw-handle-circle {
	position: absolute;
	top: 50%;
	left: 0;
	width: 40px;
	height: 40px;
	margin-left: -20px;
	margin-top: -20px;
	border-radius: 50%;
	background-color: #fff;
	color: #333;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	cursor: grab;
}

.bacw-orientation-vertical .bacw-handle-circle {
	top: 0;
	left: 50%;
}

.bacw-orientation-vertical .bacw-handle-circle svg {
	transform: rotate(90deg);
}

.bacw-slider-handle:active .bacw-handle-circle {
	cursor: grabbing;
}

.bacw-slider-handle:focus {
	outline: none;
}

.bacw-slider-handle:focus .bacw-handle-circle {
	box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5), 0 2px 8px rgba(0, 0, 0, 0.25);
}

@media (max-width: 767px) {
	.bacw-image-container {
		height: 300px;
	}
}
