/* Wrapper */
.bae-wrapper { width: 100%; }

/* Container keeps height from the AFTER image in normal flow */
.bae-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
}

/* Images */
.bae-img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

/* AFTER image defines height (stay in normal flow) */
.bae-inner .bae-after {
  position: relative;
  z-index: 1;
}

/* BEFORE image overlays (absolute) */
.bae-inner .bae-before {
  position: absolute;
  inset: 0;
  z-index: 2;
  clip-path: inset(0 calc(100% - 50%) 0 0); /* default 50% */
}

/* Orientation overrides */
.bae-wrapper[data-orientation="horizontal"] .bae-before {
  clip-path: inset(0 calc(100% - 50%) 0 0);
}
.bae-wrapper[data-orientation="vertical"] .bae-before {
  clip-path: inset(calc(100% - 50%) 0 0 0);
}

/* Labels — centered vertically on sides, hidden by default (show on hover/focus) */
.bae-label {
  position: absolute;
  z-index: 3;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1;
  background-color: rgba(22,31,41,.75);
  color: #fff;
  opacity: 0;
  transform: translateY(-50%);
  top: 50%;
  transition: opacity .2s ease;
  pointer-events: none;
}
.bae-label-before { left: 16px; }
.bae-label-after  { right: 16px; }
.bae-wrapper:hover .bae-label,
.bae-wrapper:focus-within .bae-label {
  opacity: 1;
}

/* Handle & divider line */
.bae-handle {
  position: absolute;
  z-index: 4;
  top: 0; bottom: 0;
  width: 0;
  margin-left: 0;
}
.bae-handle::before {
  /* thin divider line */
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -1px;
  width: 2px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 0 0 1px rgba(0,0,0,.06) inset;
}

/* Center knob looking like screenshot */
.bae-handle .bae-handle-arrow {
  position: absolute;
  top: 50%;
  left: -22px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  transform: translateY(-50%);
}
.bae-handle .bae-handle-arrow:after {
  content: "→";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  color: #2a2f36;
}

/* Cursors */
.bae-inner { cursor: ew-resize; }
.bae-wrapper[data-orientation="vertical"] .bae-inner { cursor: ns-resize; }
