/*
  Vibedsites by Pressific. Image lightbox styling.
  Scoped under .vibed-lb so it cannot touch a converted site's own design.
  Website developed by pressific.com Emily Park, Dileep C. Kaluaratchie and Tech Generation Ltd.
*/
.vibed-lb {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(10, 10, 10, .82);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .22s ease;
}
.vibed-lb.is-open { opacity: 1; }
.vibed-lb[hidden] { display: none; }

.vibed-lb__figure {
  margin: 0; max-width: min(1200px, 100%); max-height: 100%;
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
  transform: scale(.96) translateY(8px);
  transition: transform .28s cubic-bezier(.22, .61, .36, 1);
}
.vibed-lb.is-open .vibed-lb__figure { transform: none; }

.vibed-lb__img {
  display: block; max-width: 100%; max-height: 82vh;
  width: auto; height: auto;
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  background: #fff;
}
.vibed-lb__cap {
  color: #f2f2f2; font-size: .9rem; line-height: 1.5; text-align: center;
  max-width: 62ch; text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.vibed-lb__close {
  position: absolute; top: .75rem; right: 1rem;
  width: 2.75rem; height: 2.75rem;
  font-size: 2rem; line-height: 1;
  color: #fff; background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 50%;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.vibed-lb__close:hover { background: rgba(255, 255, 255, .24); transform: scale(1.06); }
.vibed-lb__close:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* A link that opens an image should say so on hover. */
a[href$=".jpg"] img, a[href$=".jpeg"] img, a[href$=".png"] img,
a[href$=".webp"] img, a[href$=".gif"] img {
  transition: opacity .25s ease;
}
@media (hover: hover) {
  a[href$=".jpg"]:hover img, a[href$=".jpeg"]:hover img, a[href$=".png"]:hover img,
  a[href$=".webp"]:hover img, a[href$=".gif"]:hover img { opacity: .88; }
}

@media (prefers-reduced-motion: reduce) {
  .vibed-lb, .vibed-lb__figure, .vibed-lb__close { transition: none; }
  .vibed-lb__figure { transform: none; }
}
