/* ============================================================
   MANY Retouchers — shared before/after slider (structural)
   Visual theming (fonts, colours, tag styling, grid spacing)
   lives in each variant's stylesheet. This file only carries
   the mechanics so the Swipe_Widget behaves identically.
   ============================================================ */

.swiperwidget {
  position: relative;
  width: 100%;
  overflow: hidden;
  user-select: none;
  background: #e9e9e9;            /* shows while images lazy-load */
}
.swiperwidget > img {             /* the AFTER image = base layer */
  width: 100%;
  display: block;
}
.swiperwidget .before {           /* clipped BEFORE overlay (left side) */
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 2;                     /* above the AFTER label so it wipes it */
}
.swiperwidget .before img {
  height: 100%;
  width: auto;
  display: block;
  max-width: none;
}

/* divider + handle (injected by Swipe_Widget) */
.swiperwidget .swiper-line {
  position: absolute;
  width: 2px;
  background: #fff;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 3;
  cursor: grab;
  touch-action: none;
}
/* invisible widened grab zone — grab the divider anywhere along its height */
.swiperwidget .swiper-line::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  touch-action: none;
}
.swiperwidget .swiper-line img {
  width: 44px;
  height: 44px;
  max-width: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  cursor: grab;
  touch-action: none;
}
.swiperwidget .swiper-line.active,
.swiperwidget .swiper-line.active img { cursor: grabbing; }

/* Before / After corner labels — positioned here, styled per variant */
.ba-tag {
  position: absolute;
  top: 14px;
  pointer-events: none;
}
.ba-tag-before { left: 14px; z-index: 4; }  /* inside .before, clipped with it */
.ba-tag-after  { right: 14px; z-index: 1; } /* beneath .before, so it gets covered */
