.pagoda-virtual-table {
  .el-table-v2 {
    position: relative;
    box-sizing: border-box;

    &::after {
      position: absolute;
      content: '';
      right: 0;
      bottom: 0;
      left: 0;
      border-bottom: var(--el-table-border);
      z-index: 2;
    }

    &__header-row {
      border-bottom: none;
      background-color: var(--el-table-header-bg-color);
    }

    .pagoda-virtual-table-header__column {
      border-bottom: var(--el-table-border);
    }

    .el-table-v2__row-cell {
      padding: 8px;
      line-height: 23px;
    }
  }

  &--border .el-table-v2 {
    border-top: var(--el-table-border);
    border-left: var(--el-table-border);

    &::before {
      position: absolute;
      content: '';
      right: 0;
      bottom: 0;
      top: 0;
      border-right: var(--el-table-border);
      z-index: 2;
    }

    .pagoda-virtual-table-header__column,
    .el-table-v2__row-cell {
      border-right: var(--el-table-border);
    }
  }

  &--flex-column {
    display: flex;
    flex-direction: column;

    .pagoda-virtual-table__el-virtual-table-wrapper {
      flex: 1;
      overflow: hidden;
    }
  }

  &__row {
    &--striped {
      background: var(--el-fill-color-lighter);
    }
  }

  &-header__column {
    display: flex;
    position: relative;
    padding: 8px 0;
    text-align: left;
    align-items: center;
    box-sizing: border-box;
    color: var(--el-table-header-text-color);
    font-weight: 700;

    &.is-sortable {
      cursor: pointer;
    }

    &-wrapper {
      flex: 1;
      display: flex;
      justify-self: center;

      &--vertical {
        flex-direction: column;
      }
    }

    &-child-wrapper {
      display: flex;
    }

    .cell {
      display: flex;
      align-items: center;
      box-sizing: border-box;
      padding: 0 8px;
      overflow: hidden;
      line-height: 23px;
      white-space: normal;
      text-overflow: ellipsis;
      word-break: break-all;
    }

    // sortable
    .caret-wrapper {
      position: relative;
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      width: 24px;
      height: 34px;
      overflow: initial;
      vertical-align: middle;
      cursor: pointer;

      .sort-caret {
        position: absolute;
        left: 7px;
        width: 0;
        height: 0;
        border: 5px solid transparent;

        &.ascending {
          top: 5px;
          border-bottom-color: var(--el-text-color-placeholder);

          &.active {
            border-bottom-color: var(--el-color-primary);
          }
        }

        &.descending {
          bottom: 7px;
          border-top-color: var(--el-text-color-placeholder);

          &.active {
            border-top-color: var(--el-color-primary);
          }
        }
      }
    }
  }

  th .cell.column-required::before {
    content: '*';
    color: #f56c6c;
    margin-right: 4px;
  }
}
