/* =====================================================================
   EDS Core – Before / After widget
   The "before" layer sits on top and is clipped to the left of --pos.
   ===================================================================== */

.eds-ba{
	--pos:50%;
	--ratio:21/9;
	--focus-y:50%;
	--knob:60px;
	--hand:#fff;
	--hand-fg:#000;
	--radius:20px;
	--ease:cubic-bezier(.7,0,.12,1);
}
.eds-ba--dark{--hand:#000;--hand-fg:#fff}
@media (max-width:767px){.eds-ba{--knob:48px;--radius:16px}}

/* The stage gets its height from aspect-ratio. In a wrapping flex column (Elementor
   containers on phones) the widget would be sized at width 0 first → height 0 and the
   slider spills over the next block. A definite width avoids that; a width set in
   Elementor (element-id or width-auto classes) still wins. */
.elementor-widget-eds-before-after{width:100%}
.eds-ba:not(#eds){position:relative;width:100%;margin:0;padding:0}
.eds-ba:not(#eds) .eds-ba__stage{
	position:relative;overflow:hidden;border-radius:var(--radius);aspect-ratio:var(--ratio);
	background:var(--e-global-color-4b5c478,#f5f5f5);
	cursor:ew-resize;touch-action:pan-y;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;
	isolation:isolate;
}
.eds-ba--auto:not(#eds) .eds-ba__stage{aspect-ratio:auto}
.eds-ba--auto:not(#eds) .eds-ba__layer--after{position:relative}

.eds-ba:not(#eds) .eds-ba__layer{position:absolute;inset:0;overflow:hidden}
.eds-ba:not(#eds) .eds-ba__layer--before{clip-path:inset(0 calc(100% - var(--pos)) 0 0);z-index:1;will-change:clip-path}
.eds-ba:not(#eds) .eds-ba__img{
	display:block;width:100%;height:100%;max-width:none;margin:0;border-radius:0;object-fit:cover;object-position:50% var(--focus-y);
	pointer-events:none;-webkit-user-drag:none;
	transform:scale(1.04);transition:transform 1.4s var(--ease);
}
.eds-ba.is-in:not(#eds) .eds-ba__img{transform:none}
.eds-ba--auto:not(#eds) .eds-ba__img{height:auto}

/* Labels */
.eds-ba:not(#eds) .eds-ba__label{
	position:absolute;top:20px;z-index:3;padding:7px 14px;border-radius:999px;
	background:rgba(255,255,255,.88);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);color:#000;
	font-size:.75rem;font-weight:700;letter-spacing:.12em;line-height:1.3;text-transform:uppercase;
	pointer-events:none;transition:opacity .35s ease,transform .5s var(--ease);
}
.eds-ba:not(#eds) .eds-ba__label--before{left:20px}
.eds-ba:not(#eds) .eds-ba__label--after{right:20px;background:rgba(0,0,0,.72);color:#fff}
.eds-ba.is-hide-before:not(#eds) .eds-ba__label--before{opacity:0;transform:translateX(-8px)}
.eds-ba.is-hide-after:not(#eds) .eds-ba__label--after{opacity:0;transform:translateX(8px)}

/* Handle */
.eds-ba:not(#eds) .eds-ba__handle{
	position:absolute;top:0;bottom:0;left:var(--pos);z-index:2;width:0;outline:none;
}
.eds-ba:not(#eds) .eds-ba__line{
	position:absolute;top:0;bottom:0;left:-1px;width:2px;background:var(--hand);
	box-shadow:0 0 0 1px rgba(0,0,0,.06),0 0 24px rgba(0,0,0,.18);
}
.eds-ba:not(#eds) .eds-ba__knob{
	position:absolute;top:50%;left:0;display:grid;place-items:center;width:var(--knob);height:var(--knob);
	border-radius:50%;background:var(--hand);color:var(--hand-fg);
	box-shadow:0 10px 30px rgba(0,0,0,.22),0 0 0 6px rgba(255,255,255,.18);
	transform:translate(-50%,-50%);transition:transform .5s var(--ease),box-shadow .5s var(--ease);
}
.eds-ba--dark:not(#eds) .eds-ba__knob{box-shadow:0 10px 30px rgba(0,0,0,.3),0 0 0 6px rgba(0,0,0,.12)}
.eds-ba:not(#eds) .eds-ba__knob svg{width:46%;height:46%;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;transition:transform .5s var(--ease)}
@media (hover:hover){.eds-ba:not(#eds) .eds-ba__stage:hover .eds-ba__knob{transform:translate(-50%,-50%) scale(1.06)}}
.eds-ba.is-dragging:not(#eds) .eds-ba__knob{transform:translate(-50%,-50%) scale(.92);box-shadow:0 6px 18px rgba(0,0,0,.25),0 0 0 10px rgba(255,255,255,.22)}
.eds-ba.is-dragging:not(#eds) .eds-ba__knob svg{transform:scaleX(1.18)}
.eds-ba:not(#eds) .eds-ba__handle:focus-visible .eds-ba__knob{box-shadow:0 0 0 3px var(--hand-fg),0 0 0 6px var(--hand)}
.eds-ba.is-dragging:not(#eds) .eds-ba__stage{cursor:grabbing}

.eds-ba-empty{margin:0;padding:24px;border:1px dashed #e5e5e5;border-radius:12px;color:#737373}

@media (prefers-reduced-motion:reduce){
	.eds-ba:not(#eds) *{transition-duration:.01ms !important}
}
