.ba-slider {
  --ba-handle-size: 56px;
  --ba-line-width: 3px;
  --ba-shadow: 0 10px 30px rgba(0, 0, 0, 0.34);
  --ba-radius: 20px;
  --ba-label-bg: rgba(17, 17, 17, 0.72);
  --ba-label-color: #ffffff;
  --ba-focus: #111111;

  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--ba-radius);
  background: #f5f5f5;
  box-shadow: var(--ba-shadow);
  border:5px solid #ffffff;
  user-select: none;
  touch-action: none;
  isolation: isolate;
}

.ba-slider__media {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
}

.ba-slider__image,
.ba-slider__overlay {
  position: absolute;
  inset: 0;
}

.ba-slider__image img,
.ba-slider__overlay img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

.ba-slider__overlay {
  z-index: 2;
  overflow: hidden;
  clip-path: inset(0 50% 0 0);
  -webkit-clip-path: inset(0 50% 0 0);
}

.ba-slider__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 0;
  z-index: 3;
  pointer-events: none;
}

.ba-slider__divider::before {
  content: "";
  position: absolute;
  left: calc(var(--ba-line-width) / -2);
  top: 0;
  bottom: 0;
  width: var(--ba-line-width);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.ba-slider__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--ba-handle-size);
  height: var(--ba-handle-size);
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.18),
    0 2px 6px rgba(0, 0, 0, 0.12);
  z-index: 4;
  cursor: ew-resize;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  pointer-events: auto;
}

.ba-slider__handle:focus-visible {
  outline: 3px solid var(--ba-focus);
  outline-offset: 3px;
}

.ba-slider__handle-icon {
  position: relative;
  width: 22px;
  height: 22px;
}

.ba-slider__handle-icon::before,
.ba-slider__handle-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-top: 2px solid #111;
  border-right: 2px solid #111;
}

.ba-slider__handle-icon::before {
  left: 1px;
  transform: translateY(-50%) rotate(225deg);
}

.ba-slider__handle-icon::after {
  right: 1px;
  transform: translateY(-50%) rotate(45deg);
}

.ba-slider__label {
  position: absolute;
  top: 16px;
  z-index: 5;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--ba-label-bg);
  color: var(--ba-label-color);
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}

.ba-slider__label--base {
  left: 16px;
}

.ba-slider__label--overlay {
  right: 16px;
}

.ba-slider__range {
  position: absolute;
  inset: 0;
  z-index: 6;
  opacity: 0;
  cursor: ew-resize;
}

.ba-slider--dragging {
  cursor: ew-resize;
}

.ba-slider--dragging .ba-slider__handle {
  cursor: ew-resize;
}

@media (max-width: 991.98px) {
  .ba-slider {
    --ba-handle-size: 52px;
    --ba-radius: 18px;
  }

  .ba-slider__media {
    height: 420px;
  }
}

@media (max-width: 767.98px) {
  .ba-slider {
    --ba-handle-size: 48px;
    --ba-radius: 16px;
    max-width: 100%;
  }

  .ba-slider__media {
    height: 320px;
  }

  .ba-slider__label {
    top: 12px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .ba-slider__label--base {
    left: 12px;
  }

  .ba-slider__label--overlay {
    right: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ba-slider,
  .ba-slider * {
    transition: none !important;
    animation: none !important;
  }
}