.table-btn() {
  .delete-btn {
    color: @error-color !important;
  }
  td:not(:last-child) {
    a {
      color: #035cc1;
      &:hover {
        color: #035cc1;
      }
    }
  }
}
.ant-table() {
  .ant-table {
    .table-btn();
    &-tbody > tr:not(.ant-table-measure-row) > td {
      padding: 12px;
      color: @text-color;
      border-right: 0;
    }
    &-container {
      border: 0;
    }
    &-thead > tr > th {
      padding: 12px;
      color: @text-color;
      white-space: nowrap;
      background: #f5f7fa;
      border: 0;
      &::after {
        position: absolute;
        top: 10px;
        right: 0;
        bottom: 10px;
        width: 1px;
        background: #e4ebf1;
        content: '';
      }
      &.ant-table-selection-column {
        text-align: left;
      }
    }
    &-thead > tr > th:nth-child(1),
    &-tbody > tr > td:nth-child(1) {
      padding-left: 20px;
    }
    &-tbody > tr {
      &:nth-child(2n) {
        td {
          background: #fafbfc;
        }
      }
      td.ant-table-selection-column {
        text-align: left;
      }
      &:not(.ant-table-placeholder):hover {
        td {
          background: #effdf6;
        }
      }
    }
    &-column-sorters {
      padding: 0;
    }
    &.ant-table-bordered
      > .ant-table-container
      > .ant-table-content
      > table
      > tbody
      > tr
      > .ant-table-cell-fix-right-first::after {
      border-right: 0;
    }
  }
}

.ant-modal() {
  .ant-modal {
    &-header {
      padding: 19px 20px;
    }
    &-title {
      font-size: 16px;
      line-height: 18px;
    }
    &-close-x {
      height: 56px;
      color: @text-color;
      line-height: 56px;
    }
    &-content {
      max-width: 1200px;
      .ant-modal-body {
        max-height: 600px;
        overflow: auto;
      }
      .ant-pro-table {
        .ant-pro-table-search {
          margin-bottom: 0;
          padding: 0;
        }
        .ant-card-body {
          padding: 0;
        }
      }
      .ls-pagination {
        padding-right: 0;
        padding-left: 0;
      }
    }
    &-body {
      padding: 20px;
    }
  }
}

.at-pagegation () {
  .ant-pagination {
    &-item {
      margin-right: 8px;
      border-radius: 6px;
    }
    &-item-active {
      background: @primary-color;
      border-color: @primary-color;
      a {
        color: #fff;
      }
    }
    .ant-pagination-item-link,
    .ant-select-selector,
    &-options-quick-jumper input {
      border-radius: 6px;
    }
  }
  .ant-pagination.mini {
    .ant-pagination-item {
      margin-right: 8px;
      border-radius: 4px;
    }
    .ant-select-selector,
    .ant-pagination-options-quick-jumper input {
      border-radius: 4px;
    }
  }
}

.ant-btn() {
  .ant-btn {
    &-lg {
      height: 36px;
      font-size: 14px;
    }
  }
}
.ant-pro-table() {
  .ant-pro-table {
    word-break: break-all;
    .table-btn();
    &.tool-bar-padding-top-0 {
      .ant-pro-table-list-toolbar-container {
        padding-top: 0;
      }
    }
    &.no-tool-bar {
      .ant-card {
        padding-top: 20px;
      }
    }
    .ant-pro-table-list-toolbar {
      .ant-alert {
        flex: 1;
      }
    }
    .ant-pro-table-list-toolbar-container {
      flex-direction: column;
      justify-content: flex-start;
      padding: 0 0 20px 0;
      .ant-pro-table-list-toolbar-left {
        .ant-space-item {
          margin-bottom: 16px;
        }
      }
      .ant-pro-table-list-toolbar-right {
        justify-content: start;
      }
    }
    .ant-pro-table-search {
      margin-bottom: 20px;
      padding-top: 20px;
      padding-right: 20px;
      padding-left: 20px;
      .ant-form-item {
        margin-bottom: 20px;
      }
    }
    .ant-card {
      padding-top: 20px;
      &-body {
        padding-right: 20px;
        padding-left: 20px;
      }
    }
    .ant-pro-table-alert {
      .ant-alert-info {
        padding: 8px 16px;
        a {
          color: @info-color;
        }
      }
    }
    .ant-pro-form-collapse-button {
      display: flex;
      align-items: center;
      svg {
        display: none;
      }
      span.anticon {
        position: relative;
        &::after {
          display: inline-block;
          width: 0;
          height: 0;
          margin-top: 6px;
          border-color: @primary-color transparent transparent transparent;
          border-style: solid;
          border-width: 6px 5px;
          transform-origin: top;
          content: '';
        }
      }
    }
    .ant-input-number {
      width: 100%;
    }
  }
}
.ant-tabs() {
  .ant-tabs {
    &.ant-tabs-top {
      background: #fff;
      &.padding {
        .ant-tabs-content {
          padding: 20px;
        }
      }
      .ant-tabs-nav {
        &:hover {
          color: @text-color;
        }

        margin-bottom: 0;
        padding: 0;
        background: #f4f6f9;
        .ant-tabs-tab {
          margin: 0;
          padding: 10px 24px;
          border-right: 1px solid #e6edf2;
          &.ant-tabs-tab-active {
            color: @text-color;
            font-weight: bold;
            background: #fff;
            .ant-tabs-tab-btn {
              color: @primary-color;
            }
          }
        }
      }
    }
    .ls-pagination {
      padding-right: 0;
      padding-left: 0;
    }
    .ant-pro-table {
      .ant-pro-table-search {
        padding: 0;
      }
      .ant-card-body {
        padding: 0;
      }
    }
  }
}

.ant-pro-page-container() {
  .ant-pro-page-container {
    .ant-pro-page-container-warp {
      background: transparent;
      .ant-page-header {
        padding: 0 0 14px;
      }
    }
  }
}
.ant-breadcrumb() {
  .ant-breadcrumb > span:last-child {
    color: @text-color;
    font-weight: 500;
    font-size: 16px;
  }
}

body {
  .ant-table() !important;
  .ant-modal();
  .at-pagegation () !important;
  .ant-btn();
  .ant-pro-table();
  .ant-pro-page-container-children-content {
    margin: 20px;
  }
  .ant-layout {
    min-height: 100vh;
  }
  .ant-form-item-label > label {
    color: rgba(@text-color, 0.8);
  }
  .ant-breadcrumb();
  .ant-formily-array-base-sort-handle {
    color: #888 !important;
    cursor: move;
  }
}
