/* «До / після»: без JS показує стартову позицію і лишається читабельним. */

.ddt-ix-cmp__stage {
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
	cursor: ew-resize;
}

.ddt-ix-cmp.is-v .ddt-ix-cmp__stage {
	cursor: ns-resize;
	touch-action: pan-x;
}

.ddt-ix-cmp__pane {
	position: absolute;
	inset: 0;
	margin: 0;
}

.ddt-ix-cmp__pane--after { z-index: 1; }

.ddt-ix-cmp__pane--before {
	z-index: 2;
	clip-path: inset(0 calc(100% - var(--ddt-ix-pos, 50%)) 0 0);
}

.ddt-ix-cmp.is-v .ddt-ix-cmp__pane--before {
	clip-path: inset(0 0 calc(100% - var(--ddt-ix-pos, 50%)) 0);
}

.ddt-ix-cmp__handle {
	position: absolute;
	z-index: 4;
	left: var(--ddt-ix-pos, 50%);
	top: 0;
	bottom: 0;
	width: 2px;
	margin-left: -1px;
	background: rgba(255, 255, 255, .9);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .18);
	cursor: ew-resize;
}

.ddt-ix-cmp.is-v .ddt-ix-cmp__handle {
	left: 0;
	right: 0;
	top: var(--ddt-ix-pos, 50%);
	bottom: auto;
	width: auto;
	height: 2px;
	margin: -1px 0 0;
	cursor: ns-resize;
}

.ddt-ix-cmp__grip {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .95);
	box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

.ddt-ix-cmp__grip::before,
.ddt-ix-cmp__grip::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 0;
	height: 0;
	border: 6px solid transparent;
	transform: translateY(-50%);
}

.ddt-ix-cmp__grip::before {
	left: 7px;
	border-right-color: #333;
}

.ddt-ix-cmp__grip::after {
	right: 7px;
	border-left-color: #333;
}

.ddt-ix-cmp.is-v .ddt-ix-cmp__grip::before,
.ddt-ix-cmp.is-v .ddt-ix-cmp__grip::after {
	left: 50%;
	right: auto;
	top: auto;
	transform: translateX(-50%);
	border: 6px solid transparent;
}

.ddt-ix-cmp.is-v .ddt-ix-cmp__grip::before {
	top: 7px;
	border-bottom-color: #333;
}

.ddt-ix-cmp.is-v .ddt-ix-cmp__grip::after {
	bottom: 7px;
	border-top-color: #333;
}

.ddt-ix-cmp__handle:focus-visible {
	outline: 3px solid var(--ddt-ix-accent);
	outline-offset: 2px;
}

.ddt-ix-cmp__label {
	position: absolute;
	z-index: 3;
	top: 12px;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	line-height: 1.6;
	letter-spacing: .02em;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	pointer-events: none;
}

.ddt-ix-cmp__label--before { left: 12px; }
.ddt-ix-cmp__label--after { right: 12px; }

.ddt-ix-cmp.is-dragging .ddt-ix-cmp__label { opacity: .35; }
.ddt-ix-cmp__label { transition: opacity .2s ease; }
