/* 画布移动模式样式 */
.canvas-move-mode {
    cursor: grab !important;
}

.canvas-move-mode:active {
    cursor: grabbing !important;
}

/* 树容器样式 */
.leafer-tree {
    transition: transform 0.05s ease-out;
}

/* 拖动时过渡效果 */
.leafer-dragging {
    transition: none !important;
}

/* 画布容器通用样式 */
#editor-container, 
#editor-canvas-container,
.leafer-view,
.leafer-view canvas {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: none; /* 禁用移动设备默认触摸操作 */
}

/* 确保所有弹出菜单和控件在画布上层 */
.ant-dropdown,
.ant-tooltip,
.ant-popover {
    z-index: 1001 !important;
}

/* 拖拽时应用于body的类 */
body.canvas-dragging {
    cursor: grabbing !important;
    overflow: hidden; /* 防止页面滚动 */
}

/* 提高拖拽平滑度，适用于webkit浏览器 */
.leafer-view canvas,
#editor-canvas-container {
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateZ(0) scale(1.0, 1.0);
    transform: translateZ(0);
    will-change: transform;
}
