.docs-content .main-content figure.doc-figure {
  margin: 1.25rem auto;
  max-width: 100%;
  text-align: center;
}

.docs-content .main-content .doc-figure__link {
  display: inline-block;
  cursor: zoom-in;
  line-height: 0;
  text-decoration: none;
}

.docs-content .main-content .doc-figure__link:focus-visible {
  outline: 2px solid var(--primary, #0155d4);
  outline-offset: 4px;
  border-radius: 0.25rem;
}

.docs-content .main-content .doc-figure__img {
  max-width: min(32rem, 50%);
  height: auto;
  vertical-align: middle;
}

@media (max-width: 767px) {
  .docs-content .main-content .doc-figure__img {
    max-width: 100%;
  }
}

.docs-content .main-content .doc-figure__caption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--gray-600, #6c757d);
}

[data-dark-mode] .docs-content .main-content .doc-figure__caption {
  color: var(--gray-500, #adb5bd);
}

.docs-content .main-content li > figure.doc-figure {
  width: 100%;
}

.doc-figure-lightbox {
  padding: 0;
  border: none;
  margin: auto;
  max-width: 95vw;
  max-height: 95vh;
  background: transparent;
  overflow: visible;
}

.doc-figure-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.88);
}

.doc-figure-lightbox__close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1;
  border: 0;
  border-radius: 0.25rem;
  padding: 0.25rem 0.625rem;
  font-size: 1.75rem;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.doc-figure-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.doc-figure-lightbox__content {
  margin: 0;
  text-align: center;
}

.doc-figure-lightbox__content img {
  display: block;
  max-width: 95vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.doc-figure-lightbox__content figcaption {
  margin-top: 0.75rem;
  padding: 0 1rem;
  font-size: 0.9375rem;
  color: #fff;
}
