:root {
  --handle-size: 36px;
  --handle-ring: 4px;
  --line-width: 2px;
}

.ba-wrap { width: 100%; }

.ba {
  position: relative;
  width: 100%;
  /* aspect-ratio задаём инлайном из шорткода через style="aspect-ratio:…;" */
  border-radius: 16px;
  overflow: hidden;
  background: #111418;
  box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.06);
  user-select: none;
  touch-action: none;
  --pos: 50;
  color: rgba(255,255,255,.9);
}

.ba__img,
.ba__img--top {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

.ba__top {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: hidden; pointer-events: none;
  clip-path: polygon(0 0, calc(var(--pos) * 1%) 0, calc(var(--pos) * 1%) 100%, 0 100%);
}

.ba__divider {
  position: absolute; top: 0; bottom: 0;
  left: calc(var(--pos) * 1%);
  transform: translateX(-50%);
  width: var(--line-width);
  background: currentColor;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25);
  pointer-events: none;
}

.ba__handle {
  position: absolute;
  left: calc(var(--pos) * 1%);
  top: 50%;
  transform: translate(-50%, -50%);
  width: var(--handle-size); height: var(--handle-size);
  border-radius: 999px; border: none;
  background: #ffffff; color: #111418;
  display: grid; place-items: center;
  cursor: ew-resize;
  box-shadow:
    0 10px 20px rgba(0,0,0,.45),
    0 0 0 var(--handle-ring) rgba(255,255,255,.15),
    inset 0 0 0 1px rgba(0,0,0,.12);
  font-size: 18px; line-height: 1; font-weight: 700;
}

.ba__handle:focus-visible {
  outline: none;
  box-shadow:
    0 10px 20px rgba(0,0,0,.45),
    0 0 0 calc(var(--handle-ring) + 2px) #60a5fa,
    inset 0 0 0 1px rgba(0,0,0,.12);
}

.ba__label {
  position: absolute; top: 12px;
  padding: 6px 10px;
  font-weight: 600; font-size: 12px; letter-spacing: .4px;
  background: rgba(0,0,0,.55); color: #fff; border-radius: 999px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  pointer-events: none; user-select: none;
}
.ba__label--left { left: 12px; }
.ba__label--right { right: 12px; }
