/* ==========================================================================
   Swipe Compare Overlay (Single-Map Dual Pane + Clip Path)
   ========================================================================== */

#swipe-overlay {
  position: absolute;
  inset: 0;
  z-index: var(--z-compare);
  pointer-events: none;
}

#swipe-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--accent-lagoon);
  box-shadow: 0 0 12px rgba(44, 229, 208, 0.55);
  pointer-events: none;
}

#swipe-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-bay);
  border: 2px solid var(--accent-lagoon);
  color: var(--accent-lagoon);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 18px rgba(4, 8, 14, 0.7);
  cursor: ew-resize;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  transition: transform 120ms var(--ease-out), background 120ms;
}

#swipe-handle:hover,
#swipe-handle.dragging {
  transform: translate(-50%, -50%) scale(1.08);
  background: var(--surface-raised);
}

#swipe-handle svg {
  width: 20px;
  height: 20px;
}

.swipe-corner-label {
  position: absolute;
  bottom: 18px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--surface-glass-heavy);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-shell);
  pointer-events: none;
  box-shadow: var(--shadow-sm);
}

.swipe-corner-label.is-left {
  left: 14px;
}

.swipe-corner-label.is-right {
  right: 60px;
  border-color: var(--accent-lagoon-border);
  color: var(--accent-lagoon);
}

#map-stage.detail-open .swipe-corner-label.is-right {
  right: calc(var(--detail-w) + 60px);
}

/* Floating Mode Switcher for Swipe Compare */
#swipe-toolbar {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface-glass-heavy);
  border: 1px solid var(--accent-lagoon-border);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
}

#swipe-toolbar button {
  height: 28px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-haze);
  white-space: nowrap;
}

#swipe-toolbar button:hover {
  color: var(--ink-shell);
}

#swipe-toolbar button.active {
  background: var(--accent-lagoon);
  color: var(--bg-bay);
  font-weight: 700;
}

#swipe-toolbar .swipe-close-btn {
  width: 28px;
  padding: 0;
  display: grid;
  place-items: center;
}
