@border-color: #cecece4d;

@prefix-cls: ~'@{namespace}-basic-table';

.@{prefix-cls} {
  &-form-container {
    padding: 16px;

    .ant-form {
      padding: 20px 20px 4px 12px;
      margin-bottom: 18px;
      background: #fff;
      border-radius: 4px;
    }

    .ant-table-wrapper {
      border-radius: 2px;
    }
  }

  &-row__striped {
    td {
      background: #fafafa;
    }
  }

  &--inset {
    .ant-table-wrapper {
      padding: 0;
    }
  }

  .ant-tag {
    margin-right: 0;
  }

  .ant-table-wrapper {
    padding: 8px;
    background: #fff;
    border-radius: 4px;

    .ant-table-title {
      padding: 0 0 8px 0 !important;
    }

    .ant-table.ant-table-bordered .ant-table-title {
      border: none !important;
    }
  }

  //
  .ant-table {
    width: 100%;
    overflow-x: hidden;
    border: none;

    &-title {
      display: flex;
      padding: 8px 6px;
      border-bottom: none;
      justify-content: space-between;
      align-items: center;
    }

    .ant-table-thead > tr > th,
    .ant-table-header {
      background: #f1f3f4;
      background-color: #f1f3f4 !important;
    }

    .ant-table-tbody > tr.ant-table-row-selected td {
      background: fade(@primary-color, 8%) !important;
    }
  }

  .ant-table-bordered .ant-table-header > table,
  .ant-table-bordered .ant-table-body > table,
  .ant-table-bordered .ant-table-fixed-left table,
  .ant-table-bordered .ant-table-fixed-right table {
    border: 1px solid @border-color !important;
  }

  .ant-table-thead {
    tr {
      border: none;
    }

    th {
      border: none;
    }
  }

  .ant-table-bordered .ant-table-tbody > tr > td {
    border-bottom: 1px solid @border-color !important;

    &:last-child {
      border-right: none !important;
    }
  }

  .ant-table.ant-table-bordered .ant-table-footer,
  .ant-table.ant-table-bordered .ant-table-title {
    border: 1px solid @border-color !important;
  }

  .ant-table-bordered.ant-table-empty .ant-table-placeholder {
    border: 1px solid @border-color !important;
  }

  .ant-table-tbody > tr > td,
  .ant-table-tbody > tr > th,
  .ant-table-thead > tr > td,
  .ant-table-thead > tr > th {
    white-space: pre;
  }

  .ant-table-row-cell-last {
    border-right: none !important;
  }

  .ant-table-bordered .ant-table-thead > tr > th,
  .ant-table-bordered .ant-table-tbody > tr > td {
    border-right: 1px solid @border-color !important;
  }

  .ant-pagination {
    margin: 10px 0 0 0;
  }

  .ant-table-body {
    overflow-x: auto !important;
    overflow-y: scroll !important;
  }

  .ant-table-header {
    margin-bottom: 0 !important;
    overflow-x: hidden !important;
    overflow-y: scroll !important;
  }

  .ant-table-fixed-right {
    right: -1px;

    .ant-table-header {
      border-left: 1px solid @border-color !important;

      .ant-table-fixed {
        border-bottom: none;

        .ant-table-thead th {
          background: rgb(241, 243, 244);
        }
      }
    }
  }

  .ant-table-fixed-left {
    .ant-table-header {
      overflow-y: hidden !important;
    }

    .ant-table-fixed {
      border-bottom: none;
    }
  }

  .ant-table-bordered .ant-table-thead > tr:not(:last-child) > th,
  .ant-table-tbody > tr > td {
    word-break: break-word;
    border-color: @border-color !important;
  }

  .ant-table-footer {
    padding: 0;

    .ant-table-wrapper {
      padding: 0;
    }

    table {
      border: none !important;
    }

    .ant-table-body {
      overflow-x: hidden !important;
      overflow-y: scroll !important;
    }

    td {
      padding: 12px 8px;
    }
  }
}
