@table-prefix-cls: ~'@{ant-prefix}-table';
@pagination-prefix-cls: ~'@{ant-prefix}-pagination';
@spin-prefix-cls: ~'@{ant-prefix}-spin';
@table-borderless-shadow: 0 0 14px rgba(0, 0, 0, 0.08);

.@{table-prefix-cls} {
  background-color: @white;
  border-radius: @border-radius-base;

  &.@{table-prefix-cls}-borderless {
    .@{table-prefix-cls}-small {
      border: none;

      > .ant-table-content .ant-table-row:last-child td {
        border-bottom: @border-width-base @border-style-base @border-color-split;
      }
    }
  }

  &.@{table-prefix-cls}-shadowed {
    box-shadow: @table-borderless-shadow;
  }

  &.@{table-prefix-cls}-striped {
    .@{table-prefix-cls}-tbody > tr:nth-child(even):not(:hover) > td {
      background: @bg-grey-first;
    }
  }

  &.@{table-prefix-cls}-hide-cell-borders {
    .@{table-prefix-cls}-thead > tr > th:not(:last-child),
    .@{table-prefix-cls}-tbody > tr > td:not(:last-child) {
      border-right: none;
    }
  }

  // middle table override
  &.@{table-prefix-cls}-size-middle {
    .@{table-prefix-cls}-pagination.@{pagination-prefix-cls} {
      padding: 10px;
    }
  }

  // small table override
  &.@{table-prefix-cls}-size-small {
    .@{table-prefix-cls}-content {
      > .@{table-prefix-cls}-body {
        margin: 0;
      }

      > .ant-table-footer {
        border-top: none;
        background-color: @bg-grey-first;
      }
    }

    .@{table-prefix-cls}-pagination.@{pagination-prefix-cls} {
      padding: 9px 10px;
    }
  }

  .@{table-prefix-cls}-thead > tr > th {
    font-weight: 600;
  }

  .@{table-prefix-cls}-placeholder {
    padding-top: @table-padding-horizontal;
    padding-bottom: @table-padding-horizontal;
  }

  // customize the loading of table
  .@{spin-prefix-cls}-nested-loading > div > .@{spin-prefix-cls} {
    background-color: @white;
    max-height: initial;
  }

  // customize the pagination of table
  .@{table-prefix-cls}-pagination.@{pagination-prefix-cls} {
    width: 100%;
    text-align: right;
    margin: 0;
    padding: 12px 10px;
  }

  .@{pagination-prefix-cls}-total-text {
    float: left;
  }
}
