@import '../common/style/var.less';
@import '../common/style/theme.less';
@import '../common/style/hairline.less';

.van-dialog {
  top: 45% !important;
  overflow: hidden;
  .theme(width, '@dialog-width');
  .theme(font-size, '@dialog-font-size');
  .theme(border-radius, '@dialog-border-radius');
  .theme(background-color, '@dialog-background-color');

  @media (max-width: 321px) {
    .theme(width, '@dialog-small-screen-width');
  }

  &__header {
    text-align: center;
    .theme(padding-top, '@dialog-header-padding-top');
    .theme(font-weight, '@dialog-header-font-weight');
    .theme(line-height, '@dialog-header-line-height');

    &--isolated {
      .theme(padding, '@dialog-header-isolated-padding');
    }
  }

  &__message {
    overflow-y: auto;
    text-align: center;
    -webkit-overflow-scrolling: touch;
    .theme(font-size, '@dialog-message-font-size');
    .theme(line-height, '@dialog-message-line-height');
    .theme(max-height, '@dialog-message-max-height');
    .theme(padding, '@dialog-message-padding');

    &-text {
      word-wrap: break-word;
    }

    &--hasTitle {
      .theme(padding-top, '@dialog-has-title-message-padding-top');
      .theme(color, '@dialog-has-title-message-text-color');
    }

    &--round-button {
      padding-bottom: @padding-md;
      color: @text-color;
    }

    &--left {
      text-align: left;
    }

    &--right {
      text-align: right;
    }
  }

  &__footer {
    display: flex;
    &--round-button {
      position: relative !important;
      padding: @padding-xs @padding-lg @padding-md !important;
    }
  }

  &__button {
    flex: 1;
  }

  &__confirm,
  &__cancel {
    border: 0 !important;
  }

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

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