@import '../style/var';
.van-dialog {
  position: fixed;
  top: 45%;
  left: 50%;
  overflow: hidden;
  width: @dialog-width;
  font-size: @dialog-font-size;
  transition: @dialog-transition;
  border-radius: @dialog-border-radius;
  background-color: transparent;
  transform: translate3d(-50%, -50%, 0);
  backface-visibility: hidden; // avoid blurry text after scale animation
  transition: @dialog-transition;
  transition-property: transform, opacity;

  @media (max-width: 321px) {
    width: @dialog-small-screen-width;
  }
  @my-selector: van-dialog;
  &&--description {
    padding:0 25px 20px;
    box-sizing: border-box;
    background: #fff;
    width:84%;
    .@{my-selector}__header {
      padding: 30px 0 0;
    }
    .@{my-selector}__content {
      .@{my-selector}__message {
        text-align: left;
        padding-left: 0;
        padding-right: 0;
      }
      
    }
    .@{my-selector}__footer {
      user-select: none;
      padding-bottom: 1px;
      &--buttons {
        justify-content: space-between;
        background: #ffffff;
      }

      .van-button {
        border-radius: 5px;
      }
    }
    .@{my-selector}__cancel {
      background: @white;
      color: @black-default;
      margin-right: 15px;
      &::before{
        display: block;
        position: absolute;
        top: -50%;
        left: -50%;
        right: -50%;
        bottom: -50%;
        width:unset;
        height: unset;
        border: 1px solid @black-default;
        border-radius: 10px;
        transform: scale(0.5);
        background: transparent;
        opacity: 1;
        content: ' ';
      }
    }
    
  }
  &__header {
    padding: @dialog-header-padding-top @dialog-header-padding-top 0;
    font-weight: @dialog-header-font-weight;
    line-height: @dialog-header-line-height;
    text-align: center;
    background:@white;
    &--left {
      text-align: left;
    }
    &--right {
      text-align: right;
    }
    &--isolated {
      padding: @dialog-header-isolated-padding;
    }
  }
  &__content {
    background: @white;
  }
  &__message {
    padding: @dialog-message-padding;
    font-size: @dialog-message-font-size;
    line-height: @dialog-message-line-height;
    max-height: @dialog-message-max-height;
    overflow-y: auto;
    text-align: center;
    word-wrap: break-word;
    -webkit-overflow-scrolling: touch;
    background:@white;
    // allow newline charactor
    white-space: pre-wrap;

    &--has-title {
      color: #7F7F7F;
    }
    &&--left,&&--right {
      padding: @dialog-message-padding 0;
    }
    &--left {
      text-align: left;
    }

    &--right {
      text-align: right;
    }
  }
  &__cancel {
    background:@gray-light;
    color:@black-default;
    font-weight: 400;
  }
  &__confirm {
    background:@red;
    color:@white;
    font-weight: 600;
  }
  &__footer::after{
    // border: 0 solid #fff;
    border: none;
  }
  &__footer {
    display: flex;
    overflow: hidden;
    user-select: none;

    &--buttons {
      display: flex;
      background: @red;
    }
  }

  &__confirm,
  &__cancel {
    flex: 1;
    height: @dialog-button-height;
    margin: 0;
    border: 0;
    border-radius: 0;
    height: 44px;
    line-height: 44px;
    font-size:16px;
    &::before{
      display: none;
    }
  }

  &__confirm {
    &,
    &:active {
      color: @dialog-confirm-button-text-color;
    }
  }

  &--round-button {
    .van-dialog__footer {
      position: relative;
      height: auto;
      padding: @padding-xs @padding-lg @padding-md;
    }

    .van-dialog__message {
      padding-bottom: @padding-md;
      color: @text-color;
    }

    .van-dialog__confirm,
    .van-dialog__cancel {
      height: @dialog-round-button-height;
    }

    .van-dialog__confirm {
      color: @white;
    }
  }

  &-bounce-enter {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(0.7);
  }

  &-bounce-leave-active {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(0.9);
  }
}
