/* Advanced Before/After Component (Framer Pro Specification) */
.aba-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 25px 65px -25px rgba(60, 30, 20, 0.45), 0 0 0 1.5px rgba(255, 176, 32, 0.25);
  background: #121316;
  touch-action: pan-y;
  cursor: ew-resize;
  isolation: isolate;
}

.aba-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.aba-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.aba-before {
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
  will-change: clip-path;
  z-index: 2;
}

.aba-after {
  z-index: 1;
}

/* Vertical Divider & Knob */
.aba-divider {
  position: absolute;
  left: var(--pos, 50%);
  top: 0;
  bottom: 0;
  width: 0;
  z-index: 10;
  pointer-events: none;
  will-change: left;
}

.aba-line {
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 2.5px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.6), 0 0 4px rgba(0, 0, 0, 0.5);
}

.aba-knob {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 1.5px rgba(255, 176, 32, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #2b3236;
  pointer-events: auto;
  cursor: grab;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
}

.aba-container.dragging .aba-knob {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 10px 28px rgba(255, 176, 32, 0.45), 0 0 0 2px var(--accent, #FFB020);
}

.aba-arrow {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

/* Badges */
.aba-label {
  position: absolute;
  top: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  font: 600 11.5px/1 Switzer, system-ui, sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 8;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.25s ease;
}

.aba-label-before {
  left: 16px;
  background: rgba(25, 20, 18, 0.76);
  color: #f7ede3;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.aba-label-after {
  right: 16px;
  background: rgba(255, 176, 32, 0.88);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Auto Sweep Indicator & Controls */
.aba-toggle-btn {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(20, 18, 16, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font: 600 12px/1 Switzer, sans-serif;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.aba-toggle-btn:hover {
  background: rgba(154, 167, 199, 0.96);
  border-color: var(--accent, #FFB020);
  transform: translateX(-50%) translateY(-2px);
}

.aba-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2f9e44;
  box-shadow: 0 0 8px #2f9e44;
  transition: background 0.3s, box-shadow 0.3s;
}

.aba-toggle-btn.paused .aba-dot {
  background: #f59f00;
  box-shadow: 0 0 6px #f59f00;
}

@media (max-width: 768px) {
  .aba-container { aspect-ratio: 16 / 10; border-radius: 18px; }
  .aba-knob { width: 38px; height: 38px; }
  .aba-label { font-size: 10.5px; padding: 5px 11px; top: 12px; }
  .aba-label-before { left: 12px; }
  .aba-label-after { right: 12px; }
  .aba-toggle-btn { bottom: 12px; font-size: 11px; padding: 6px 13px; }
}
