/* Keep documentation images consistent and responsive */
.md-content img {
  width: 760px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0.75rem auto;
}

/* Enlarge the header logo while keeping the header compact. */
.md-header__button.md-logo {
  margin: 0 0.2rem;
  padding: 0.2rem;
}

.md-header__button.md-logo img {
  height: 1.5rem;
  width: auto;
}

/* Open documentation screenshots without leaving the page. */
.md-content .image-zoom-trigger {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0.75rem auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.md-content .image-zoom-trigger img {
  margin: 0;
}

.image-zoom-trigger:focus-visible,
.image-zoom-close:focus-visible,
.image-zoom-size:focus-visible {
  outline: 3px solid var(--md-accent-fg-color, #526cfe);
  outline-offset: 4px;
}

body.image-zoom-open {
  overflow: hidden;
}

.image-zoom-dialog {
  box-sizing: border-box;
  width: calc(100vw - 2rem);
  height: calc(100vh - 2rem);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 3rem 1rem 1rem;
  overflow: auto;
  border: 0;
  border-radius: 0.4rem;
  background: var(--md-default-bg-color, #fff);
  color: var(--md-default-fg-color, #222);
}

.image-zoom-dialog::backdrop {
  background: rgb(0 0 0 / 80%);
}

.image-zoom-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1;
  padding: 0.4rem 0.75rem;
  border: 1px solid currentColor;
  border-radius: 0.25rem;
  background: var(--md-default-bg-color, #fff);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.image-zoom-dialog figure {
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
}

.image-zoom-size {
  display: block;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.image-zoom-size img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 9rem);
  object-fit: contain;
}

.image-zoom-dialog figcaption,
.image-zoom-hint {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
}

.image-zoom-hint {
  opacity: 0.75;
}

.image-zoom-original figure,
.image-zoom-original .image-zoom-size,
.image-zoom-original .image-zoom-size img {
  max-width: none;
  max-height: none;
}

.image-zoom-original .image-zoom-size {
  cursor: zoom-out;
}
