.comparison-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  cursor: ew-resize;
  background: #111;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  border-radius: var(--normal-border-radius);
  --comparison-pct: 50%;
}

.comparison-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.comparison-slider .comparison-after {
  clip-path: inset(0 calc(100% - var(--comparison-pct)) 0 0);
}

.comparison-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--comparison-pct, 50%);
  /* no divider line: keep width 0 and transparent background */
  width: 0;
  background: transparent;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 5;
}

.comparison-handle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 6;
  pointer-events: none;
}

.comparison-handle::after {
  content: "\276E\00A0\276F";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -51%);
  font-size: 16px;
  color: #ffffff;
  font-weight: bold;
  letter-spacing: 4px;
  z-index: 7;
  pointer-events: none;
}

.comparison-label {
    position: absolute;
    font-family: Bahnschrift, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: var(--comparison-label-font-size, 1.25rem);
    font-weight: 600;
    padding: 1rem 1.5rem;
    pointer-events: none;
    z-index: 10;
    bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    color: var(--comparison-label-color, #ffffff);
}

.comparison-label-left {
    left: 1rem;
}

.comparison-label-right {
    right: 1rem;
}

.comparison-label-top {
    bottom: auto;
    top: 1rem;
}

/* ── Comparison expand button (on inline gallery slider) ────────────────── */

.comparison-expand-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  pointer-events: all;
}

.comparison-slider:hover .comparison-expand-btn {
  opacity: 1.0;
}

.comparison-expand-btn:hover {
  opacity: 1 !important;
  background: var(--dark-back-hover, rgba(0, 0, 0, 0.45));
}