/* ── Before / After Comparison ─────────────────────────────── */
.cew-bac {
  width: 100%;
}

.cew-bac-inner {
  width: 100%;
  max-width: 1280px !important;
  margin: 0 auto;
}

/* ── Frame ───────────────────────────────────────────────────── */
.cew-bac-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  background-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
}

/* ── Image layers ────────────────────────────────────────────── */
.cew-bac-layer {
  position: absolute;
  inset: 0;
}

.cew-bac-layer--after {
  z-index: 1;
}

.cew-bac-layer--before {
  z-index: 2;
  clip-path: inset(0 50% 0 0);
  transition: clip-path 220ms ease-out;
}

.cew-bac-picture {
  display: block;
  width: 100%;
  height: 100%;
}

.cew-bac-img {
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

/* ── Labels ──────────────────────────────────────────────────── */
.cew-bac-label {
  position: absolute;
  bottom: 35px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  color: #ffffff;
  font-family: 'Manrope', sans-serif;
  font-size: 32px;
  font-weight: 400;
  font-style: normal;
  line-height: 30px;
  letter-spacing: -0.52px;
  background-color: transparent;
  pointer-events: none;
  white-space: nowrap;
}

.cew-bac-label--before {
  left: 15px;
}

.cew-bac-label--after {
  right: 15px;
}

/* ── Divider ─────────────────────────────────────────────────── */
.cew-bac-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 3;
  width: 3px;
  margin-left: -1.5px;
  background-color: #ffffff;
  transition: left 220ms ease-out;
  pointer-events: none;
}

.cew-bac-frame--divider-shadow .cew-bac-divider {
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.45);
}

/* ── Handle ──────────────────────────────────────────────────── */
.cew-bac-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  width: 34px;
  height: 54px !important;
  margin: -24px 0 0 -17px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background-color: #ffffff;
  outline: none;
}

.cew-bac-frame--handle-shadow .cew-bac-handle {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.cew-bac-handle:hover {
  transform: scale(1.06);
}

.cew-bac-handle-icon {
  display: inline-flex;
  pointer-events: none;
}

.cew-bac-handle-icon svg {
  height: 34px;
  flex: 1 0 0;
}

.cew-bac-frame.is-dragging {
  cursor: grabbing;
}

.cew-bac-frame.is-dragging .cew-bac-layer--before,
.cew-bac-frame.is-dragging .cew-bac-divider,
.cew-bac-frame.is-dragging .cew-bac-handle {
  transition: none;
}

.cew-bac-frame.is-dragging .cew-bac-handle {
  transform: scale(1.06);
}

@media (prefers-reduced-motion: reduce) {
  .cew-bac-layer--before,
  .cew-bac-divider,
  .cew-bac-handle {
    transition: none;
  }
}

/* Tablet — 1024px and below */
@media (max-width: 1024px) {
  .cew-bac-label {
    font-size: 28px;
  }
}

/* Mobile — 768px and below */
@media (max-width: 768px) {
  .cew-bac-label {
    font-size: 26px;
  }
}
