// cover some element-ui styles
body {
  color: #333; // 主文本颜色
  font-weight: normal;
  font-family: PingFangSC, PingFang SC;
}
.el-breadcrumb__inner,
.el-breadcrumb__inner a {
  font-weight: 400 !important;
}

.el-upload {
  input[type='file'] {
    display: none !important;
  }
}

.el-upload__input {
  display: none;
}

.cell {
  .el-tag {
    margin-right: 0px;
  }
}

.small-padding {
  .cell {
    padding-left: 5px;
    padding-right: 5px;
  }
}

.fixed-width {
  .el-button--mini {
    padding: 7px 10px;
    width: 60px;
  }
}

.status-col {
  .cell {
    padding: 0 10px;
    text-align: center;

    .el-tag {
      margin-right: 0px;
    }
  }
}

// to fixed https://github.com/ElemeFE/element/issues/2461
.el-dialog {
  transform: none;
  left: 0;
  position: relative;
  margin: 0 auto;
}

// refine element ui upload
.upload-container {
  .el-upload {
    width: 100%;

    .el-upload-dragger {
      width: 100%;
      height: 200px;
    }
  }
}

// dropdown
.el-dropdown-menu {
  a {
    display: block;
  }
}

// fix date-picker ui bug in filter-item
.el-range-editor.el-input__inner {
  display: inline-flex !important;
}

// to fix el-date-picker css style
.el-range-separator {
  box-sizing: content-box;
}
// 新增全局输入框样式
.el-input {
  &__inner {
    background: #f1f1f1;
    border-radius: 4px;
    font-family: PingFangSC, PingFang SC;
    font-weight: normal;
    height: 34px;
    line-height: 34px !important;
    color: #333;
    border: none;
  }
  .el-input__inner {
    &::placeholder {
      color: #999 !important;
      font-family: PingFangSC, PingFang SC !important;
      font-weight: normal !important;
      line-height: 34px !important;
    }
  }
}
.el-textarea__inner {
  background-color: #f1f1f1;
  color: #333;
  border: none;
  &::placeholder {
    color: #999 !important;
    font-family: PingFangSC, PingFang SC !important;
    font-weight: normal !important;
  }
}
.el-date-editor {
  /* 核弹级穿透 */
  @at-root {
    .el-range-editor.el-input__inner {
      background: #f1f1f1;
      border: none;
      color: #333;
      line-height: 34px !important;
      .el-range-input {
        background: transparent;
        color: #333;
        line-height: 34px !important;
        padding: 0 10px;
        &::placeholder {
          color: #999 !important;
          font-family: PingFangSC, PingFang SC !important;
          font-weight: normal !important;
          line-height: 34px !important;
        }
      }

      /* 激活状态保持背景色 */
      /*  &.is-active {
        box-shadow: 0 0 0 2px rgba(74, 127, 248, 0.2);
      } */
    }
  }
}
//只有在el-form-item下的才生效的样式
.el-form-item.el-form-item--small {
  // 当包含输入控件时
  &:has(.el-input, .el-date-editor) {
    background: #f1f1f1;
    border-radius: 4px;
    padding: 0px 12px;
    transition: all 0.3s ease;
    color: #333;
    // 移除label边距
    .el-form-item__label {
      padding: 0;
      color: #333; // 主文本颜色
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 14px;
    }
    .el-input {
      &__inner {
        border: none;
      }
    }
  }
}
.vue-treeselect__control {
  background: #f1f1f1 !important;
  border: none !important;
  /* border: none; */
}
.tree-border {
  background-color: #f1f1f1 !important;
}

.el-form {
  color: #333;
  .el-form-item__label {
    color: #333;
    font-weight: 500;
    font-family: PingFangSC, PingFang SC;
  }
}
.el-table {
  color: #333 !important;
  font-weight: normal;
  font-family: PingFangSC, PingFang SC;
  font-size: 13px;
  border-bottom: 1px solid #f2f2f2;
  &::before {
    height: 0 !important;
    content: none !important;
  }
  // 表格标题行
  .el-table__header-wrapper {
    th {
      background-color: #f2f2f2 !important; // 浅灰色背景
      border-bottom: none !important; // 去掉下划线
      // 保持原有文字样式
      color: #333 !important;
      font-weight: 500;
      font-family: PingFangSC, PingFang SC;
      &:hover {
        background-color: #e9eaec !important; // 悬停浅灰色
        cursor: pointer; // 显示手型指针
      }
    }
  }
  // 表格主体分割线
  .el-table__body {
    tr:hover {
      background-color: #f5f8fe !important;

      td {
        background-color: transparent !important;
      }
    }

    td {
      border-bottom: 1px solid #f2f2f2 !important;
    }
    // 最后一列去掉分割线
    .el-table__row:last-child td {
      border-bottom: none !important;
    }
  }
}
//取消树形展开的边框
.tree-border {
  border: none !important;
}
/* 取消标签的边框 */
.el-tag {
  border: none !important;
}
.vue-treeselect__menu {
  background-color: #fff !important;
  /* border: none !important; */
  &,
  * {
    background-color: #fff !important;
  }
  color: #333;
  // 新增菜单项文字样式
  .vue-treeselect__label {
    font-weight: 400 !important; // 中等粗细
    font-family: PingFangSC-Medium, PingFang SC; // 确保字体存在
  }
}
// 重置按钮的样式
.custom-btn {
  background-color: #f2f2f2 !important;
  color: #333 !important;
  border: none !important;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-weight: 500 !important;
  font-family: PingFangSC, PingFang SC;

  &:hover {
    background-color: #f5f5f5 !important;
    color: #4a7ff8 !important;
  }

  &:active {
    background-color: #eaebed !important;
  }
  &:disabled {
    background: #f2f2f2 !important;
    color: #c6c6c6 !important;
  }
}
// 修复选择器层级
.el-menu--vertical > .el-menu .svg-icon {
  display: none !important;
  margin-right: 16px;
}
//下拉框的边框去掉
.el-select-dropdown {
  border: none;
  //划过背景颜色
  .el-select-dropdown__item.hover,
  .el-select-dropdown__item:hover {
    background-color: #f1f1f1 !important;
  }
}

// 选择按钮样式
.choice-btn {
  background-color: #fff !important;
  color: #4a7ff8 !important;
  border: 1px solid #4a7ff8 !important;
  border-radius: 4px;
  font-family: PingFangSC, PingFang SC;
  font-weight: 400;
  font-size: 14px;
}
.el-button--text {
  font-size: 13px;
}
// 文本域字数统计背景透明
.el-textarea .el-input__count {
  background-color: transparent;
  color: #999;
  line-height: 12px;
  bottom: 10px;
}
