/* Lightbox for help doc images and GIF players. */
.help-doc img:not(.help-gif-player-img),
.help-doc .help-gif-player {
  cursor: zoom-in;
}

.help-doc .help-gif-player-btn {
  cursor: pointer;
}

.help-doc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1080;
  box-sizing: border-box;
  pointer-events: auto;
}

.help-doc-lightbox--closing {
  pointer-events: none;
}

.help-doc-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0%);
  transition: background-color 0.32s ease;
}

.help-doc-lightbox--open .help-doc-lightbox-backdrop {
  background: rgb(0 0 0 / 72%);
}

.help-doc-lightbox--closing .help-doc-lightbox-backdrop {
  background: rgb(0 0 0 / 0%);
}

.help-doc-lightbox-stage {
  position: fixed;
  z-index: 1;
  max-width: min(96vw, 72rem);
  max-height: 92vh;
  transform-origin: top left;
  will-change: transform, opacity;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
  opacity: 0;
}

.help-doc-lightbox--open .help-doc-lightbox-stage {
  opacity: 1;
}

.help-doc-lightbox--closing .help-doc-lightbox-stage {
  opacity: 0;
  transition-duration: 0.22s;
}

.help-doc-lightbox-media {
  display: block;
  border-radius: 0.5rem;
  box-shadow: 0 24px 64px rgb(0 0 0 / 45%);
  user-select: none;
  -webkit-user-drag: none;
}

.help-doc-lightbox-stage .help-doc-lightbox-media {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

.help-doc-lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgb(17 24 39 / 78%);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.2s ease 0.12s, transform 0.2s ease 0.12s, background-color 0.15s ease;
}

.help-doc-lightbox--open .help-doc-lightbox-close {
  opacity: 1;
  transform: scale(1);
}

.help-doc-lightbox-close:hover {
  background: rgb(17 24 39 / 92%);
}

.help-doc-lightbox-close svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .help-doc-lightbox-backdrop,
  .help-doc-lightbox-stage,
  .help-doc-lightbox-close {
    transition: none !important;
  }
}
