@import '../../../style/mixin.scss';

.default-table {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;

  .default-table-view-spin {
    .oio-spin-loading {
      height: 32px;
      width: 32px;
    }
  }

  .ant-spin-nested-loading {
    width: 100%;
    flex: 1;

    .ant-spin-container {
      width: 100%;
      height: 100%;

      & > .oio-table > .oio-table-content-wrapper > .oio-table-content {
        position: absolute;
      }
    }

    .ant-spin-blur {
      overflow: initial;
      height: 100%;
    }
  }

  .operation-column {
    .action-bar {
      height: 100%;

      scrollbar-width: 0;

      &::-webkit-scrollbar {
        display: none;
      }
    }

    &:hover {
      .action-bar {
        scrollbar-width: thin;

        &::-webkit-scrollbar {
          display: block;
        }
      }
    }
  }

  .oio-table-footer {
    text-align: right;

    .default-table-footer-content {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      align-items: center;
    }
  }

  &.default-main-table {
    .oio-table-footer {
      text-align: right;

      .default-table-footer-content {
        position: relative;
        padding-top: var(--oio-padding);

        &::before {
          content: '';
          display: block;
          position: absolute;
          top: 0;
          left: calc(var(--oio-padding) * -1);
          right: calc(var(--oio-padding) * -1);
          height: 1px;
          background-color: var(--oio-border-color);
        }
      }
    }
  }

  &.default-table-group-hidden-expand {
    .vxe-tree-cell {
      padding-left: 0;
    }
  }

  .highlight {
    background: var(--table-high-light-bg, #6a7deb);
  }

  .table-container-click {
    display: none;
  }

  .oio-column.vxe-header--column {
    .vxe-cell {
      padding-right: 16px;
    }

    &.col--last:not(.col--checkbox, .col--seq) {
      &:has(.table-user-prefer) {
        .vxe-cell {
          padding-right: 48px;
        }
      }

      &.table-header-column-operation {
        .vxe-cell {
          padding-right: 32px;
        }
      }
    }

    .vxe-cell--title {
      .default-column-quick-operation {
        position: absolute;
        right: 5px;
        line-height: 19px;
      }
    }
  }

  .default-table-line-height-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    column-gap: var(--oio-row-gap);
  }
}

.ant-form-item-has-error {
  .default-table {
    .oio-table-footer {
      .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input) .ant-select-selector {
        border-color: var(--oio-border-color) !important;
      }
    }
  }
}
