modal-box.popup {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 250ms linear;
  padding: 20px;
}
modal-box.popup.active {
  opacity: 1;
  visibility: visible;
}

.popup-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.popup-content {
  align-items: center;
  display: flex;
  position: relative;
  max-width: 960px;
  max-height: 600px;
  width: 100%;
  height: auto;
  top: 0;
  left: 0;
  background: var(--main-background);
  color: var(--main-text);
  transform: translateY(50px);
  opacity: 0;
  transition: all 300ms linear 50ms;
  z-index: 9;
  overflow: hidden;
}
.popup-content .site-close-handle {
  top: 40px;
  margin-top: -20px;
  margin-inline-end: -20px;
}
html[dir=rtl] .popup-content .site-close-handle {
  left: 40px;
}
html[dir=ltr] .popup-content .site-close-handle {
  right: 40px;
}
.popup-content .site-close-handle * {
  fill: var(--main-text);
}
modal-box.popup.active .popup-content {
  opacity: 1;
  transform: translateY(0);
}
.popup-content[data-no-content], .popup-content[data-no-image] {
  max-width: 480px;
}

.popup-image {
  padding-top: 62.5%;
  max-width: 480px;
  width: 50%;
  height: 100%;
  position: relative;
  overflow: hidden;
}
[data-no-content] .popup-image {
  width: 100%;
  padding-top: 125%;
}
.popup-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-touchevents a[href].popup-image img {
  transition: transform 500ms cubic-bezier(0.39, 0.575, 0.565, 1);
}
.no-touchevents a[href].popup-image:hover img {
  transform: scale(1.05);
}

.popup-text {
  max-width: 480px;
  width: 50%;
  padding: 40px;
}
[data-no-image] .popup-text {
  width: 100%;
}
.popup-text:empty {
  display: none !important;
}

.popup-content .footer-content {
  margin-top: 35px;
}

@media screen and (max-width: 768px), screen and (max-width: 1024px) and (orientation: portrait) {
  modal-box.popup {
    align-items: flex-end;
    justify-content: flex-end;
  }
  .popup-text {
    padding: 25px;
  }
}
@media screen and (max-width: 820px) {
  modal-box.popup .popup-content:not([data-no-image]) .newsletter-form .input-group {
    flex-direction: column;
  }
  modal-box.popup .popup-content:not([data-no-image]) .newsletter-form .input-group input, modal-box.popup .popup-content:not([data-no-image]) .newsletter-form .input-group button {
    border-radius: var(--buttons-radius) !important;
  }
  modal-box.popup .popup-content:not([data-no-image]) .newsletter-form .input-group button {
    margin-top: 1em !important;
  }
}
@media screen and (max-width: 700px) {
  modal-box.popup .popup-content:not([data-show-image-on-mobile]) .popup-image {
    display: none;
  }
  modal-box.popup .popup-content:not([data-show-image-on-mobile]) .popup-text {
    max-width: none;
    width: 100%;
  }
  modal-box.popup .popup-content[data-show-image-on-mobile] {
    flex-direction: column;
    max-height: none;
  }
  modal-box.popup .popup-content[data-show-image-on-mobile] .popup-image, modal-box.popup .popup-content[data-show-image-on-mobile] .popup-text {
    width: 100%;
    max-width: none;
  }
}