:root {
  --happyforms-modal-max-width: 800px;
}
body.happyforms-modal-open {
  overflow: hidden;
}
.happyforms-modal {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  text-align: center;
  background-color: rgba(255, 255, 255, .75);
  background-color: var(--happyforms-modal-overlay-bg-color);
}
.happyforms-modal:before {
  content: '';
  display: inline-block;
  height: 100%;
  vertical-align: middle;
  margin-right: -0.25em;
}
.happyforms-modal .happyforms-modal__inner {
  display: inline-block;
  vertical-align: middle;
  width: 99%;
  min-height: 150px;
  max-height: 85%;
  text-align: left;
}
.happyforms-modal .happyforms-form {
  background: #fff;
  background: var(--happyforms-modal-bg-color);
}
.happyforms-modal .happyforms-form {
  padding: 5%;
}
.happyforms-modal.happyforms-modal--padding-wide .happyforms-form {
  padding: 7.5%;
}
.happyforms-modal.happyforms-modal--padding-narrow .happyforms-form {
  padding: 3%;
}
@media screen and (min-width: 800px) {
  .happyforms-modal .happyforms-form {
    padding: 40px;
  }
  .happyforms-modal.happyforms-modal--padding-wide .happyforms-form {
    padding: 60px;
  }
  .happyforms-modal.happyforms-modal--padding-narrow .happyforms-form {
    padding: 25px;
  }
}
.happyforms-modal .happyforms-modal__form-wrapper {
  position: relative;
  width: 90%;
  max-width: 800px;
  max-width: var(--happyforms-modal-max-width);
  min-height: 150px;
  margin: 0 auto;
}
.happyforms-modal .happyforms-form {
  max-height: 70vh;
  margin: 0 auto 35px;
  overflow-y: auto;
  box-shadow: 0 5px 50px rgba(0, 0, 0, .2);
}
.happyforms-modal.happyforms-modal--border-radius-round .happyforms-form {
  border-radius: 10px;
}
.happyforms-modal .happyforms-flex {
  padding-bottom: 0;
}
.happyforms-modal form {
  position: relative;
  overflow-y: auto;
}
.happyforms-modal form h3.happyforms-form__title {
  max-width: 90%;
}
.happyforms-modal form.happyforms-form--submitting {
  opacity: 1;
}
.happyforms-modal form.happyforms-form--submitting .happyforms-flex {
  opacity: 0.5;
}
.happyforms-modal .happyforms-modal__close-button {
  display: none;
  position: absolute;
  top: 15px;
  right: 25px;
  cursor: pointer;
  width: 25px;
  height: 25px;
  z-index: 1001;
  transition: all 0.2s ease-in;
  color: #000;
  color: var(--happyforms-modal-overlay-bg-color);
}
.happyforms-modal .happyforms-modal__close-button svg {
  width: 25px;
  height: 25px;
}
.happyforms-modal .happyforms-modal__close-button.scrolled {
  top: -30px;
  right: -5px;
  color: var(--happyforms-modal-bg-color);
}
.happyforms-modal .happyforms-modal__loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  padding: 20px;
  border-radius: 20px;
  text-align: center;
  background-color: #fff;
}
.happyforms-modal .happyforms-modal__loading:before {
  content: url('../../svg/loading.svg');
  display: block;
  position: relative;
  top: -10px;
  left: -6px;
  width: 12px;
  height: 20px;
  -webkit-animation: happyforms-spin 2s infinite;
  animation: happyforms-spin 2s infinite;
}

@-webkit-keyframes happyforms-spin {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
@keyframes happyforms-spin {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
