.v12lb[hidden] {
  display: none !important;
}

.v12lb {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

.v12lb__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(3px);
}

.v12lb__panel {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: 12px;
  width: min(96vw, 1440px);
  max-height: 96vh;
  padding: 52px 12px 12px;
  box-sizing: border-box;
}

.v12lb__image-wrap {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
}

.v12lb__image {
  display: block;
  max-width: 100%;
  max-height: calc(88vh - 80px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
}

.v12lb__caption {
  grid-column: 1 / -1;
  grid-row: 2;
  max-width: min(90vw, 900px);
  color: #eee;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

.v12lb__button {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(25, 25, 25, 0.78);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  transition: background 120ms ease, transform 120ms ease;
}

.v12lb__button[hidden] {
  display: none;
}

.v12lb__button:hover {
  background: rgba(70, 70, 70, 0.95);
  transform: scale(1.06);
}

.v12lb__button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.v12lb__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 42px;
  height: 42px;
  font-size: 29px;
}

.v12lb__previous,
.v12lb__next {
  width: 44px;
  height: 44px;
  font-size: 28px;
}

.v12lb__previous {
  grid-column: 1;
  grid-row: 1;
}

.v12lb__next {
  grid-column: 3;
  grid-row: 1;
}

@media (max-width: 600px) {
  .v12lb__panel {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 4px;
    width: 100vw;
    padding: 56px 4px 12px;
  }

  .v12lb__previous,
  .v12lb__next {
    width: 36px;
    height: 36px;
    font-size: 23px;
  }

  .v12lb__image {
    max-width: calc(100vw - 88px);
    max-height: calc(82vh - 80px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .v12lb__button {
    transition: none;
  }
}
