// 甘特图组件样式
.c-vtable-gantt-wrapper {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color, #e1e4e8);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  height: 100%;

  .gantt-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color, #e1e4e8);
    min-height: 48px;
    flex-shrink: 0; // 防止工具栏被压缩

    .toolbar-left {
      .gantt-title {
        font-size: 16px;
        font-weight: 600;
      }
    }

    .toolbar-right {
      display: flex;
      gap: 8px;
      align-items: center;
    }
  }

  .gantt-container {
    flex: 1;
    position: relative;
    min-height: 400px;
    overflow: hidden; // 防止滚动修复(勿删)

    // 确保甘特图组件完全填充容器，解决底部空白问题
    > * {
      width: 100%;
      height: 100%; // 从80%改为100%，减少底部空白
    }

    // 确保甘特图内部组件正确填充
    :deep(.vtable-gantt) {
      width: 100% !important;
      height: 100% !important;
      overflow: hidden;

      // 防止拖动时的闪烁问题
      * {
        backface-visibility: hidden;
        transform: translateZ(0);
        -webkit-font-smoothing: subpixel-antialiased;
      }
    }

    // 防止内部表格自动调整高度
    :deep(.vtable-gantt-table) {
      height: 100% !important;
      box-sizing: border-box;
    }

    // 防止拖动时底部色块闪烁
    :deep(.vtable-gantt-chart) {
      position: relative;
      overflow: hidden;

      // 添加GPU加速，减少重绘
      will-change: transform;
      transform: translateZ(0);
    }

    // 针对拖动元素的优化
    :deep(.vtable-gantt-task) {
      backface-visibility: hidden;
      transform: translateZ(0);

      &.dragging {
        z-index: 1000;
        pointer-events: none;
      }
    }

    // 防止拖动时底部区域的重绘闪烁
    :deep(.vtable-gantt-chart-container) {
      position: relative;
      overflow: hidden;

      &::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: transparent;
        pointer-events: none;
      }
    }
  }
}


