.fancybox-active {
  overflow: hidden;
}

.fancybox__container {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
}

.fancybox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
}

.fancybox__toolbar {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
}

.fancybox__viewport {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 24px;
}

.fancybox__content {
  max-width: min(100vw - 48px, 1000px);
  max-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
}

.fancybox__content img,
.fancybox__content video {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 72px);
  width: auto;
  height: auto;
}

.fancybox__button {
  background: rgba(0, 0, 0, 0.55);
  border: 0;
  color: #fff;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.fancybox__button > * {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  line-height: 1;
}

.fancybox__button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.fancybox__button i,
.fancybox__button span {
  font-size: 20px;
  line-height: 1;
}

.fancybox__button i::before {
  display: block;
  margin: 0;
  line-height: 1;
}

.fancybox__button--prev,
.fancybox__button--next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.fancybox__button--prev {
  left: 16px;
}

.fancybox__button--next {
  right: 16px;
}
