@import '../plugins/mq';
.modal {
  &.fade {
    opacity: 0;
    -webkit-transition: all 0.2s linear;
    transition: all 0.2s linear;
    visibility: hidden;
    display: block !important;
  }
  &.fade.show {
    opacity: 1;
    visibility: visible;
    .modal-dialog {
      transform: none !important;
    }
    /*
    .modal-dialog {
     -webkit-transform: translate(0, 30%);
      -o-transform: translate(0, 30%);
      transform: translate(0, 30%);

    }
     */
  }

  &.modal-mini {
    .modal-dialog {
      max-width: 255px;
      margin: 0 auto;
    }
  }

  &.slide {
    @include mq($from: wide) {
      -webkit-transform: translate3d(40%, 0, 0);
      -o-transform: translate3d(40%, 0, 0);
      transform: translate3d(40%, 0, 0);
    }

    @include mq($from: tablet, $until: wide) {
      -webkit-transform: translate3d(70%, 0, 0);
      -o-transform: translate3d(70%, 0, 0);
      transform: translate3d(70%, 0, 0);
    }

    @include mq($until: tablet) {
      -webkit-transform: translate3d(90%, 0, 0);
      -o-transform: translate3d(90%, 0, 0);
      transform: translate3d(90%, 0, 0);
    }

    opacity: 0;
    -webkit-transition: all 0.2s linear;
    transition: all 0.2s linear;
    visibility: hidden;
    display: block !important;
  }

  &.slide.show {
    opacity: 1;
    visibility: visible;
    -webkit-transition: all 0.2s linear;
    transition: all 0.2s linear;

    -o-transform: translate3d(0%, 0, 0);
    -webkit-transform: translate3d(0%, 0, 0);
    transform: translate3d(0%, 0, 0);

    .modal-dialog {
      -webkit-transform: none;
      -o-transform: none;
      transform: none;
    }
  }

  .modal-content {
    .modal-header {
      border-bottom: none;
      padding-top: 24px;
      padding-right: 24px;
      padding-bottom: 0;
      padding-left: 24px;

      .modal-profile {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        text-align: center;
        line-height: 5.7;
        box-shadow: 0px 5px 20px 0px rgba(0, 0, 0, 0.3);

        i {
          font-size: 32px;
          padding-top: 24px;
        }
      }
    }

    .modal-body {
      padding-top: 24px;
      padding-right: 24px;
      padding-bottom: 16px;
      padding-left: 24px;
      line-height: 1.9;
    }

    .modal-body + .modal-footer {
      padding-top: 0;
    }

    .modal-footer {
      border-top: none;
      padding-right: 24px;
      padding-bottom: 16px;
      padding-left: 24px;
      -webkit-justify-content: space-between;
      justify-content: space-between;

      .btn {
        margin: 0;
        padding-left: 16px;
        padding-right: 16px;
        width: auto;

        &:hover,
        &focus {
          text-decoration: none;
        }
      }
    }
  }
}

.modal-dialog.modal-full-height {
  @include mq($from: wide) {
    width: 70%;
  }

  @include mq($from: tablet, $until: wide) {
    width: 70%;
  }

  @include mq($until: tablet) {
    width: 90%;
  }

  height: 100%;
  margin: 0;
  max-height: 100vh;
  top: -1px;
  right: -1px;
  position: absolute;
  border-radius: 0;

  > .modal-content {
    height: 100%;

    > form {
      margin: 0;

      .modal-header {
        position: relative;
        height: 50px;
        padding: 10px;
        border: 0;
      }

      .modal-title {
        font-weight: 300;
        font-size: 1.2em;
        color: #fff;
        line-height: 30px;
        width: 80%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      > .modal-body {
        position: relative;
        width: 100%;
        font-weight: 300;
        overflow: auto;
        height: calc(100vh - 176px);
      }

      .modal-footer {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        height: 60px;
        padding: 10px;
        background: #f1f3f5;
      }
    }
  }
}

.modal-dialog.modal-full,
.modal-dialog.modal-fullscreen {
  width: 100%;
  height: 100%;
  margin: 0;
  max-width: 100vw;
  max-height: 100vh;

  .modal-content {
    height: 100%;

    form {
      margin: 0;
    }

    .modal-header {
      position: relative;
      height: 50px;
      padding: 10px;
      border: 0;
    }

    .modal-title {
      font-weight: 300;
      font-size: 1.2em;
      color: #fff;
      line-height: 30px;
    }

    .modal-body {
      position: relative;
      width: 100%;
      font-weight: 300;
      overflow: auto;
      height: calc(100vh - 176px);
    }

    .modal-footer {
      position: absolute;
      right: 0;
      bottom: 0;
      left: 0;
      height: 60px;
      padding: 10px;
      background: #f1f3f5;
    }
  }
}

.AwesomeForm.page {
  .modal-content {
    border-radius: 0px;
  }
  .model-header {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }
}
