/* ligatio.be: what replaces the NextGEN tiled gallery and Fancybox, plus small fixes for the static copy. */

/* Tiled gallery: the exact mosaic NextGEN computed for 780 px (rows of column groups), expressed in
   percentages by tools/import_wp.py, so it scales with the content width like the old script did. Each tile
   has the old 2 px margin around its image. */
.tiles {
  max-width: 780px;
  margin: 0 0 1.5em;
}
.tiles .t-row {
  display: flex;
  width: 100%;
}
.tiles .t-group {
  display: flex;
  flex-direction: column;
}
.tiles .tile {
  display: block;
  box-sizing: border-box;
  padding: 2px;
}
.tiles .tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-select: none;
  user-select: none;
}

/* Grid album on /visual/: box size and captions as NextGEN's script set them. */
.nextgen_pro_grid_album .image_container {
  width: 240px;
  padding: 20px;
}
.nextgen_pro_grid_album .caption_link a {
  display: block;
}
.nextgen_pro_grid_album .image_container br.clear {
  display: none;
}

/* Lightbox. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 40px);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
  -webkit-user-select: none;
  user-select: none;
}
.lightbox button {
  position: absolute;
  border: 0;
  background: none;
  color: #fff;
  font-size: 48px;
  line-height: 1;
  padding: 10px 16px;
  cursor: pointer;
  opacity: 0.75;
}
.lightbox button:hover,
.lightbox button:focus-visible { opacity: 1; }
.lightbox .lb-close { top: 4px; right: 8px; }
.lightbox .lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .lightbox img { max-width: 100vw; }
  .lightbox .lb-prev,
  .lightbox .lb-next { top: auto; bottom: 8px; transform: none; }
}
body.lb-open { overflow: hidden; }

/* Accordions: headers are keyboard-operable now. */
.advgb-accordion-header:focus-visible { outline: 2px solid #999; outline-offset: 2px; }

/* Contact form while sending (Contact Form 7 showed a spinner). */
.wpcf7-form.submitting .wpcf7-submit { opacity: 0.6; cursor: progress; }
