@resizable-handler-color: #d8d8d8;

.resizable-handler {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  width: 10px;
  height: 100%;
  cursor: col-resize;

  &:active,
  &:hover {
    z-index: 5;
    cursor: col-resize;
  }
}

.kw-table {
  .ant-table-title {
    padding: 0;
  }

  .ant-table-thead {
    .resizable-handler {
      visibility: hidden;
    }

    .ant-table-cell-fix-left,
    .ant-table-cell-fix-right {
      z-index: 1000;
    }

    .colNone {
      display: none;
    }
  }

  .ant-table-thead:hover {
    .resizable-handler {
      visibility: visible;
    }
  }

  .resizable-handler .resizable-line,
  .resizable-handler .resizable-line {
    background: @resizable-handler-color;
    pointer-events: none;
    position: absolute;
    top: 6px;
    right: 0;
    width: 1px;
    height: calc(100% - 12px);
    border-radius: 8px;
    transition: background-color 0.2s;
  }

  .ant-table-thead > tr > th {
    height: 32px;
    padding: 0 8px;
    background: #fff;
    border-top: none;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.65);
    font-weight: 400 !important;

    &:first-child {
      padding-left: 16px;
    }
  }

  .ant-table-thead th.ant-table-column-has-sorters:hover {
    background: #fff;
  }

  .ant-table-thead th.ant-table-column-has-sorters.ant-table-cell-fix-left:hover,
  .ant-table-thead th.ant-table-column-has-sorters.ant-table-cell-fix-right:hover,
  .ant-table-thead th.ant-table-column-sort {
    background: #fff;
  }

  table tr td.ant-table-selection-column,
  table tr th.ant-table-selection-column {
    padding: 0 !important;
    text-align: center;

    + th,
    + td {
      padding-left: 0;
    }
  }

  .ant-table-cell-ellipsis.ant-table-cell-fix-left-last,
  .ant-table-cell-ellipsis.ant-table-cell-fix-right-first {
    overflow: visible;
  }

  .ant-table-tbody > tr > td {
    height: 48px;
    padding: 8px 8px 7px;

    &:first-child {
      padding-left: 16px;
    }
  }

  .ant-table-tbody > tr.ant-table-row:hover > td,
  .ant-table-tbody > tr > td.ant-table-cell-row-hover {
    background: #f5f5f5;

    .kw-table-operate {
      border: 1px solid rgba(0, 0, 0, 0.1);
      background: #fff;
    }
  }

  .ant-table-tbody {
    .kw-table-operate {
      width: 26px;
      height: 26px;
      border: 1px solid #fff;
    }

    .ant-table-placeholder {
      .ant-table-cell {
        padding: 0;
      }
    }

    .kw-table-nodata-box {
      padding: 32px 0;

      > .kw-table-nodata-text {
        margin-top: 8px;
        font-size: 14px;
        color: rgba(0, 0, 0, 0.65);
        cursor: default;
      }
    }

    .ant-table-cell-fix-left,
    .ant-table-cell-fix-right {
      z-index: 1000;
    }

    .colNone {
      display: none;
    }
  }

  .ant-table-filter-trigger {
    margin: -4px -5px -4px 4px;
  }

  .ant-table-pagination.ant-pagination {
    margin: 20px 0;
  }
}

.no-shadow {
  .ant-table.ant-table-ping-left:not(.ant-table-has-fix-left) > .ant-table-container::before,
  .ant-table.ant-table-ping-right:not(.ant-table-has-fix-right) > .ant-table-container::after {
    box-shadow: none;
  }
}
