.preview-zoom-backdrop {
  position: fixed;
  inset: 0;
  background: var(--overlay-backdrop);
  transition: background 0.25s ease, opacity 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 2000000;
  cursor: zoom-out;
  opacity: 0;
  pointer-events: none;
}

.preview-zoom-backdrop--visible {
  opacity: 1;
  background: var(--overlay-backdrop);
  pointer-events: auto;
}

.preview-zoom__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 95vw;
  max-height: 95vh;
  z-index: 3000000;
}

.preview-zoom__image {
  max-width: 95vw;
  max-height: 95vh;
  width: auto;
  height: auto;
}

.preview-zoom__scroll {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 95vw;
  max-height: 95vh;
  box-shadow: 0 32px 120px var(--shadow-deep);
}

.preview-zoom__scroll:focus {
  outline: none;
}

.preview-zoom__scroll--native {
  overflow: auto;
  cursor: zoom-out;
  justify-content: flex-start;
  align-items: flex-start;
}

.preview-zoom__nav {
  position: absolute;
  bottom: 1em;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.preview-zoom__stage:hover .preview-zoom__nav,
.preview-zoom__stage:focus-within .preview-zoom__nav {
  opacity: 1;
  pointer-events: auto;
}

.preview-zoom__nav-button {
  width: 2.8rem;
  height: 2.8rem;
  border: none;
  border-radius: 999px;
  background: var(--preview-nav-bg);
  color: var(--preview-nav-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1;
  transition: background 0.15s ease, transform 0.15s ease;
  box-shadow: 0 12px 28px var(--shadow-strong);
}

.preview-zoom__nav-button:hover {
  background: var(--preview-nav-bg-hover);
}

.preview-zoom__nav-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.preview-zoom__nav-button svg {
  width: 1.5rem;
  height: 1.5rem;
}

.preview-zoom__nav-button[disabled] {
  opacity: 0.35;
  cursor: default;
}

