.#{$modal-prefix-cls} {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: $modal-zindex;
  width: 5.28rem;
  background-color: $white;
  border-radius: $border-radius;
  box-shadow: $modal-box-shadow;
  transform: translate(-50%,-50%);

  &-mask {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: $modal-zindex;
    height: 100%;
    background-color: $mask-bg;

    &--hidden {
      display: none;
    }
  }

  &__content {
    position: relative;
    display: flex;
    flex-direction: column;
  }

  &__header {
    padding: nth($modal-header-padding,1) nth($modal-header-padding,2);
    .#{$modal-prefix-cls}__title {
      font-size: $modal-header-font-size;
      font-weight: 600;
      color: $gray-10;
      text-align: center;
    }
  }

  &__body {
    flex: 1;
    height: 100%;
    padding: 0 $modal-body-padding $modal-body-padding;
    overflow: auto;
    color: $gray-11;
    text-align: center;
  }

  &__footer {
    display: flex;

    .#{$modal-prefix-cls}__button {
      display: block;
      flex: 1;
      height: $modal-button-height;
      font-size: $modal-button-font-size;
      font-weight: 600;
      line-height: $modal-button-height;
      color: $gray-11;
      text-align: center;
      border-top: $border-width-sm solid $gray-12;
      @extend %text-truncate;

      &:not(:last-child) {
        border-right: $border-width-sm solid $gray-12;
      }

      &--primary {
        color: $brand-primary;
      }
    }

    &--v {
      // 覆盖 flex
      display: block;
    }
  }

  &--top,
  &--bottom {
    left: 0;
    width: 100%;
    transform: translate(0);
  }
  &--top {
    top: 0;
    bottom: auto;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }

  &--bottom {
    top: auto;
    bottom: 0;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
  }
}


