/* TwentyTwenty (Horizontal Left/Right) */

.twentytwenty-container{
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  background: #f6f6f6;

  /* Critical for mobile drag */
  touch-action: none;
}

.twentytwenty-container *{
  /* Critical for mobile drag (iOS Safari especially) */
  touch-action: none;
}

/* Let images establish natural layout before JS wraps them */
.twentytwenty-container img{
  display: block;
  width: 100%;
  height: auto;
  -webkit-user-drag: none;
  user-drag: none;

  /* Prevent images from eating touches */
  pointer-events: none;
}

/* Layers created by JS */
.twentytwenty-before,
.twentytwenty-after{
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.twentytwenty-after{
  z-index: 1;
}

.twentytwenty-before{
  z-index: 2;
  width: 50%; /* default split before JS adjusts */
}

/* Images fill container */
.twentytwenty-before img,
.twentytwenty-after img{
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* White divider line down the center of the split */
.twentytwenty-separator{
  position: absolute;
  top: 0;
  height: 100%;
  width: 3px;
  background: #fff;
  z-index: 35;
  box-shadow: 0 0 10px rgba(0,0,0,0.25);
}

/* Labels */
.twentytwenty-overlay{
  position: absolute;
  inset: 0;
  z-index: 25;
  pointer-events: none;
}

.twentytwenty-before-label,
.twentytwenty-after-label{
  position: absolute;
  top: 10px;
  color: #fff;
  font-size: 13px;
  letter-spacing: .08em;
  z-index: 30;
}

.twentytwenty-before-label{ left: 10px; }
.twentytwenty-after-label  { right: 10px; }

.twentytwenty-before-label:before,
.twentytwenty-after-label:before{
  content: attr(data-content);
  background: rgba(0,0,0,0.35);
  padding: 6px 12px;
  border-radius: 3px;
}

/* Handle */
.twentytwenty-handle{
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 48px;             /* thumb-friendly */
  width: 48px;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(0,0,0,.35);
  z-index: 40;
  cursor: ew-resize;
  background: rgba(255,255,255,0.12);

  /* MUST receive touches */
  pointer-events: auto;
}

.twentytwenty-left-arrow,
.twentytwenty-right-arrow{
  width: 0;
  height: 0;
  border: 6px inset transparent;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.twentytwenty-left-arrow{
  border-right: 6px solid #fff;
  left: 12px;
}

.twentytwenty-right-arrow{
  border-left: 6px solid #fff;
  right: 12px;
}