/* =============================================
   Elemance Widget — Before / After
   ============================================= */

.elemance-ba {
	position: relative;
	overflow: hidden;
	user-select: none;
	border-radius: 16px;
	cursor: col-resize;
	display: block;
	width: 100%;
}

.elemance-ba__after,
.elemance-ba__before {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.elemance-ba__after {
	position: relative; /* sets natural height */
}

.elemance-ba__before {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	overflow: hidden;
}

.elemance-ba img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
	-webkit-user-drag: none;
}

.elemance-ba__after img {
	width: 100%;
	height: auto;
	position: relative;
}

.elemance-ba__before img {
	width: auto;
	min-width: 100vw; /* overridden by JS using parent natural width */
	height: 100%;
}

/* Labels */
.elemance-ba__label {
	position: absolute;
	bottom: 16px;
	background: rgba(0,0,0,0.55);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	padding: 5px 14px;
	border-radius: 999px;
	pointer-events: none;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.elemance-ba__label--before { left: 16px; }
.elemance-ba__label--after  { right: 16px; }

/* Handle line */
.elemance-ba__handle {
	position: absolute;
	top: 0;
	height: 100%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	pointer-events: none;
	z-index: 10;
}

.elemance-ba__line {
	width: 3px;
	flex: 1;
	background: #6c63ff;
}

/* Circle button */
.elemance-ba__circle {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #6c63ff;
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.elemance-ba__circle svg {
	width: 20px;
	height: 20px;
}

.elemance-ba__handle--hidden {
	width: 0;
	pointer-events: none;
}
