// @import "./icon.scss";
// @import "./button.scss";
// @import "../_utils.scss";
.#{$modal-prefix-cls} {
  width: auto;
  margin: 0 auto;
  position: relative;
  outline: none;
  top: $msgbox-top;

  &-hidden {
    display: none !important;
  }

  &-wrap {
    position: fixed;
    // position:absolute;
    overflow: auto;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    // z-index: $zindex-modal;
    -webkit-overflow-scrolling: touch;
    outline: 0;
  }

  &-copy {
    user-select: text;
  }

  &-nocopy {
    user-select: none;
  }

  &-wrap * {
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  }

  &-mask {
    @include mask;
  }

  &-content {
    position: relative;
    background-color: $msgbox-content-background-color;

    @include theme-background-color($__msgbox-content_background-color);
    border: 0;
    border-radius: $msgbox-border-radius;
    background-clip: padding-box;

    @include theme-box-shadow($__msgbox_box-shadow);
  }

  &-header {
    cursor: pointer;

    // @include content-header;
    border-bottom: 1px solid $border-color-split;

    @include theme-border-bottom-color($__common-content-header_border-bottom-color);
    padding: $mixin-content-header-padding;
    line-height: 1;
    p,
    &-inner {
      display: inline-block;
      width: 100%;
      color: $mixin-content-header-color;
  
      @include theme-font-color($__common-content-header-inner_font-color);
      font-weight: bold;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
  
      height: 20px;
      line-height: 20px;
      font-size: $font-size-base;
      
      @include structure-font-size($__card-default_font-size, 0);
    }
  }

  &-close {
    // @include content-close(1px, 31px);
    font-size: $font-size-small;
    position: absolute;
    right: 16px;
    top: 12px;
    overflow: hidden;
    cursor: pointer;
  
    .#{$icon-prefix-cls}-ios-close-empty {
      @include close-base(1px, 31px);
    }
    & i.iconfont {
      @include theme-font-color($__common-close_icon-color);
    }

    & i:hover {
      @include theme-font-color( $__common-close_hover_icon-color);
    }
  }

  &-maximize {
    // @include content-maximise(-1px, 16px);
    font-size: $font-size-small;
    padding-top: -1px;
    position: absolute;
    right: 38px;
    top: 12px;
    overflow: hidden;
    cursor: pointer;
  
    i {
      font-size: 16px;
    }
    & i.iconfont {
      @include theme-font-color($__common-maximize_icon-color);
    }

    & i:hover {
      @include theme-font-color($__common-maximize_hover_icon-color);
    }
  }

  &-body {
    padding: $msgbox-body-padding;
    font-size: $msgbox-body-font-size;
    line-height: 1.5;
    word-break: break-all;

    & p {
      color: $msgbox-body-color;

      @include theme-color($__msgbox-body_font-color);
      font-size: $font-size-small;
    }
  }

  &-footer {
    border-top: 1px solid $border-color-split;

    @include theme-border-top-color($__msgbox-footer_border-top-color);
    padding: $msgbox-footer-padding;
    text-align: right;

    button + button {
      margin-left: 8px;
      margin-bottom: 0;
    }
  }
}

@media (max-width: 768px) {
  .#{$modal-prefix-cls} {
    width: auto !important;
    margin: 10px;
  }

  .vertical-center-modal {
    .#{$modal-prefix-cls} {
      flex: 1;
    }
  }
}

.#{$confirm-prefix-cls} {
  padding: $msgbox-confirm-padding;

  &-head {
    &-icon {
      position: absolute;
      top: $msgbox-confirm-head-icon-top;
      left: $msgbox-confirm-head-icon-left;

      & i {
        font-size: $msgbox-confirm-head-icon-font-size;
      }

      &-info {
        color: $primary-color;

        @include theme-color($__msgbox-icon-info_icon-color);
      }

      &-success {
        color: $success-color;

        @include theme-color($__msgbox-icon-success_icon-color);
      }

      &-warning {
        color: $warning-color;

        @include theme-color($__msgbox-icon-warning_icon-color);
      }

      &-error {
        color: $error-color;

        @include theme-color($__msgbox-icon-error_icon-color);
      }

      &-confirm {
        color: $warning-color;

        @include theme-color($__msgbox-icon-confirm_icon-color);
      }
    }

    &-title {
      display: inline-block;
      font-size: $msgbox-title-font-size;
      color: $msgbox-title-color;

      @include theme-color($__msgbox-head-title_font-color);
      font-weight: $msgbox-title-font-weight;
      margin-left: $msgbox-title-margin-left;
    }
  }

  &-body {
    font-family: "Microsoft YaHei", "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "\5FAE\8F6F\96C5\9ED1", Arial, sans-serif;
    font-size: $font-size-small;
    color: $msgbox-body-color;

    @include theme-color($__msgbox-body_font-color);
    text-align: left;
    line-height: $msgbox-body-line-height;
    padding-left: $msgbox-body-padding-left;
    padding-top: $msgbox-body-padding-top;
    position: relative;

    &-render {
      margin: $msgbox-body-render-margin;
      padding: 0;
    }

    &-icon {
      position: absolute;
      top: 0;
      left: 0;

      & i {
        font-size: $msgbox-body-icon-font-size;
      }

      &-info {
        color: $primary-color;

        @include theme-color($__msgbox-icon-info_icon-color);
      }

      &-success {
        color: $success-color;

        @include theme-color($__msgbox-icon-success_icon-color);
      }

      &-warning {
        color: $warning-color;

        @include theme-color($__msgbox-icon-warning_icon-color);
      }

      &-error {
        color: $error-color;

        @include theme-color($__msgbox-icon-error_icon-color);
      }

      &-confirm {
        color: $warning-color;

        @include theme-color($__msgbox-icon-confirm_icon-color);
      }
    }

    & p {
      font-size: $msgbox-body-font-size;
    }
  }

  &-footer {
    margin-top: $msgbox-footer-margin-top;
    text-align: right;

    button + button {
      margin-left: 8px;
      margin-bottom: 0;
    }
  }
}
