/* Solution styles */

.modals-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 25;

  display: flex;
  justify-content: center;

  height: var(--window-inner-height);
  padding: 40px 30px;
  background-color: rgba(0, 0, 0, 0.8);

  opacity: 0;
  transition: opacity 0.4s;

  overflow-y: hidden;
  pointer-events: none;
}

body.-modal-open .modals-wrapper {
  opacity: 1;
  overflow-y: scroll;
  pointer-events: auto;
}

.modal {
  position: relative;
  display: none;
  vertical-align: middle;

  width: 100%;
  max-width: 949px;

  padding: 0 45px;
  margin: auto 0;

  border-radius: 20px;
  background: url(../../images/ui/subsribe-modal-bg.jpg) no-repeat center
    var(--gray);
  -webkit-background-size: cover;
  background-size: cover;
}

.modal.-open {
  display: block;
}

.modal-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 100%;
  min-height: 646px;
  padding: 72px 0;
}

.modal__close {
  position: absolute;
  top: 32px;
  right: 32px;

  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;

  border: 1px solid var(--blue);
  -webkit-border-radius: 50%;
  border-radius: 50%;

  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;

  -webkit-transition: opacity 0.4s;
  transition: opacity 0.4s;
}

.modal__close:before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;

  background-color: var(--blue);
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 10.2617L22 10.2617L22 12.2617L-5.62278e-08 12.2617L0 10.2617Z' fill='%2335354E'/%3E%3Cpath d='M10 22L10 0L12 -8.74228e-08L12 22L10 22Z' fill='%2335354E'/%3E%3C/svg%3E%0A")
    no-repeat center;
  mask: url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 10.2617L22 10.2617L22 12.2617L-5.62278e-08 12.2617L0 10.2617Z' fill='%2335354E'/%3E%3Cpath d='M10 22L10 0L12 -8.74228e-08L12 22L10 22Z' fill='%2335354E'/%3E%3C/svg%3E%0A")
    no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;

  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
}

.modal .title {
  text-align: center;
}

.modal .text {
  text-align: center;
  margin-top: 15px;
}

.modal .text strong {
  font-weight: 700;
}

.modal .form {
  width: 100%;
  max-width: 725px;
  margin-top: 40px;
  margin-left: auto;
  margin-right: auto;
}

.modal .form .checkbox {
  margin-top: 12px;
}

.modal .form .button {
  margin-top: 49px;
}

.modal .button {
  margin-left: auto;
  margin-right: auto;
}

/* Thanks modal */

.thanks-modal .text {
  margin-top: 32px;
  opacity: 0.8;
}

.thanks-modal .button {
  margin-top: 36px;
}

/* Event modal */

.modal[data-modal-name="event"],
.modal[data-modal-name="event-thanks"] {
  background-image: none;
}

.modal[data-modal-name="event"] .modal-container,
.modal[data-modal-name="event-thanks"] .modal-container {
  min-height: 552px;
}

@media screen and (max-width: 1024px) {
  .modals-wrapper {
    padding: 20px 30px;
  }

  .modal__close {
    top: 20px;
    right: 20px;
  }
}

@media screen and (max-width: 759px) {
  .modals-wrapper {
    padding: 10px 30px;
  }

  .modal {
    padding: 0 15px;

    background-image: none;
    -webkit-border-radius: 10px;
    border-radius: 10px;
  }

  .modal[data-modal-name="event"] .modal-container,
  .modal[data-modal-name="event-thanks"] .modal-container,
  .modal-container {
    min-height: calc(var(--window-inner-height) - 20px);
    padding: 97px 0 33px;
  }

  .modal__close {
    position: absolute;
    top: 30px;
    right: auto;
  }

  .modal .form {
    margin-top: 51px;
  }

  .modal .title br,
  .modal .text br {
    display: none;
  }

  .modal .text {
    margin-top: 12px;
    font-weight: 400;
  }

  .modal .form .checkbox {
    margin-top: 47px;
  }

  .modal .form .button {
    margin-top: 19px;
  }

  /* Thanks modal */

  .thanks-modal .text {
    margin-top: 21px;
  }

  .thanks-modal .button {
    margin-top: 32px;
  }
}
