.basicLightbox{position:fixed;display:flex;justify-content:center;align-items:center;top:0;left:0;width:100%;height:100vh;background:rgba(0,0,0,.8);opacity:.01;transition:opacity .4s ease;z-index:1000;will-change:opacity}.basicLightbox--visible{opacity:1}.basicLightbox__placeholder{max-width:100%;-webkit-transform:scale(.9);transform:scale(.9);transition:-webkit-transform .4s ease;transition:transform .4s ease;transition:transform .4s ease,-webkit-transform .4s ease;z-index:1;will-change:transform}.basicLightbox__placeholder>iframe:first-child:last-child,.basicLightbox__placeholder>img:first-child:last-child,.basicLightbox__placeholder>video:first-child:last-child{display:block;position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;max-width:95%;max-height:95%}.basicLightbox__placeholder>iframe:first-child:last-child,.basicLightbox__placeholder>video:first-child:last-child{pointer-events:auto}.basicLightbox__placeholder>img:first-child:last-child,.basicLightbox__placeholder>video:first-child:last-child{width:auto;height:auto}.basicLightbox--iframe .basicLightbox__placeholder,.basicLightbox--img .basicLightbox__placeholder,.basicLightbox--video .basicLightbox__placeholder{width:100%;height:100%;pointer-events:none}.basicLightbox--visible .basicLightbox__placeholder{-webkit-transform:scale(1);transform:scale(1)}

/*
  index.js builds the lightbox content as a close button, optional
  prev/next buttons and a <figure> holding the image plus a caption and
  counter (see openLightbox there). With several children in the
  placeholder, the vendor's `:first-child:last-child` selectors above
  (tuned for a single bare <img>) no longer match, so the rules below
  take over layout and pointer-events.

  The backdrop is a fixed deep plum in both themes: photos read best on
  near-black, and the plum keeps it part of the site rather than a
  generic grey overlay. All text and controls on it are light, checked
  against that backdrop in either theme (caption ≥ 12.7:1, counter
  ≥ 6.4:1, button glyphs ≥ 8.2:1).
*/
.lightbox {
  --lightbox-bg: rgba(18, 11, 20, .96);
  --lightbox-text: #e2d5e4;
  --lightbox-muted: #a596a8;
  --lightbox-control: rgba(54, 34, 60, .85);
  --lightbox-control-hover: #4a2f4d;
  background: var(--lightbox-bg);
}
.lightbox .basicLightbox__placeholder {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.lightbox-figure {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  /* room for the close button on top and the nav buttons below */
  padding: 4.5rem 1rem 5rem;
}
.lightbox-image {
  flex: 0 1 auto;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: auto;
}
.lightbox-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: .25rem 1rem;
  max-width: 40rem;
  text-align: center;
  font-size: .875rem;
  line-height: 1.4;
  pointer-events: auto;
}
.lightbox-meta:not(:has(> :not([hidden]))) {
  display: none;
}
.lightbox-caption {
  margin: 0;
  color: var(--lightbox-text);
}
.lightbox-counter {
  margin: 0;
  color: var(--lightbox-muted);
  font-variant-numeric: tabular-nums;
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--lightbox-control);
  color: var(--lightbox-text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  transition: background-color .2s ease;
}
.lightbox-close {
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
}
/* On small screens the arrows sit in the bottom corners, in thumb reach. */
.lightbox-nav {
  bottom: 1rem;
}
.lightbox-prev {
  left: 1rem;
}
.lightbox-next {
  right: 1rem;
}
.lightbox-close:hover,
.lightbox-nav:hover {
  background: var(--lightbox-control-hover);
}
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  background: var(--lightbox-control-hover);
  outline: 2px solid var(--lightbox-text);
  outline-offset: 2px;
}

@media screen and (min-width: 60rem) {
  .lightbox-figure {
    padding: 2rem 5.5rem;
  }
  .lightbox-nav {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }
  .lightbox-prev {
    left: 1.5rem;
  }
  .lightbox-next {
    right: 1.5rem;
  }
}
