/**
 * AI创作坊 · 左侧轨道样式（工具架 + 工具内容区）
 * 工具架独立占位不占画布区域；工具内容区以弹窗形式悬浮于画布之上
 * 独立命名空间 ai-workshop-left-rail-*，字体：Microsoft YaHei
 */

/* 左侧轨道容器：参与流式布局，仅占工具架宽度，画布在其右侧不重叠 */
.ai-workshop-left-rail {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-width: 0;
    gap: 0;
    pointer-events: none;
}
.ai-workshop-left-rail > .ai-workshop-canvas-toolbar,
.ai-workshop-left-rail > .ai-workshop-left-rail-content {
    pointer-events: auto;
}

/* 工具内容区：弹窗形式悬浮于画布之上，不挤占布局；展开时宽度由变量控制 */
.ai-workshop-left-rail-content {
    position: absolute;
    left: 48px;
    top: 0;
    bottom: 0;
    z-index: 15;
    width: 0;
    min-width: 0;
    overflow: hidden;
    transition: width 0.28s ease, min-width 0.28s ease;
    display: flex;
    flex-direction: column;
    background-color: transparent;
}

/* 拖拽调整宽度时关闭过渡，宽度即时跟手，避免不跟手与裁切感 */
.ai-workshop-left-rail-content.is-resizing {
    transition: none;
}
.ai-workshop-left-rail-content.is-resizing .ai-workshop-left-rail-drawer {
    transition: none;
}

/* 当内容区可见时（聊天展开或其它工具面板），悬浮抽屉宽度由变量控制 */
.ai-workshop-left-rail-content.is-visible {
    width: var(--ai-workshop-sidebar-width, 450px);
    min-width: 450px;
    max-width: min(1000px, 50vw);
}
/* 节点仓库抽屉专用宽度 320px */
.ai-workshop-left-rail-content[data-tool-panel="node-repo"] {
    width: 320px;
    min-width: 320px;
    max-width: 320px;
}

/* 抽屉层：固定宽度，仅做滑入滑出，内部布局始终不变 */
.ai-workshop-left-rail-drawer {
    width: var(--ai-workshop-sidebar-width, 450px);
    min-width: 450px;
    flex-shrink: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
}
.ai-workshop-left-rail-content[data-tool-panel="node-repo"] .ai-workshop-left-rail-drawer {
    width: 320px;
    min-width: 320px;
}
.ai-workshop-left-rail-content.is-visible .ai-workshop-left-rail-drawer,
.ai-workshop-left-rail-content[data-tool-panel="node-repo"] .ai-workshop-left-rail-drawer {
    transform: translateX(0);
}

/* 内容区内的侧栏在抽屉内占满可用空间，固定宽度不重排 */
.ai-workshop-left-rail-content .ai-workshop-sidebar {
    flex: 1;
    min-height: 0;
    width: 100%;
    height: 100%;
}

/* 节点仓库抽屉：与 sidebar 并列，仅当 data-tool-panel=node-repo 时显示 */
.ai-workshop-left-rail-content .ai-workshop-node-repo-drawer {
    flex: 1;
    min-height: 0;
    width: 100%;
    height: 100%;
    display: none;
}
.ai-workshop-left-rail-content[data-tool-panel="node-repo"] .ai-workshop-sidebar {
    display: none;
}
.ai-workshop-left-rail-content[data-tool-panel="node-repo"] .ai-workshop-node-repo-drawer {
    display: flex;
    flex-direction: column;
}

/* 节点仓库内层：层级菜单容器（不透明底框与菜单样式见 ai-workshop-node-repo.css） */
.ai-workshop-node-repo-inner {
    flex: 1;
    min-height: 0;
    overflow: auto;
}
