.tm-lightbox__trigger {
  cursor: zoom-in;
}

.tm-lightbox-lock {
  overflow: hidden;
}

.tm-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: rgb(0 0 0 / 88%);
}

.tm-lightbox--open {
  display: flex;
}

.tm-lightbox__image {
  display: block;
  max-width: calc(100vw - 6rem);
  max-height: calc(100vh - 6rem);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 8px 40px rgb(0 0 0 / 35%);
}

.tm-lightbox__close,
.tm-lightbox__nav {
  position: fixed;
  z-index: 1;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  opacity: .82;
}

.tm-lightbox__close:hover,
.tm-lightbox__close:focus-visible,
.tm-lightbox__nav:hover,
.tm-lightbox__nav:focus-visible {
  opacity: 1;
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.tm-lightbox__close {
  top: 1rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 2.25rem;
  appearance: none;
  -webkit-appearance: none;
}

/* The close control intentionally has no visible frame, including keyboard focus. */
.tm-lightbox__close:hover,
.tm-lightbox__close:focus,
.tm-lightbox__close:focus-visible {
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.tm-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  padding: .75rem;
  font-size: 3.5rem;
}

.tm-lightbox__nav--prev { left: .75rem; }
.tm-lightbox__nav--next { right: .75rem; }

@media (max-width: 640px) {
  .tm-lightbox { padding: 3rem 2.75rem; }
  .tm-lightbox__image {
    max-width: calc(100vw - 5.5rem);
    max-height: calc(100vh - 6rem);
  }
}
