/**
 * Compare Slider – Split zweier Vollflächen-Bilder (--split: 0% … 100% von links)
 */

.compare-slider-reveal {
	--split: 50%;
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
	isolation: isolate;
}

.compare-slider-reveal__after,
.compare-slider-reveal__before {
	position: absolute;
	inset: 0;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	transform: translateZ(0);
}

.compare-slider-reveal__after {
	z-index: 1;
}

.compare-slider-reveal__before {
	z-index: 2;
	clip-path: inset(0 calc(100% - var(--split)) 0 0);
	will-change: clip-path;
}

.compare-slider-reveal__shade {
	position: absolute;
	inset: 0;
	z-index: 3;
	pointer-events: none;
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0.28) 0%,
		rgba(0, 0, 0, 0.06) 40%,
		rgba(0, 0, 0, 0.35) 100%
	);
}

.pp-bg-stat > .compare-slider-reveal,
.pp-scene-bg > .compare-slider-reveal {
	position: absolute;
	inset: 0;
}

.pp-bg-stat.compare-slider-host {
	background-image: none !important;
}

/* Text-Inhalt über dem Split-Griff – Klicks gehen durch zum Regler (wie fog-proxy) */
.statistics-section--has-split .statistics-content-wrapper,
.statistics-section--has-split .statistics-content-wrapper * {
	pointer-events: none;
}

.statistics-section--has-split .statistics-content-wrapper {
	position: relative;
	z-index: 30;
}

/* Navigation über Text und Regler */
.statistics-section--has-split .statistics-pills-wrapper {
	position: relative;
	z-index: 50;
}

.statistics-section--has-split .statistics-nav {
	position: relative;
	z-index: 51;
}

/* Griff hinter statistics-content-panel, vor den Pills */
.statistics-split-handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--split, 50%);
	transform: translateX(-50%);
	z-index: 20;
	width: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: ew-resize;
	touch-action: none;
	pointer-events: auto;
	user-select: none;
	-webkit-user-select: none;
}

.statistics-split-handle[hidden] {
	display: none !important;
}

.statistics-split-handle__line {
	position: absolute;
	top: 0%;
	bottom: 0%;
	left: 50%;
	width: 3px;
	margin-left: -1.5px;
	transform: translateX(-50%);
	background: #0a0a0a;
	border-radius: 2px;
	/* box-shadow:
		0 0 0 1px rgba(255, 255, 255, 0.35),
		0 0 12px rgba(0, 0, 0, 0.45); */
}

.statistics-split-handle__knob {
	position: relative;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	background: #0a0a0a;
	border: 2px solid rgba(255, 255, 255, 0.22);
	box-shadow:
		0 4px 20px rgba(0, 0, 0, 0.5),
		inset 0 1px 0 rgba(255, 255, 255, 0.08);
	z-index: 1;
}

/* Pfeile im Kreis (links / rechts) */
.statistics-split-handle__arrow {
	display: block;
	width: 0;
	height: 0;
	flex-shrink: 0;
}

.statistics-split-handle__arrow--left {
	border-style: solid;
	border-width: 5px 7px 5px 0;
	border-color: transparent #f5f5f5 transparent transparent;
}

.statistics-split-handle__arrow--right {
	border-style: solid;
	border-width: 5px 0 5px 7px;
	border-color: transparent transparent transparent #f5f5f5;
}

/* Mobile: kein Regler – nur Nachher-Bild (after) als Vollflächen-Hintergrund */
@media (max-width: 767px) {
	.statistics-split-handle {
		display: none !important;
		pointer-events: none !important;
	}

	.compare-slider-reveal__before {
		display: none;
	}

	.compare-slider-reveal__after {
		z-index: 2;
	}
}

@media (prefers-reduced-motion: reduce) {
	.compare-slider-reveal__before {
		will-change: auto;
	}
}
