/* ==========================================================================
   Reusable single-image zoom lightbox (data-vaimupuu-zoom triggers)
   Namespaced separately from the [gallery] lightbox so either can load alone.
   ========================================================================== */

/* Trigger affordance: the image sits inside a bare <button> so it is
   keyboard-focusable and announced, without looking like a button. */
button[data-vaimupuu-zoom] {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: zoom-in;
}

button[data-vaimupuu-zoom]:focus-visible {
  outline: 2px solid var(--color-green-light);
  outline-offset: 2px;
}

.vaimupuu-zoom:not([open]) {
  display: none;
}

.vaimupuu-zoom[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.92);
}

.vaimupuu-zoom::backdrop {
  background: rgba(0, 0, 0, 0.92);
}

.vaimupuu-zoom__image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(96vw, 100%);
  max-height: 90vh;
  margin: auto;
  object-fit: contain;
  pointer-events: none;
}

.vaimupuu-zoom__close {
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.5rem;
  border: none;
  background: transparent;
  color: var(--color-white);
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
}

.vaimupuu-zoom__close:hover {
  opacity: 0.85;
}

.vaimupuu-zoom__close:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}
