@import "../../less/global-variable.less";
.cess-table {
  overflow: hidden;
  border: 1px solid @color-border;
  border-radius: @border-radius;
  background: #fff;

  // 可点击行和禁用行样式
  .table-row-click {
    cursor: pointer;
  }
  .table-disabled-click {
    cursor: not-allowed;
  }
  .ant-table tbody > tr.table-disabled-click:hover > td {
    background: inherit;
  }

  .cess-table-empty {
    height: 200px;
  }
  .ant-table-wrapper {
    border: none;
  }
  &.cess-tow-line-table {
    .ant-table {
      tbody > tr > td.ant-table-cell {
        padding: @gap-xsmall @gap-normal;
      }
    }
  }
  &.cess-merged-table {
    .ant-table {
      &.ant-table-bordered > .ant-table-container {
        border: none;

        tbody > tr > td.ant-table-cell {
          border-top: 1px solid @color-border;
        }
        .ant-table-content > table > thead > tr > th,
        .ant-table-content > table > tbody > tr > td {
          border-left: 1px solid @color-border;
        }

        tbody > tr.ant-table-row:nth-last-of-type > td {
          border-bottom: none;
        }
      }
      tbody > tr.ant-table-row:nth-of-type(2n) > td,
      tbody > tr.ant-table-row:hover > td {
        background-color: white;
      }
      tbody > tr > td.ant-table-cell:hover {
        background-color: @color-background-hover;
      }
    }
  }
  .ant-table-tbody > tr.ant-table-row-selected > td,
  td.ant-table-column-sort {
    background: white;
  }
  .ant-table-column-sorters {
    padding: 0;
  }

  .ant-table {
    position: relative;

    thead {
      position: relative;
    }

    thead::after {
      position: absolute;
      content: '';
      display: block;
      width: 100%;
      height: 0px;
      left: 0;
      z-index: 10;
      border-radius: @border-radius;
      box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
      // box-shadow: 0 2px 4px 0 gren;
      border-bottom: 1px solid @color-border;
    }

    thead > tr > th.ant-table-cell {
      line-height: @height-normal;
      background-color: #fff;
      border-bottom: none;
      position: relative;
      font-weight: @font-weight-large;
      color: @color-font-normal;

      &:nth-of-type(1) {
        padding-left: @gap-large;
      }

      &:nth-last-of-type(1) {
        padding-right: @gap-large;
      }
    }

    tbody > tr > td.ant-table-cell {
      line-height: @height-normal;
      padding: @gap-small @gap-normal;
      border-bottom: none;
      color: @color-font-normal;

      &:nth-of-type(1) {
        padding-left: @gap-large;
      }

      &:nth-last-of-type(1) {
        padding-right: @gap-large;
      }
      .cess-table-time-range {
        line-height: 22px;
        label {
          color: @color-gray-label;
          display: inline-block;
          margin-right: 8px;
        }
      }
    }

    tbody > tr.ant-table-row:nth-of-type(2n) > td {
      background-color: @color-background-light;
    }

    tbody > tr.ant-table-row:hover > td {
      background-color: @color-background-hover;
    }
  }
}
.cess-table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: @gap-normal @gap-normal @gap-large @gap-large;
}
