.ui-modal-container:after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: -1;
  -webkit-transition: all 0.5s;
  -moz-transitionsft: all 0.5s;
  transition: all 0.5s;
  opacity: 0;
}
.ui-modal-container {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  position: fixed;
  overflow-y: scroll;
  z-index: 501;
  visibility: hidden;
}
.ui-modal-container--show {
  visibility: visible;
}
.ui-modal-container--show:after {
  visibility: visible;
  opacity: 0.5;
}
.ui-modal {
  width: 50%;
  background: #fff;
  border-radius: 5px;
  z-index: 1001;
  margin: 0 auto;
  visibility: hidden;
  position: relative;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateX(-50%) translateY(-50%);
  -moz-transform: translateX(-50%) translateY(-50%);
  -ms-transform: translateX(-50%) translateY(-50%);
  transform: translateX(-50%) translateY(-50%);
  display: none;
}

.ui-modal__content {
  background-color: #fff;
  padding: 20px;
}

.ui-modal--show {
  visibility: visible;
  display: block !important;
}
.ui-modal__title {
  font-size: 18px;
  margin-bottom: 10px;
}
.ui-modal--tiny {
  min-width: 300px;
  max-width: 400px;
  width: 30%;
}
.ui-modal--small {
  min-width: 400px;
  max-width: 700px;
  width: 40%;
}
.ui-modal {
  -webkit-transform: translateY(20%);
  -moz-transform: translateY(20%);
  -ms-transform: translateY(20%);
  transform: translateY(20%);
  opacity: 0;
  -webkit-transition: all 0.3s;
  -moz-transition: all 0.3s;
  transition: all 0.3s;
}
.ui-modal--show {
  -webkit-transform: translateY(0);
  -moz-transform: translateY(0);
  -ms-transform: translateY(0);
  transform: translateY(0);
  opacity: 1;
  display: block;
}
.ui-modal h2 {
  margin-top: 0;
}


.ui-modal--loading .ui-modal__content:before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: #000;
  z-index: 989;
  opacity: 0.2;
  border-radius: 5px;
}

.ui-modal--loading {
  position: relative;
  opacity: 1;
  pointer-events: none;
  -webkit-transition: all 0s linear, opacity 0.2s ease;
  transition: all 0s linear, opacity 0.2s ease;
}
.ui-modal--loading:before {
  position: absolute;
  content: '';
  top: 50%;
  left: 50%;
  margin: -25px 0 0 -25px;
  width: 50px;
  height: 50px;
  border-radius: 500rem;border: 0.4em solid #007B99;
  z-index: 990;
  opacity: 0.6;
}
.ui-modal--loading:after {
  position: absolute;
  content: '';
  top: 50%;
  left: 50%;
  margin: -25px 0 0 -25px;
  width: 50px;
  height: 50px;
  -webkit-animation: button-spin 0.8s linear;
  animation: button-spin 0.8s linear;
  -webkit-animation-iteration-count: infinite;
  animation-iteration-count: infinite;
  border-radius: 500rem;
  border-color: #fff transparent transparent;
  border-style: solid;
  border-width: 0.4em;
  box-shadow: 0 0 0 1px transparent;
  z-index: 990;
}
@-moz-keyframes button-spin {
  from {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  to {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
@-webkit-keyframes button-spin {
  from {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  to {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
@-o-keyframes button-spin {
  from {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  to {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
@keyframes button-spin {
  from {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  to {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

.ui--loading > *:first-child:before {
  content: "";
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: #000;
  z-index: 989;
  opacity: 0.4;
  border-radius: 5px;
  z-index: 1000;
  pointer-events: none;
}

.ui--loading {
  position: relative;
  opacity: 1;
  pointer-events: none;
  -webkit-transition: all 0s linear, opacity 0.2s ease;
  transition: all 0s linear, opacity 0.2s ease;
}
.ui--loading:before {
  position: fixed;
  content: '';
  top: 50%;
  left: 50%;
  margin: -25px 0 0 -25px;
  width: 50px;
  height: 50px;
  border-radius: 500rem;border: 0.4em solid #007B99;
  z-index: 990;
  opacity: 0.6;
}
.ui--loading:after {
  position: fixed;
  content: '';
  top: 50%;
  left: 50%;
  margin: -25px 0 0 -25px;
  width: 50px;
  height: 50px;
  -webkit-animation: button-spin 0.8s linear;
  animation: button-spin 0.8s linear;
  -webkit-animation-iteration-count: infinite;
  animation-iteration-count: infinite;
  border-radius: 500rem;
  border-color: #fff transparent transparent;
  border-style: solid;
  border-width: 0.4em;
  box-shadow: 0 0 0 1px transparent;
  z-index: 990;
}

.ui--loading__message {
  position: fixed;
  display: none;
  top: 50%;
  left: 40%;
  margin: 35px 0 0 0;
  width: 20%;
  text-align: center;
  line-height: 25px;
  background: rgba(255, 255, 255, .7);
  height: 25px;
  border-radius: 5px;
  z-index: 1010;
}

.ui--loading .ui--loading__message {
  display: block;
}