/* Lightbox overlay for content images. Paired with lightbox.js — JS adds
 * the .lightbox-trigger class only to images that pass the size/link
 * filter, so the zoom-in cursor is honest (only appears where a click
 * actually enlarges). */

.lightbox-trigger {
  cursor: zoom-in;
  /* Skip the legacy 300ms tap delay on iOS Safari; double-tap-to-zoom is
     redundant once the lightbox is in place. */
  touch-action: manipulation;
}

.lightbox-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  cursor: zoom-out;
  -webkit-tap-highlight-color: transparent;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-overlay img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 1;
}

.lightbox-close:hover,
.lightbox-close:focus {
  background: #fff;
  outline: none;
}

/* iOS-safe scroll lock: JS sets body.top to preserve scroll position. */
body.lightbox-open {
  position: fixed;
  width: 100%;
  overflow: hidden;
}
