/* Full-screen painting viewer (assets/js/zoom-viewer.js). Ivory room, ink controls, the
   painting never cropped or tinted; it is only scaled. */
html.hz-open, html.hz-open body { overflow: hidden; }

.hz {
  position: fixed; inset: 0; z-index: 2147483000;
  background: #FBF9F4; color: #26171F;
  opacity: 0; transition: opacity .35s cubic-bezier(.22,.8,.26,1);
  touch-action: none; -webkit-user-select: none; user-select: none;
}
.hz[hidden] { display: none; }
.hz.is-open { opacity: 1; }
.hz:focus { outline: none; }

.hz-stage {
  position: absolute; inset: 64px 72px 64px; display: flex; align-items: center; justify-content: center;
  overflow: hidden; cursor: zoom-in;
}
.hz.is-zoomed .hz-stage { cursor: zoom-out; }
.hz-image { display: block; max-width: none; transform-origin: center center; will-change: transform; }

.hz-close, .hz-arrow {
  position: absolute; z-index: 2; border: 0; background: none; color: #26171F; cursor: pointer;
  font: 500 12px/1 var(--hui-font-label); letter-spacing: .14em; text-transform: uppercase;
}
.hz-close { top: 18px; right: 20px; min-height: 44px; padding: 0 12px; }
.hz-arrow { top: 50%; width: 52px; height: 52px; margin-top: -26px; font-size: 22px; letter-spacing: 0; }
.hz-prev { left: 10px; }
.hz-next { right: 10px; }
.hz-arrow[hidden] { display: none; }
.hz-close:hover, .hz-arrow:hover { color: #66023C; }
.hz-close:focus-visible, .hz-arrow:focus-visible { outline: 1px solid #66023C; outline-offset: 2px; }

.hz-foot {
  position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 22px;
  font: 400 16px/1.4 var(--hui-font-body); color: #67565E; pointer-events: none;
}
.hz.is-zoomed .hz-hint { opacity: 0; transition: opacity .3s; }
.hz.is-zoomed .hz-arrow { opacity: .35; }

@media (max-width: 700px) {
  .hz-stage { inset: 56px 0 52px; }
  .hz-arrow { display: none; }
  .hz-close { top: 8px; right: 6px; }
  .hz-foot { bottom: 14px; flex-direction: column; align-items: center; gap: 2px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .hz { transition: none; }
}

/* Painting pages: the photograph opens the viewer. */
.hz-zoomable { position: relative; }
.hz-zoomable #painting-main-image { cursor: zoom-in; }
.hz-open-button {
  position: absolute; right: 12px; bottom: 6px; z-index: 2;
  border: 0; background: none; padding: 10px 4px; min-height: 44px; cursor: pointer; color: #67565E;
  font: 500 11px/1 var(--hui-font-label); letter-spacing: .14em; text-transform: uppercase;
}
.hz-open-button:hover span { color: #26171F; text-decoration: underline; text-underline-offset: 5px; }
.hz-open-button:focus-visible { outline: 1px solid #66023C; outline-offset: 2px; }

/* Selected Works: the painting in its viewer opens the close view. */
.sw-viewer-figure img.hz-zoomable-img { cursor: zoom-in; }
