/* ============================================
   SLIDER BEFORE/AFTER — Styles
   ============================================ */

/* --- Tabs --- */
.slider-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.slider-tab {
  padding: 12px 28px;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--transition-smooth);
  background: transparent;
}

.slider-tab:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
  color: var(--text-secondary);
}

.slider-tab.active {
  background: var(--gradient-accent);
  border-color: transparent;
  color: var(--bg-primary);
}

/* --- Options --- */
.slider-options {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.slider-option {
  padding: 10px 24px;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-smooth);
  background: transparent;
}

.slider-option:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
}

.slider-option.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
}

/* --- Main Slider --- */
.ba-slider {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: ew-resize;
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

.ba-slider__before,
.ba-slider__after {
  position: absolute;
  inset: 0;
}

.ba-slider__before {
  z-index: 1;
}

.ba-slider__after {
  z-index: 2;
  clip-path: inset(0 0 0 50%);
  transition: clip-path 0.05s linear;
}

.ba-slider__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/* Placeholder state when no image */
.ba-slider__before--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
}

/* --- Labels --- */
.ba-slider__label {
  position: absolute;
  top: 16px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 5;
  pointer-events: none;
}

.ba-slider__label--before {
  left: 16px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--text-primary);
  backdrop-filter: blur(4px);
}

.ba-slider__label--after {
  right: 16px;
  background: rgba(0, 212, 170, 0.85);
  color: var(--bg-primary);
}

/* --- Handle --- */
.ba-slider__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
  touch-action: none;
}

.ba-slider__handle-line {
  width: 3px;
  flex: 1;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.ba-slider__handle-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-primary);
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ba-slider__handle:hover .ba-slider__handle-circle,
.ba-slider__handle:active .ba-slider__handle-circle {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(var(--accent-rgb), 0.6), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ba-slider.dragging .ba-slider__handle-circle {
  transform: scale(1.15);
}

/* --- Slider Info --- */
.slider-info {
  text-align: center;
  margin-top: 28px;
}

.slider-info__name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.slider-info__cta {
  display: inline-flex;
}

/* --- Responsive --- */
@media (max-width: 1023px) {
  .ba-slider {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 767px) {
  .ba-slider {
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-sm);
  }

  .slider-tabs {
    gap: 8px;
  }

  .slider-tab {
    padding: 10px 18px;
    font-size: 0.78rem;
  }

  .slider-option {
    padding: 8px 16px;
    font-size: 0.8rem;
  }

  .ba-slider__handle-circle {
    width: 56px;
    height: 56px;
  }

  .ba-slider__label {
    font-size: 0.6rem;
    padding: 4px 10px;
    top: 10px;
  }

  .ba-slider__label--before { left: 10px; }
  .ba-slider__label--after { right: 10px; }
}
