@use 'mixins/mixins' as *;

@include b(dialog) {
  /* 标题字重 */
  .el-dialog__title {
    font-weight: 500;
  }

  /* 表头底部边框 - 使用伪元素实现贯穿效果 */
  .el-dialog__header {
    position: relative;
    padding-bottom: 16px;

    /* 关闭按钮位置调整，抵消 padding-bottom 的影响 */
    .el-dialog__headerbtn {
      top: 0;
      transform: translateY(0);
      width: 16px !important;
      height: 16px !important;
    }

    &::after {
      position: absolute;
      right: 0;
      bottom: 0;
      left: -24px;
      width: calc(100% + 48px);
      height: 1px;
      content: "";
      background-color: #f5f7f9;
    }
  }

  /* 底部 footer 边框 - 使用伪元素实现贯穿效果 */
  .el-dialog__footer {
    position: relative;

    &::before {
      position: absolute;
      top: 0;
      left: -24px;
      width: calc(100% + 48px);
      height: 1px;
      content: "";
      background-color: #f5f7f9;
    }
  }

  @include b(dialog-footer) {
    display: flex;
    align-items: center;
  }
}

/* 全局覆盖 Element Plus 默认的关闭按钮尺寸 */
.el-dialog__headerbtn {
  width: 16px !important;
  height: 16px !important;
}
