/* ============================================================
   Advance Before & After Slider — v2.0.0
   Unique prefix: aba-  (prevents theme conflicts)
   ============================================================ */

/* ---------- Wrapper ---------- */
.aba-wrapper {
	position: relative;
	width: 100%;
	overflow: visible;
	padding: 30px 0 56px;
	box-sizing: border-box;
	background: transparent;
}

/* ---------- Track ---------- */
.aba-track {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	width: 100%;
	min-height: 460px;
}

/* ---------- Individual Slide ---------- */
.aba-slide {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.82);
	opacity: 0;
	pointer-events: none;
	transition: all 0.55s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: 1;
	width: 52%;
	border-radius: 20px;
	overflow: hidden;
	box-sizing: border-box;
	min-width: 0;
}

/* Active center slide */
.aba-slide.aba-active {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
	pointer-events: auto;
	z-index: 10;
}

/* Left peek card */
.aba-slide.aba-peek-left {
	opacity: 0.6;
	transform: translate(calc(-50% - 58%), -50%) scale(0.82);
	pointer-events: auto;
	z-index: 5;
	cursor: pointer;
}

/* Right peek card */
.aba-slide.aba-peek-right {
	opacity: 0.6;
	transform: translate(calc(-50% + 58%), -50%) scale(0.82);
	pointer-events: auto;
	z-index: 5;
	cursor: pointer;
}

.aba-slide.aba-peek-left,
.aba-slide.aba-peek-right {
	visibility: visible !important;
	display: block !important;
}

/* ---------- BA Container ---------- */
.aba-ba-container {
	position: relative;
	width: 100%;
	height: 480px;
	overflow: hidden;
	border-radius: inherit;
	background: #e5e0d8;
	user-select: none;
}

/* ---------- Before / After Images ---------- */
.aba-after,
.aba-before {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	border-radius: inherit;
}

.aba-before {
	clip-path: inset(0 50% 0 0);
}

/* ---------- Labels — Figma exact: dark navy bg, white text, 8px radius, top-left/right ---------- */
.aba-label {
	position: absolute;
	padding: 8px 20px;
	background: #1e3a5f;
	color: #ffffff;
	font-size: 16px;
	font-weight: 700;
	border-radius: 10px;
	pointer-events: none;
	z-index: 20;
	line-height: 1.2;
	white-space: nowrap;
}

/* Before label: top-left area of the before (left) side */
.aba-label-before {
	top: var(--aba-bf-top, 5%);
	bottom: var(--aba-bf-bottom, auto);
	left: var(--aba-bf-left, 25%);
	right: var(--aba-bf-right, auto);
	transform: translate(var(--aba-bf-tx, -50%), var(--aba-bf-ty, 0px));
}

/* After label: top-right area of the after (right) side */
.aba-label-after {
	top: var(--aba-af-top, 5%);
	bottom: var(--aba-af-bottom, auto);
	left: var(--aba-af-left, 75%);
	right: var(--aba-af-right, auto);
	transform: translate(var(--aba-af-tx, -50%), var(--aba-af-ty, 0px));
}

/* Hide labels on inactive slides */
.aba-slide:not(.aba-active) .aba-label {
	opacity: 0 !important;
	pointer-events: none !important;
}

/* Hide Hint (Caption) on inactive slides if 'Show ONLY on Center Slide' is enabled */
.aba-wrapper[data-caption-only-center="true"] .aba-slide:not(.aba-active) .aba-hint {
	opacity: 0 !important;
	pointer-events: none !important;
}

/* Force override any stale Elementor responsive hiding caches */
body .elementor-widget-advance_before_after .aba-wrapper .aba-hint {
	display: block !important;
	visibility: visible !important;
}

/* Base hidden for when interaction hides it */
.aba-hint.aba-hint-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ---------- Divider Line ---------- */
.aba-divider {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2px;
	background: #ffffff;
	transform: translateX(-50%);
	pointer-events: none;
	z-index: 30;
	cursor: ew-resize;
	opacity: 0;
	transition: opacity 0.4s ease;
}

/* ---------- Handle — Figma: white circle with <> icon, shadow ---------- */
.aba-handle {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	min-width: 52px;
	height: 52px;
	padding: 0 14px;
	background: #ffffff;
	border-radius: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	color: #555555;
	font-size: 17px;
	pointer-events: none;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
	box-sizing: border-box;
	opacity: 0;
	transition: opacity 0.4s ease;
}

.aba-slide.aba-active .aba-handle,
.aba-slide.aba-active .aba-divider {
	opacity: 1;
}

.aba-handle i,
.aba-handle svg {
	font-size: 17px;
	width: 17px;
	height: 17px;
}

/* ---------- Hint Pill — Figma: white/translucent pill, bottom-center ---------- */
.aba-hint {
	position: absolute;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(255, 255, 255, 0.85);
	color: #333333;
	font-size: 14px;
	padding: 9px 22px;
	border-radius: 50px;
	white-space: nowrap;
	pointer-events: none;
	z-index: 25;
	transition: opacity 0.4s ease;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.aba-hint.aba-hint-hidden {
	opacity: 0;
}

/* ---------- Navigation Arrows — Figma: dark navy circle, white icon ---------- */
.aba-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 50;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #1e3a5f;
	color: #ffffff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	transition: background 0.2s ease, transform 0.15s ease;
	margin-top: -28px;
	box-shadow: 0 4px 16px rgba(30, 58, 95, 0.35);
}

.aba-arrow:hover {
	filter: brightness(1.2);
}

.aba-arrow:active {
	transform: translateY(-50%) scale(0.92);
}

/* Arrow positions — Figma: arrows sit at the left/right outer edge of the slider */
.aba-prev {
	left: 12px;
}

.aba-next {
	right: 12px;
}

.aba-arrow i,
.aba-arrow svg {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* ---------- Dot Pagination — Figma: center below slider, active dot is wide navy pill ---------- */
.aba-dots {
	position: absolute;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 8px;
	align-items: center;
	z-index: 50;
}

.aba-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #cccccc;
	border: none;
	cursor: pointer;
	padding: 0;
	transition: all 0.3s ease;
	flex-shrink: 0;
}

.aba-dot.aba-dot-active {
	width: 32px;
	border-radius: 5px;
	background: #1e3a5f;
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
	.aba-wrapper {
		overflow: hidden !important;
		padding: 20px 0 52px;
	}

	.aba-track {
		overflow: visible !important;
	}

	/* Active slide: 80% so side slides show as slivers */
	.aba-slide {
		width: 80%;
		border-radius: 16px;
	}

	.aba-slide.aba-peek-left,
	.aba-slide.aba-peek-right {
		display: block !important;
		visibility: visible !important;
		opacity: 0.7 !important;
		border-radius: 14px;
	}

	.aba-ba-container {
		height: 320px;
	}

	.aba-prev {
		left: 4px;
	}

	.aba-next {
		right: 4px;
	}

	.aba-arrow {
		width: 40px;
		height: 40px;
		font-size: 14px;
		z-index: 60;
	}

	.aba-label {
		font-size: 13px;
		padding: 6px 14px;
	}

	.aba-hint {
		font-size: 12px;
		padding: 7px 16px;
		bottom: 14px;
	}
}

@media (max-width: 480px) {
	.aba-slide {
		width: 86%;
	}
	.aba-ba-container {
		height: 260px;
	}
}
