/* PlusVirtualTable 虚拟滚动表格样式 */

.plus-virtual-table {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;

  /* 标题栏 */
  &__title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;

    &__left {
      display: flex;
      align-items: center;
    }

    &__right {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    &__text {
      font-size: 16px;
      font-weight: 500;
    }

    &__refresh {
      cursor: pointer;
      color: #606266;
      transition: color 0.2s;

      &:hover {
        color: var(--el-color-primary);
      }
    }
  }

  /* 表格主体：flex: 1 让 body 自动填充父容器剩余空间 */
  /* max-height 兜底：当父容器无高度约束时防止撑满全部内容高度 */
  &__body {
    flex: 1;
    min-height: 0;
    max-height: calc(100vh - 280px);
    overflow: hidden;
  }

  /* 表头样式（与 PlusTable 保持一致） */
  &__header {
    background-color: var(--el-fill-color-light) !important;

    .el-table-v2__header-cell {
      background-color: var(--el-fill-color-light) !important;
    }
  }

  /* 分页 */
  &__pagination {
    padding: 12px 0;
  }
}

/* 操作栏按钮间距 */
.plus-virtual-table-action-bar {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
}

/* 状态圆点样式（与 PlusTable 保持一致） */
.plus-table-column-status {
  display: inline-flex;
  gap: 6px;
  align-items: center;

  &__dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
  }
}

/* 空值文本样式 */
.plus-table-column-empty {
  color: #c0c4cc;
}

/* ==================== 斑马纹模式 ==================== */
.plus-virtual-table--striped {
  .plus-virtual-table__row--striped .el-table-v2__row-cell {
    background-color: var(--el-fill-color-lighter, #fafafa);
  }
}

/* ==================== 边框模式 ==================== */
.plus-virtual-table--border {
  /* 外框放在 body 上，避免被 overflow: hidden 裁掉右/下边框 */
  .plus-virtual-table__body {
    border: 1px solid var(--el-border-color-lighter, #ebeef5);
  }

  /* 单元格竖线 */
  .el-table-v2__row-cell,
  .el-table-v2__header-cell {
    border-right: 1px solid var(--el-border-color-lighter, #ebeef5);

    &:last-child {
      border-right: none;
    }
  }

  /* 行底部横线 */
  .el-table-v2__row {
    border-bottom: 1px solid var(--el-border-color-lighter, #ebeef5);
  }

  /* 表头底部横线 */
  .el-table-v2__header-row {
    border-bottom: 1px solid var(--el-border-color-lighter, #ebeef5);
  }
}
