@import '../mixins/mixins.less';
@import './ap-table-index.less';
@import './ap-table-pagination.less';
@import './setting/index.less';
@import './ap-table-paragraph-ellipsis.less';
// 因为在ApTable里面可能会查询表单因此表单和控件的样式最好直接导入
@import '../ap-form/index.less';
@import '../ap-field/index.less';
@import '../ap-action/item.less';
@import '../ap-action/item-dropdown.less';

.b(ap-table, {
  &-wrapper {
    padding: 16px;
    background-color: #fff;
  }
  &-adaptive {
    height: 100%;
    display: flex;
    flex-direction: column;
    .ant-table-wrapper {
      flex: 1;
    }
    .ant-spin-nested-loading,.ant-spin-container {
      height: 100%;
    }
    .ant-spin-container {
      display: flex;
      flex-direction: column;
    }
    .ant-table {
      flex: 1;
    }
    .ant-table-container,.ant-table-content {
      height: 100%;
    }
    .ant-table-content > table {
      height: 100%;
    }
  }
  &__search-wrapper {
    padding:16px;
    padding-bottom: 0;
    background-color: #fff;
    margin-bottom: 10px;
  }
  &__table-wrapper {
    flex: 1;
    max-height: 100%;
    display: flex;
    flex-direction: column;
  }
  &__table-wrapper-card {
    padding: 16px;
    background-color: #fff;
    overflow: hidden;
  }
  &-table {
    .ant-pagination {
      margin-bottom: 0 !important;
      .ant-pagination-total-text {
        flex: 1;
      }
    }
    tr > th.ant-table-cell {
      &::before {
        // display: none;
        background-color: #D8DDE5 !important;
      }
      background-color: var(--ap-table-header-bg, #F2F6F9);
    }
  }
  .ant-table.ant-table-middle .ant-table-row .ant-table-cell {
    padding: 12px 16px;
  }
  .ant-table.ant-table-middle .ant-table-thead .ant-table-cell {
    padding: 12px 16px;
  }
  .ant-table.ant-table-small .ant-table-row .ant-table-cell {
    padding: 9px 16px;
  }
  .ant-table.ant-table-small .ant-table-thead .ant-table-cell {
    padding: 9px 16px;
  }
  .ant-table-placeholder .ant-table-expanded-row-fixed {
    // 这里不需要滚动的时候显示单边框，因为默认情况下会显示双边框
    &::after {
      border-inline-end-width: 0px !important;
    }
  }
  // 重设当包含排序按钮时表头的样式
  .ant-table-column-sorters {
    justify-content: unset;
    display: inline-flex;
    .ant-table-column-title {
      flex: unset;
    }
  }
  // 重设当包含筛选按钮时表头的样式
  .ant-table-filter-column {
    justify-content: unset;
    display: inline-flex;
    .ant-table-column-title {
      flex: unset;
    }
    .ant-table-filter-trigger {
      margin-left: 2px;
      padding-left: 2px;
    }
  }

  .ant-table-cell .ant-typography {
    margin-bottom: 0;
  }
  &-pagination-count-text {
    color: var(--ap-table-pagination-total-count-color, #182948);
  }
  &-pagination--total-right {
    padding-left: 12px;
  }
  &-pagination-total-wrapper {
    color: var(--ap-table-pagination-total-color, #526A90);
  }
  &-header-wrapper {
  }
  // ApTable的header区域
  &-header {
    padding-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    &__title {
      flex: 1;
      flex-shrink: 1;
      min-width: 0;
    }
  }
  // ApTable中Table的Header区域
  &-table-header {
    &__title {
      display: -webkit-inline-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: normal;
      max-width: 100%;
      vertical-align: middle;
      word-break: break-all;
      flex: 1;
    }
  }
  &-setting-trigger-button {
    color: var(--ap-table-setting-button-color, #8896B0);
    &:hover {
      color: unset;
    }
  }
  // 隐藏默认可滚动容器的滚动条
  // .ant-table-container > div:last-child {
  //   scrollbar-width: none;
  //   -ms-overflow-style: none;
  //   &::-webkit-scrollbar:horizontal {
  //     display: none
  //   }
  // }
});
