@import "mixins/mixins";
@import "mixins/utils";
@import "common/var";
@import "common/popup";

@include b(slide-dialog) {
  position: fixed;
  right: 0;
  height: 100%;
  background: $--color-white;
  border-radius: $--border-radius-small;
  box-shadow: $--dialog-box-shadow;
  box-sizing: border-box;

  @include e(wrapper) {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    overflow: auto;
    margin: 0;
  }

  @include e(header) {
    padding: 20px;
    @include utils-clearfix;
  }

  @include e(headerbtn) {
    float: right;
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    cursor: pointer;
    font-size: 16px;

    .el-slide-dialog__close {
      color: $--dialog-close-color;
    }

    &:focus, &:hover {
      .el-slide-dialog__close {
        color: $--dialog-close-hover-color;
      }
    }
  }

  @include e(title) {
    line-height: 1;
    font-size: $--dialog-title-font-size;
    font-weight: bold;
    color: $--color-text-normal;
  }

  @include e(body) {
    padding: 10px 20px;
    height: calc(100% - 150px);
    overflow-y: auto;
    color: $--color-text-instruction;
    font-size: $--dialog-font-size;
  }

  @include e(footer) {
    padding: 15px 20px;
    text-align: right;
    box-sizing: border-box;
  }

}

.slide-dialog-fade-enter-active {
  animation: slide-dialog-fade-in .3s;
}

.slide-dialog-fade-leave-active {
  animation: slide-dialog-fade-out .3s;
}

@keyframes slide-dialog-fade-in {
  0% {
    transform: translate3d(100%, 0, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes slide-dialog-fade-out {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(100%, 0, 0);
  }
}
