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

@include b(dialog) {
  position: relative;
  margin: 56px auto;
  background: $--dialog-background-color;
  border-radius: $--border-radius-base;
  box-shadow: $--dialog-box-shadow;
  box-sizing: border-box;
  width: 50%;
  min-height: 200px;

  @include when(fullscreen) {
    width: 100%;
    margin-top: 0;
    margin-bottom: 0;
    height: 100%;
    // overflow: auto;
  }

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

  @include e(header) {
    height: 48px;
    padding: 12px 24px;
    border-bottom: 1px solid #eeeeee;
  }

  @include e(headerbtn) {
    background: transparent;
    position: absolute;
    right: 16px;
    border: none;
    outline: none;
    cursor: pointer;
    line-height: 24px;
    font-size: $--message-close-size;

    .ss-dialog__close {
      color: #B2B2B2;
      font-size: 20px;
    }

    &:focus, &:hover {
      .ss-dialog__close {
        color: $--color-primary;
      }
    }
  }

  @include e(title) {
    line-height: $--dialog-font-line-height;
    font-size: 16px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color:  #333333;
  }

  @include e(body) {
    padding: 24px 24px 16px;
    color: $--color-text-regular;
    font-size: $--dialog-content-font-size;
    word-break: break-all;
    max-height: calc(100vh-206px);
    overflow-y: auto;
    min-height: 200px;
  }

  @include e(footer) {
    padding: 16px 24px;
    text-align: right;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    .ss-dialog__tips{
      flex-basis: calc(100% - 200px);
      display: flex;
      align-items: center;
      text-align: left;
    }
  }


  // 内容居中布局
  @include m(center) {
    text-align: center;

    @include e(body) {
      text-align: initial;
      padding: 25px ($--dialog-padding-primary + 5px) 30px;
    }

    @include e(footer) {
      text-align: inherit;
    }
  }
}

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

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

@keyframes dialog-fade-in {
  0% {
    transform: translate3d(0, -20px, 0);
    opacity: 0;
  }
  100% {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@keyframes dialog-fade-out {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
  100% {
    transform: translate3d(0, -20px, 0);
    opacity: 0;
  }
}
.dialog-body {
    display: flex;
    .contentSide {
        width: 160px;
        min-height: 200px;
        max-height: calc(100vh-206px);
        border-right: 1px solid #eeeeee;
        padding-top: 24px;
    }
    .contentMain {
        flex: 1;
        min-height: 200px;
    }
}
.icon-messagetip {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-right: 5px;
  float: left;
}
.ss-messagetip {
  font-size: 14px;
  font-weight: 400;
  color: #999999;
  line-height: 20px;
  vertical-align: middle;
  float: left;
  flex-basis: calc(100% - 20px);
}
