.ebac-comparison {
	--ebac-position: 50%;
	--ebac-height: 450px;
	--ebac-divider-color: #fff;
	--ebac-divider-width: 3px;
	--ebac-handle-size: 52px;
	--ebac-handle-bg: rgba(0, 0, 0, 0.55);
	--ebac-handle-color: #fff;
	--ebac-object-y: 50%;
	position: relative;
	width: 100%;
	height: var(--ebac-height);
	min-height: 120px;
	overflow: hidden;
	isolation: isolate;
	touch-action: none;
	cursor: ew-resize;
	user-select: none;
	-webkit-user-select: none;
}

.ebac-comparison:focus-visible {
	outline: none;
	outline-offset: 0px;
}

.ebac-media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	pointer-events: none;
}

.ebac-media-after {
	z-index: 2;
	clip-path: inset(0 0 0 var(--ebac-position));
}

.ebac-media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: 50% var(--ebac-object-y, 50%);
	pointer-events: none;
}

.ebac-label {
	position: absolute;
	top: 18px;
	z-index: 3;
	padding: 7px 12px;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	white-space: nowrap;
}

.ebac-label-before {
	left: 18px;
}

.ebac-label-after {
	right: 18px;
}

.ebac-divider {
	position: absolute;
	z-index: 4;
	top: 0;
	bottom: 0;
	left: var(--ebac-position);
	width: var(--ebac-divider-width);
	background: var(--ebac-divider-color);
	transform: translateX(-50%);
	pointer-events: none;
}

.ebac-handle {
	position: absolute;
	left: 50%;
	top: 50%;
	display: grid;
	width: var(--ebac-handle-size);
	height: var(--ebac-handle-size);
	place-items: center;
	border: var(--ebac-divider-width) solid var(--ebac-divider-color);
	border-radius: 999px;
	background: var(--ebac-handle-bg);
	color: var(--ebac-handle-color);
	box-shadow: 0 3px 14px rgba(0, 0, 0, 0.22);
	transform: translate(-50%, -50%);
}

.ebac-arrows {
	display: block;
	width: 56%;
	height: 56%;
}

.ebac-arrows-vertical {
	display: none;
}

.ebac-orientation-vertical {
	cursor: ns-resize;
}

.ebac-orientation-vertical .ebac-media-after {
	clip-path: inset(var(--ebac-position) 0 0 0);
}

.ebac-orientation-vertical .ebac-divider {
	top: var(--ebac-position);
	right: 0;
	bottom: auto;
	left: 0;
	width: auto;
	height: var(--ebac-divider-width);
	transform: translateY(-50%);
}

.ebac-orientation-vertical .ebac-handle {
	left: 50%;
	top: 50%;
}

.ebac-orientation-vertical .ebac-arrows-horizontal {
	display: none;
}

.ebac-orientation-vertical .ebac-arrows-vertical {
	display: block;
}

.ebac-orientation-vertical .ebac-label-before {
	top: 18px;
	bottom: auto;
}

.ebac-orientation-vertical .ebac-label-after {
	top: auto;
	bottom: 18px;
}

@media (prefers-reduced-motion: no-preference) {
	.ebac-handle {
		transition: transform 140ms ease, box-shadow 140ms ease;
	}

	.ebac-comparison:hover .ebac-handle,
	.ebac-comparison:focus-visible .ebac-handle,
	.ebac-comparison.is-dragging .ebac-handle {
		box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
		transform: translate(-50%, -50%) scale(1.06);
	}
}
