/*
 * Smart Evolution: confronto prima/dopo (parts/prodotti-compare.php).
 *
 * Riprende lo stile 3 del plugin LADICO Before After Slider: linea sottile
 * con il rombo al centro, colore #1e90ff. La foto «prima» dà l'altezza, la
 * foto «dopo» sta sopra ed è tagliata a destra della linea.
 */

.sev-prodotti-ba {
	--sev-prodotti-ba-color: #1e90ff;
	--sev-prodotti-ba-pos: 50%;
	position: relative;
	display: block;
	width: 100%;
	overflow: hidden;
	line-height: 0;
	cursor: ew-resize;
	touch-action: pan-y;
	-webkit-user-select: none;
	user-select: none;
}

.sev-prodotti-ba img {
	display: block;
	width: 100%;
	max-width: none;
	pointer-events: none;
}

.sev-prodotti-ba__before img {
	height: auto;
}

.sev-prodotti-ba__after {
	position: absolute;
	inset: 0;
	clip-path: inset(0 calc(100% - var(--sev-prodotti-ba-pos)) 0 0);
}

.sev-prodotti-ba__after img {
	height: 100%;
	object-fit: cover;
}

.sev-prodotti-ba__divider {
	position: absolute;
	z-index: 2;
	top: 0;
	left: var(--sev-prodotti-ba-pos);
	width: 0;
	height: 100%;
}

.sev-prodotti-ba__divider::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 1px;
	height: 100%;
	background: var(--sev-prodotti-ba-color);
	opacity: .85;
	transform: translateX(-50%);
}

.sev-prodotti-ba__handle {
	position: absolute;
	top: 50%;
	left: 0;
	width: 16px;
	height: 16px;
	background: var(--sev-prodotti-ba-color);
	border-radius: 2px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
	translate: -50% -50%;
	rotate: 45deg;
	transition: scale .25s var(--sev-ease), box-shadow .25s ease;
}

.sev-prodotti-ba:hover .sev-prodotti-ba__handle,
.sev-prodotti-ba.is-dragging .sev-prodotti-ba__handle,
.sev-prodotti-ba__handle:focus-visible {
	scale: 1.25;
	box-shadow: 0 0 0 6px rgba(30, 144, 255, .18), 0 2px 10px rgba(0, 0, 0, .35);
}

.sev-prodotti-ba__handle:focus-visible {
	outline: 2px solid var(--sev-white);
	outline-offset: 2px;
}
