.@{surely-table-prefix-cls}-bordered {
  border: @table-border;
  border-right: 0;

  .@{surely-table-prefix-cls}-cell-box {
    &::before {
      background-color: transparent;
    }
  }
  .@{surely-table-prefix-cls}-cell.@{surely-table-prefix-cls}-body-cell-range-selected:not(
      .@{surely-table-prefix-cls}-body-cell-range-right
    ):not(.@{surely-table-prefix-cls}-body-cell-range-single-cell) {
    border-right: @table-border;
  }
  .@{surely-table-prefix-cls}-cell:not(.@{surely-table-prefix-cls}-body-cell-range-single-cell):not(
      .@{surely-table-prefix-cls}-body-cell-range-selected
    ) {
    border-right: @table-border;
  }
  .@{surely-table-prefix-cls}-extra-cell:not(.@{surely-table-prefix-cls}-body-cell-range-selected),
  .@{surely-table-prefix-cls}-header-extra-cell,
  .@{surely-table-prefix-cls}-cell-group {
    border-right: none;
  }
  .@{surely-table-prefix-cls}-extra-cell.@{surely-table-prefix-cls}-body-cell-range-selected:not(
      .@{surely-table-prefix-cls}-body-cell-range-right
    ):not(.@{surely-table-prefix-cls}-body-cell-range-single-cell) {
    border-right: @table-border;
  }

  .@{surely-table-prefix-cls}-cell-group-title {
    // border-right: @table-border;
    border-bottom: @table-border;
  }
  .@{surely-table-prefix-cls}-cell-no-right-bordered {
    border-right: none;
  }
  .@{surely-table-prefix-cls}-header-scrollbar,
  .@{surely-table-prefix-cls}-summary-scrollbar {
    border-right: @table-border;
    border-left: @table-border;
    position: relative;
    z-index: 0;
    &::after {
      position: absolute;
      top: 0;
      bottom: 0px;
      left: -1px;
      width: 1px;
      content: '';
      pointer-events: none;
      background: @table-header-bg;
    }
  }
  .@{surely-table-prefix-cls}-empty-container {
    border-right: @table-border;
  }
  .@{surely-table-prefix-cls}-header-container
    .@{surely-table-prefix-cls}-header-cell-title::before,
  .@{surely-table-prefix-cls}-header-container .@{surely-table-prefix-cls}-cell-group::before {
    background-color: transparent;
  }

  .@{surely-table-prefix-cls}-summary-fixed {
    border-right: @table-border;
  }
  .@{surely-table-prefix-cls}-summary-fixed-bottom,
  .@{surely-table-prefix-cls}-summary-fixed-top {
    border-right: none;
  }
  .@{surely-table-prefix-cls}-cell-fix-left-first::after,
  .@{surely-table-prefix-cls}-cell-fix-left-last::after {
    right: -1px;
  }

  .@{surely-table-prefix-cls}-summary-container {
    .@{surely-table-prefix-cls}-summary-row:last-child {
      border-bottom: none;
    }
  }
}

.@{surely-table-prefix-cls}-wrapper-bordered {
  .@{surely-table-prefix-cls}-title {
    border-right: @table-border;
    border-bottom: @table-border;
  }
  .@{surely-table-prefix-cls}-title + .@{surely-table-prefix-cls} {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }
  .@{surely-table-prefix-cls}-footer {
    border: @table-border;
    border-top: 0;
  }
}
