.popup {
  position: fixed;
  z-index: 9999;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  left: -99999px;
  opacity: 0;
  -webkit-transition: left 0s steps(1) 0.3s, opacity 0.3s ease;
  -o-transition: left 0s steps(1) 0.3s, opacity 0.3s ease;
  transition: left 0s steps(1) 0.3s, opacity 0.3s ease;
}
.popup.contextual-region {
  position: fixed;
}
.popup--show {
  opacity: 1;
  left: 0;
  -webkit-transition: left 0s steps(1), opacity 0.3s ease;
  -o-transition: left 0s steps(1), opacity 0.3s ease;
  transition: left 0s steps(1), opacity 0.3s ease;
}
.popup__mask {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.6);
}
.popup__close {
  position: absolute;
  width: 40px;
  height: 40px;
  background: url(../images/close.svg) no-repeat center center/contain;
  text-indent: -9999px;
  cursor: pointer;
  top: -64px;
  right: 10px;
}
@media only screen and (min-width: 768px) {
  .popup__close {
    top: 0;
    right: -54px;
  }
}
.popup__content {
  width: 100%;
  max-width: 640px;
  background: #fff;
  position: absolute;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
      -ms-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
}
.popup__wrapper {
  position: relative;
  max-height: 80vh;
  overflow: auto;
}
.popup__image--horizontal {
  max-height: 40vh;
}
.popup__image--horizontal .field,
.popup__image--horizontal img {
  max-height: 40vh;
}
.popup__image--vertical {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 40%;
}
.popup__image .field {
  height: 100%;
}
.popup__image img {
  -o-object-fit: cover;
     object-fit: cover;
  width: 100%;
  height: 100%;
}
.popup__body--vertical {
  max-height: 80vh;
  overflow: auto;
  padding: 15px 15px 15px calc(40% + 15px);
}
@media only screen and (min-width: 480px) {
  .popup__body--vertical {
    padding: 30px 30px 30px calc(40% + 30px);
  }
}
.popup__body--horizontal {
  padding: 15px;
}
@media only screen and (min-width: 480px) {
  .popup__body--horizontal {
    padding: 30px;
  }
}
.popup__body .field {
  margin-bottom: 20px;
}
.popup__body .field:last-child {
  margin-bottom: 0;
}
