/* Full-screen image viewer for gallery screenshots (built by main.js) */

.lightbox
{
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: #ffffff;
  background-color: rgba(5, 6, 8, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lightbox[open]
{
  display: grid;
  place-items: center;
  animation: lightbox-fade 0.3s var(--ease);
}

.lightbox::backdrop
{
  background: transparent;
}

.lightbox figure
{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 92vw;
}

.lightbox figure img
{
  display: block;
  max-width: 92vw;
  max-height: 84dvh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lightbox figure img.is-entering
{
  animation: lightbox-zoom 0.4s var(--ease);
}

.lightbox figcaption
{
  max-width: 70ch;
  font-size: 1rem;
  color: var(--text-muted);
  text-align: center;
}

.lightbox button
{
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  font: inherit;
  font-size: 1.8rem;
  line-height: 1;
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background-color 0.25s, transform 0.25s var(--ease);
}

.lightbox button:hover
{
  background-color: var(--accent);
  color: var(--on-accent);
}

.lightbox-close
{
  top: 16px;
  right: 16px;
}

.lightbox-prev
{
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next
{
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev:hover
{
  transform: translateY(-50%) translateX(-2px);
}

.lightbox-next:hover
{
  transform: translateY(-50%) translateX(2px);
}

@keyframes lightbox-fade
{
  from { opacity: 0; }
}

@keyframes lightbox-zoom
{
  from { opacity: 0; transform: scale(0.96); }
}

@media (max-width: 600px)
{
  .lightbox-prev, .lightbox-next
  {
    top: auto;
    bottom: 16px;
    transform: none;
  }

  .lightbox-prev:hover, .lightbox-next:hover
  {
    transform: none;
  }
}
