.mes-popup {
  align-items: center;
  background: rgba(0, 0, 0, 0.78);
  box-sizing: border-box;
  display: none;
  inset: 0;
  justify-content: center;
  overflow: auto;
  padding: 40px 20px;
  position: fixed;
  z-index: 999999;
}

.mes-popup.mes-popup_show {
  display: flex;
}

.mes-popup__container {
  background: #fbfbf9;
  box-sizing: border-box;
  max-height: calc(100vh - 80px);
  overflow: auto;
  position: relative;
  width: 100%;
}

.mes-popup__container:not([class*="t-width_"]) {
  max-width: 960px;
}

.t746 .mes-popup__container {
  background: transparent !important;
  left: 50%;
  max-width: calc(100vw - 40px) !important;
  overflow: visible;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  width: auto !important;
}

.t746 .mes-popup__container,
.t746 .mes-popup__container .t-slds,
.t746 .mes-popup__container .t-slds__main,
.t746 .mes-popup__container .t-slds__container,
.t746 .mes-popup__container .t-slds__items-wrapper,
.t746 .mes-popup__container .t-slds__wrapper,
.t746 .mes-popup__container .t-slds__item,
.t746 .mes-popup__container .t-slds__bgimg {
  margin-left: auto !important;
  margin-right: auto !important;
}

.t746 .mes-popup__container .t-slds {
  text-align: center;
}

.t746 .mes-popup__container .t-slds__main,
.t746 .mes-popup__container .t-slds__container,
.t746 .mes-popup__container .t-slds__items-wrapper,
.t746 .mes-popup__container .t-width {
  max-width: calc(100vw - 40px) !important;
  width: auto !important;
}

.t746 .mes-popup__container .t-slds__img {
  display: block;
  height: auto;
  max-height: calc(100vh - 80px);
  max-width: calc(100vw - 40px);
  width: auto;
}

.mes-popup__close {
  position: fixed;
  right: 24px;
  top: 24px;
  z-index: 1;
}

.mes-popup__close-wrapper {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  height: 44px;
  justify-content: center;
  padding: 0;
  width: 44px;
}

.mes-popup__close-icon {
  display: block;
}

.mes-popup-content__wrapper {
  box-sizing: border-box;
  padding: 40px;
}

.mes-popup-content__title {
  margin-bottom: 18px;
}

.mes-popup-content__descr {
  line-height: 1.55;
}

body.mes-popup-open {
  overflow: hidden;
}

@media screen and (max-width: 640px) {
  .mes-popup {
    padding: 24px 14px;
  }

  .mes-popup__container {
    max-height: calc(100vh - 48px);
  }

  .mes-popup__close {
    right: 12px;
    top: 12px;
  }

  .mes-popup-content__wrapper {
    padding: 30px 22px;
  }
}
