.gallery-window {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}

.gallery-glass {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 1;
}

.gallery-glass--fading { opacity: 0; transition: opacity 750ms ease-out; }

.photo-wipe {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--site-hero, #101e2a);
  color: var(--foreground);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.photo-wipe:hover {
  border-color: var(--secondary);
  background: var(--site-placeholder, #1a3042);
}

.photo-wipe svg {
  display: block;
  grid-area: 1 / 1;
  width: 24px;
  height: 24px;
  pointer-events: none;
}

.photo-wipe__sponge {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.photo-wipe[aria-pressed="false"] .photo-wipe__droplet,
.photo-wipe[aria-pressed="true"] .floating-tool__assembly {
  display: none;
}

.photo-wipe.floating-tool {
  --tool-width: 160px;
  --tool-height: 106.667px;
  --tool-bob-distance: -12px;
  --tool-bob-angle: 8deg;
  position: absolute;
  top: var(--gallery-tool-top, 88px);
  left: var(--gallery-tool-left, 24px);
  width: calc(var(--tool-width) + 12px);
  height: calc(var(--tool-height) + 45px);
  padding: 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  touch-action: var(--tool-touch-action, pan-y pinch-zoom);
}

.photo-wipe[hidden] {
  display: none;
}

.photo-wipe:not(.floating-tool) {
  position: absolute;
  z-index: 4;
  top: 12px;
  right: calc(var(--safe-gutter-right) + 12px);
}
