.lightbox-overlay {
  align-items: center;
  background-color: rgb(0 0 0 / 75%);
  bottom: 0;
  display: none;
  flex-direction: column;
  justify-content: center;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-image-dialog {
  background: none;
  border: 0;
  max-width: none;
  padding: 0;
  width: auto;
}

.lightbox-image-dialog img {
  border: #333 solid 1px;
  box-sizing: border-box;
  display: block;
  max-height: calc(100vh - 4 * var(--responsive-margin, 0.5rem));
  max-width: calc(100vw - 2 * var(--responsive-margin, 0.5rem));
}

.lightbox-caption {
  background-color: #333;
  color: #ccc;
  font-weight: bold;
  max-width: calc(100vw - 2 * var(--responsive-margin, 0.5rem));
  text-align: center;
}

.lightbox-text-dialog {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 2 * var(--responsive-margin, 0.5rem));
  max-width: none;
  padding: 0;
  width: calc(100vw - 2 * var(--responsive-margin, 0.5rem));
}

.lightbox-text-header {
  border-bottom: #333 solid 1px;
  display: flex;
}

.lightbox-text-title {
  flex: 1;
  font-weight: bold;
  padding: var(--responsive-margin, 0.5rem);
}

.lightbox-text-close {
  align-items: center;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: flex;
  font-size: 1.5rem;
  justify-content: center;
  margin-left: auto;
  padding: 0;
  width: 2.5rem;
}

.lightbox-text-close:focus-visible {
  outline: 2px solid currentcolor;
  outline-offset: -2px;
}

.lightbox-text-dialog iframe {
  border: 0;
  flex: 1;
  min-height: 0;
  width: 100%;
}

img.lightbox {
  cursor: pointer;
}
