
@import '../../style/index.less';
@import '../../xui-head-line/style/index.less';
@import '../../xui-search-head/style/index.less';
@import '../../xui-search-bar/style/index.less';
@import '../../xui-search-frame/style/index.less';
@import '../../xui-resizable-th/style/index.less';
@import '../../xui-resizable-td/style/index.less';
@import '../../xui-operation-list/style/index.less';

@table-page-prefix-cls: ~'@{xui-prefix}__table-page';
@table-page-prefix-cls--custom: ~'@{xui-prefix}__table-page--custom';
@table-page-prefix-cls--tr-disabled: ~'@{xui-prefix}__table-page--tr-disabled';
@table-page-prefix-cls--tr-mandatory: ~'@{xui-prefix}__table-page--tr-mandatory';
@checkbox-disabled-color: #d9d9d9 !important;
@checkbox-mandatory-color: #d9d9d9 !important;

.@{table-page-prefix-cls} {
  position: relative;

  .@{table-page-prefix-cls--tr-mandatory} {
    .ant-table-cell {
      background-color: #fff !important;
    }
    .ant-checkbox-wrapper {
      .ant-checkbox-input {
        cursor: not-allowed;
      }
      .ant-checkbox-checked {
        &::after {
          border-color: @checkbox-mandatory-color;
        }
      }
      .ant-checkbox-inner {
        background-color: @checkbox-mandatory-color;
        border-color: @checkbox-mandatory-color;
        &:hover,
        &:focus {
          border-color: @checkbox-mandatory-color;
        }
      }
    }
  }
  .@{table-page-prefix-cls--tr-disabled} {
    .ant-table-cell {
      background-color: #fff !important;
    }
    .ant-checkbox-wrapper {
      .ant-checkbox-input {
        cursor: not-allowed;
      }
      .ant-checkbox-checked {
        &::after {
          border-color: @checkbox-disabled-color;
        }
      }
      .ant-checkbox-inner {
        background-color: @checkbox-disabled-color;
        border-color: @checkbox-disabled-color;
        &:hover,
        &:focus {
          border-color: @checkbox-disabled-color;
        }
        &::after {
          opacity: 0;
        }
      }
    }
  }
  &--renderBeforeTable {
    margin: 20px 0;
  }
  &--customNoData {
    padding-top: 60px;
    text-align: center;
    img {
      width: 85px;
      height: 84px;
    }
    &-tip {
      margin: 20px 0;
      color: #999;
      font-size: 14px;
    }
  }
  &--table {
    position: relative;
    &-loading {
      position: absolute;
      z-index: 1;
      width: 100%;
      height: 100%;
      background: rgba(255, 255, 255, 0.3);
      .ant-spin.ant-spin-spinning {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        .anticon.anticon-loading-3-quarters {
          font-size: 26px;
          animation: loadingCircle 1s infinite linear;
        }
      }
    }
    &-pagination {
      display: flex;
      justify-content: flex-end;
      padding-top: 10px;
    }
  }
}

.@{table-page-prefix-cls--custom} {
  .ant-table-tbody {
    display: none;
  }
}
