[data-photo-link] {
  cursor: zoom-in;
}
.photo-lightbox {
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}
.photo-lightbox::backdrop {
  background: rgba(12, 9, 9, .94);
}
.lightbox-frame {
  box-sizing: border-box;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: .75rem;
  width: 100%;
  height: 100%;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}
.lightbox-stage {
  position: relative;
  display: grid;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  place-items: center;
}
.lightbox-image {
  display: block;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 1;
  touch-action: pan-y pinch-zoom;
  transition: opacity .22s ease-out, transform .2s ease-out;
}
.lightbox-image.is-dragging {
  transition: none;
}
.lightbox-image[hidden],
.lightbox-video[hidden] {
  display: none;
}
.lightbox-video {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  aspect-ratio: auto;
  background: #000;
}
.is-video .lightbox-stage {
  padding: 3.5rem 0;
}
.is-video .lightbox-previous,
.is-video .lightbox-next {
  display: grid;
  top: auto;
  bottom: .25rem;
  transform: none;
}
.lightbox-stage.is-loading .lightbox-image {
  opacity: 0;
}
.lightbox-loader {
  position: absolute;
  color: #ccc;
  font-size: .9rem;
  letter-spacing: .04em;
}
.lightbox-loader[hidden] {
  display: none;
}
.lightbox-button {
  position: absolute;
  z-index: 1;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  background: rgba(20, 16, 16, .65);
  color: #fff;
  cursor: pointer;
  font: 700 1.6rem/1 'PT Sans', sans-serif;
  place-items: center;
}
.lightbox-button:hover,
.lightbox-button:focus-visible {
  background: rgba(142, 58, 74, .92);
}
.lightbox-close {
  top: .5rem;
  right: .5rem;
}
.lightbox-share {
  top: .5rem;
  left: .5rem;
}
.photo-lightbox .lightbox-button[hidden] {
  display: none;
}
.lightbox-share svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.lightbox-share:disabled {
  cursor: wait;
  opacity: .45;
}
.lightbox-previous,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-previous {
  left: .5rem;
}
.lightbox-next {
  right: .5rem;
}
.lightbox-caption {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: center;
  min-height: 1.8rem;
  font-size: .9rem;
  text-align: center;
}
.lightbox-title {
  font-family: 'Prata', 'Noto Naskh Arabic', serif;
  font-size: 1rem;
}
.lightbox-meta,
.lightbox-count {
  color: #ccc;
}
@media (max-width: 620px) {
  .lightbox-frame {
    padding-right: max(.5rem, env(safe-area-inset-right));
    padding-left: max(.5rem, env(safe-area-inset-left));
  }
  .lightbox-caption {
    flex-wrap: wrap;
    gap: .2rem .75rem;
  }
  .lightbox-caption-text {
    flex-basis: 100%;
  }
  .lightbox-previous {
    left: .25rem;
  }
  .lightbox-next,
  .lightbox-close {
    right: .25rem;
  }
}
@media (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .lightbox-previous,
  .lightbox-next {
    display: none;
  }
}
@media (hover: none) and (pointer: coarse) {
  .lightbox-share,
  .lightbox-share:hover,
  .lightbox-share:focus-visible {
    background: rgba(20, 16, 16, .65);
  }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox-image {
    transition: none;
  }
}
