/*
 * Replacement lightbox for the Photo Gallery (BWG) plugin.
 *
 * The plugin's own lightbox fetched each image through WordPress admin-ajax,
 * which does not exist on a static host. The markup it renders is untouched;
 * only the click behaviour is taken over. Colours follow the theme.
 */
.nmpc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 17, 17, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.nmpc-lightbox[data-open='true'] {
  opacity: 1;
  visibility: visible;
}

.nmpc-lightbox__figure {
  margin: 0;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.nmpc-lightbox__image {
  max-width: 92vw;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

.nmpc-lightbox__caption {
  color: #f2f2f2;
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
  max-width: 80vw;
}

.nmpc-lightbox__counter {
  color: #b9b9b9;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.nmpc-lightbox__button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}

.nmpc-lightbox__button:hover,
.nmpc-lightbox__button:focus-visible {
  background: #3172b9;
  outline: none;
}

.nmpc-lightbox__button[hidden] { display: none; }

.nmpc-lightbox__prev { left: 16px; }
.nmpc-lightbox__next { right: 16px; }
.nmpc-lightbox__close { top: 16px; right: 16px; font-size: 22px; }

@media (max-width: 640px) {
  .nmpc-lightbox__button { width: 40px; height: 40px; font-size: 22px; }
  .nmpc-lightbox__prev { left: 8px; }
  .nmpc-lightbox__next { right: 8px; }
  .nmpc-lightbox__image { max-height: 68vh; }
}

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