@import './common/var.scss';
.es-data-table {
  position: relative;
  .es-toolbar {
    &.es-table-toolbar-plus {
      padding: 16px 16px 8px 16px;
      border-color: transparent;
      .es-advanced-filter.es-absolute {
        top: 55px;
        .es-form {
          border: 0;
        }
      }
    }
    & + .es-data-table-content {
      padding: 16px;
      &.es-table-plus {
        padding-top: 0;
      }
    }
  }
}
.es-data-table-content {
  background-color: $--background-color-base;
  .es-table {
    &:not(.el-table--border) {
      border: $--table-border;
      border-bottom: 0;
    }
    thead {
      tr,
      th {
        background-color: $--table-header-background-color;
        border-color: $--table-border-color;
      }
    }
    thead tr,
    th {
      padding: 6px 0;
      text-align: center;
      &.is-right {
        text-align: right;
        .cell {
          justify-content: flex-end;
        }
      }
      &.is-left {
        text-align: left;
        .cell {
          justify-content: flex-start;
        }
      }
      .cell {
        justify-content: center;
      }
    }
    td {
      padding: 6px 0;
      &.is-center,
      &.es-table-handle-box {
        .cell {
          justify-content: center;
        }
      }
      &.is-right {
        .cell {
          justify-content: flex-end;
        }
      }
      &.is-left {
        .cell {
          justify-content: flex-start;
        }
      }
    }
    .es-table-handle-box {
      text-align: center;
    }
    & + .es-table-page {
      margin-top: -1px;
    }
    .el-table__fixed,
    .el-table__fixed-right {
      &::before {
        background-color: transparent;
      }
    }
    .cell {
      min-height: 28px;
      align-items: center;
      align-content: center;
      &:not(.el-tooltip) {
        display: flex;
      }
      &.el-tooltip {
        line-height: 22px;
      }
    }
    .el-form-item {
      margin-bottom: 0;
      width: 100%;
      .el-input {
        &:not(.el-input--prefix) {
          .el-input__inner {
            padding: 0 8px;
            margin-top: 0;
          }
        }
      }
      .el-input-number,
      .el-select {
        width: 100%;
      }
    }
    &.el-scrollbar {
      & > .el-scrollbar__bar {
        z-index: 8;
      }
    }
  }
  &.es-table-border-none {
    .es-table {
      border: 0;
      &::before {
        content: none;
      }
      td,
      th {
        border: 0;
      }
    }
    .es-table-page {
      border: 0;
      margin-top: 0;
      background-color: #fff;
    }
  }
  .el-table__header {
    color: #404040;
    thead {
      color: #404040;
    }
  }
  .el-table__body {
    tr:hover > td {
      background-color: $--table-row-hover-background-color;
    }
    tr.hover-row {
      &,
      &.el-table__row--striped {
        &,
        &.current-row {
          > td {
            background-color: $--table-row-hover-background-color;
          }
        }
      }
    }

    tr.current-row > td {
      background-color: $--table-current-row-background-color;
    }
  }
  .es-table-page {
    height: 46px;
    border: $--table-border;
    padding: 8px 24px;
    background-color: $--table-page-background-color;
    &.es-loading-page {
      line-height: 30px;
      font-size: 14px;
      font-weight: 400;
      color: rgba(0, 0, 0, 0.75);
    }
  }
  .es-thead-border {
    .el-table__header {
      th:not(.gutter) {
        border-right: $--table-border;
      }
      thead:not(.is-group) {
        th {
          &:last-child {
            border-right: 0;
            border-bottom: $--table-border;
          }
        }
      }
    }
    .is-scrolling-right ~ .el-table__fixed-right {
      &:not(.el-table-box-shadow) {
        thead {
          th:last-child {
            border-left: 0;
          }
        }
      }
    }
  }
  .el-form-item__error {
    top: unset;
    bottom: 0;
  }
  .es-table {
    &:not(.el-table--border) {
      .el-table--border td,
      .el-table--border th,
      .el-table__body-wrapper
        .el-table--border.is-scrolling-left
        ~ .el-table__fixed {
        border-right: 0;
      }
    }
    .el-table__body-wrapper {
      .el-table__body {
        position: relative;
      }
    }
  }
  .is-scrolling-right + .el-table__fixed-body-wrapper {
    td {
      border-right: $--table-border;
      &:last-child {
        border-right: 0;
      }
    }
  }
  &.es-table-plus {
    background-color: #fff;
    padding-top: 0;
    .el-table__header {
      thead {
        color: #6e7c98;
      }
      th {
        background-color: #fff;
        border-color: #cdd9e4;
      }
    }
    .es-table:not(.el-table--border) {
      border-color: transparent;
      &::before {
        background-color: #cdd9e4;
      }
      &::after {
        background-color: transparent;
      }
      td,
      th {
        border-color: #cdd9e4;
        &:not(.gutter) {
          border-right-color: transparent;
        }
      }
      .cell {
        min-height: 35px;
      }
    }
    .es-table-page {
      height: 48px;
      border-top-color: #cdd9e4;
      border-left-color: transparent;
      border-right-color: transparent;
      border-bottom-color: transparent;
      padding: 10px 24px;
      background-color: #fff;
      .el-pagination__total,
      .el-select__caret {
        color: #6e7c98;
      }
    }
  }
}
.el-table--border::after,
.el-table--group::after,
.el-table::before {
  z-index: 5;
}
.es-table-sizer {
  height: 100%;
}
.sizer-btn-box {
  text-align: right;
  margin-top: 7px;
}
.es-table-sizer-tips {
  color: #ff0000;
  line-height: 20px;
}
.es-table-setting {
  font-size: 16px;
  cursor: pointer;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 99;
}
