/* Before / After Slider */
.ba-slider {
	--ba-pos: 50%;
	--ba-line: 3px;
	--ba-line-color: #ffffff;
	--ba-label-offset: 16px;
	max-width: 100%;
	margin: 0 auto;
}

.ba-container {
	position: relative;
	width: 100%;
	overflow: hidden;
	user-select: none;
	-webkit-user-select: none;
	touch-action: none;
	line-height: 0;
}

/* Base layer = before image (defines size) */
.ba-before { position: relative; }
.ba-before img {
	display: block;
	width: 100%;
	height: auto;
}

/* Top layer = after image, clipped */
.ba-after {
	position: absolute;
	inset: 0;
}
.ba-after img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Horizontal: after revealed from the left up to --ba-pos */
.ba-dir-horizontal .ba-after {
	clip-path: inset(0 calc(100% - var(--ba-pos)) 0 0);
}
/* Vertical: after revealed from the top down to --ba-pos */
.ba-dir-vertical .ba-after {
	clip-path: inset(0 0 calc(100% - var(--ba-pos)) 0);
}

/* Smooth transition while intro/keyboard, disabled during drag */
.ba-container.ba-animating .ba-after,
.ba-container.ba-animating .ba-divider {
	transition: clip-path 0.5s ease, left 0.5s ease, top 0.5s ease;
}

/* ---------- Divider line ---------- */
.ba-divider {
	position: absolute;
	background: var(--ba-line-color);
	z-index: 3;
}
.ba-dir-horizontal .ba-divider {
	top: 0;
	bottom: 0;
	left: var(--ba-pos);
	width: var(--ba-line);
	transform: translateX(-50%);
}
.ba-dir-vertical .ba-divider {
	left: 0;
	right: 0;
	top: var(--ba-pos);
	height: var(--ba-line);
	transform: translateY(-50%);
}

/* ---------- Handle ---------- */
.ba-handle {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	background: #fff;
	color: #162350;
	border: none;
	border-radius: 50%;
	box-shadow: 0 2px 10px rgba(0,0,0,0.25);
	cursor: ew-resize;
	padding: 0;
	line-height: 0;
}
.ba-dir-vertical .ba-handle { cursor: ns-resize; }

/* Arrow chevrons */
.ba-arrow {
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	display: block;
}
.ba-dir-horizontal .ba-arrow--1 { transform: rotate(135deg); }
.ba-dir-horizontal .ba-arrow--2 { transform: rotate(-45deg); }
.ba-dir-vertical .ba-arrow--1 { transform: rotate(-135deg); }
.ba-dir-vertical .ba-arrow--2 { transform: rotate(45deg); }

.ba-handle:focus-visible {
	outline: 2px solid #162350;
	outline-offset: 3px;
}

/* ---------- Labels ---------- */
.ba-label {
	position: absolute;
	z-index: 2;
	color: #fff;
	background: rgba(0,0,0,0.55);
	font-size: 13px;
	line-height: 1.2;
	padding: 6px 12px;
	border-radius: 4px;
	z-index: 2;
	pointer-events: none;
	white-space: nowrap;
}
/* Per-label position (left/right + top/bottom) */
.ba-label.ba-h-left   { left: var(--ba-label-offset); right: auto; }
.ba-label.ba-h-right  { right: var(--ba-label-offset); left: auto; }
.ba-label.ba-v-top    { top: var(--ba-label-offset); bottom: auto; }
.ba-label.ba-v-bottom { bottom: var(--ba-label-offset); top: auto; }


/* Optional fixed height / fit (set via Style > General) */
.ba-slider.ba-has-height .ba-before img,
.ba-slider.ba-has-height .ba-after img {
	height: var(--ba-height);
	object-fit: var(--ba-fit, cover);
}
.ba-slider.ba-has-height .ba-before img { width: 100%; }

/* Custom handle icon */
.ba-handle .ba-handle-icon { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.ba-handle .ba-handle-icon svg { width: 1em; height: 1em; fill: currentColor; }
.ba-handle .ba-handle-icon i { font-size: 1em; }
.ba-handle.ba-has-icon .ba-arrow { display: none; }
.ba-handle .ba-handle-icon { font-size: 18px; }
