#flowModal.auto-modal{width:calc(100vw - 36px);max-width:1440px;max-height:calc(100dvh - 32px);display:flex!important;flex-direction:column;border-radius:18px}
#flowModal .auto-modal-body{overflow:auto;padding:14px 18px;max-height:none;min-height:0}
#flowModal .auto-modal-head,#flowModal .auto-modal-foot{flex:none;padding:12px 18px}
#flowModal .auto-flow-help{margin:8px 0;font-size:12px}
#flowModal .auto-flow-active-warning{margin:8px 0;padding:8px 12px}
.mb-bot-workspace{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:12px;margin-top:12px;min-width:0}
.mb-bot-stage{min-width:0;border:1px solid #d4e3de;border-radius:12px;overflow:hidden;background:#f4f8f7}
.mb-bot-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px;background:#fff;border-bottom:1px solid #d4e3de;color:#126858;font-size:12px}
.mb-bot-toolbar>div{display:flex;gap:4px}.mb-bot-toolbar button{padding:6px 10px;min-height:32px;font-size:12px}
#flowVisualCanvas{height:440px;width:100%;position:relative;background-image:radial-gradient(#bbcfc7 1px,transparent 1px);background-size:20px 20px;touch-action:none;outline:none}
#flowVisualCanvas .drawflow{width:100%;height:100%;transform-origin:0 0}
#flowVisualCanvas .drawflow-node{width:250px;min-height:80px;padding:0;border:1px solid #cbd9d5;border-radius:12px;background:#fff;box-shadow:0 3px 14px #223e3112}
#flowVisualCanvas .drawflow-node.selected{border:2px solid #18a47e;background:#fff;box-shadow:0 0 0 3px #18a47e18}
#flowVisualCanvas .drawflow_content_node svg{position:static;width:16px;height:16px;flex:none;overflow:visible}
#flowVisualCanvas .drawflow-node .input,#flowVisualCanvas .drawflow-node .output{width:18px;height:18px;border:3px solid #fff;background:#22ae86;box-shadow:0 0 0 1px #22ae86}
#flowVisualCanvas .drawflow-node .output{right:-9px;top:auto;bottom:10px}
#flowVisualCanvas .drawflow-node .input{left:-10px}
#flowVisualCanvas .connection .main-path{stroke:#38a58b;stroke-width:3px}
#flowVisualCanvas .connection .main-path.selected{stroke:#e7992c;stroke-width:4px}
.mb-bot-node-head{display:flex;align-items:center;gap:8px;padding:12px;border-bottom:1px solid #e5eeeb;color:#186452;font-size:13px;cursor:grab}
.mb-bot-node-message{margin:10px;padding:10px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.55;color:#31554a;max-height:200px;overflow:hidden}
.mb-bot-bubble{background:#dcf8c6;border-radius:9px 0 9px 9px;box-shadow:0 1px 2px #0001}
.mb-bot-node-output{display:flex;justify-content:space-between;padding:9px 14px;border-top:1px solid #edf3f0;background:#f2fbf7;color:#4b7365;font-size:11px;border-radius:0 0 12px 12px}
.mb-bot-node-output span{margin-right:4px;color:#16a17a}.mb-bot-image-label{display:flex;align-items:center;gap:7px;padding:10px;color:#668075;font-size:11px}
#flowGraphStatus{padding:9px 12px;margin:0;color:#33755f;background:#edf7f2;font-size:11px;line-height:1.5}#flowGraphStatus.invalid{background:#fff3de;color:#8d5a15}
.mb-bot-inspector{min-width:0;background:#fff;border:1px solid #e2d8c6;border-radius:12px;padding:12px;max-height:535px;overflow:auto}
.mb-bot-inspector h4{margin:0 0 6px;color:#3b493f;font-size:14px}.mb-bot-inspector>p{margin:0 0 10px;color:#7c887f;font-size:11px;line-height:1.5}
.mb-bot-inspector .auto-flow-editor-step{margin:0 0 10px;padding:10px}.mb-bot-inspector .auto-flow-editor-step[hidden]{display:none!important}
.mb-bot-inspector .auto-flow-editor-actions{gap:3px}.mb-bot-inspector .auto-flow-editor-actions button{padding:4px}.mb-bot-inspector .auto-flow-adds{display:grid;gap:6px}.mb-bot-inspector .auto-flow-adds button{justify-content:center;width:100%;font-size:12px}
.mb-bot-details{margin:10px 0;color:#737b70;font-size:12px}.mb-bot-details summary{cursor:pointer}.mb-bot-details p{font-size:11px;line-height:1.6}
@media(max-width:850px){.mb-bot-workspace{grid-template-columns:minmax(0,1fr)}.mb-bot-inspector{max-height:none}.mb-bot-inspector .auto-flow-adds{grid-template-columns:repeat(3,minmax(0,1fr))}.mb-bot-inspector .auto-flow-adds button{padding:8px 5px;font-size:10px}#flowVisualCanvas{height:360px}}
@media(max-width:600px){#flowModal.auto-modal{width:calc(100vw - 12px);max-height:calc(100dvh - 12px);border-radius:12px}#flowModal .auto-modal-body{padding:10px}#flowModal .auto-modal-head,#flowModal .auto-modal-foot{padding:10px}.mb-bot-toolbar{flex-wrap:wrap}.mb-bot-toolbar strong{font-size:11px}#flowVisualCanvas{height:330px}}
/* Canvas-only workspace, with contextual configuration instead of a fixed sidebar. */
#flowModal.auto-modal{height:calc(100dvh - 24px);max-height:calc(100dvh - 24px)}
#flowModal .auto-modal-body{display:flex;flex-direction:column;flex:1;overflow:hidden;padding:8px 12px}
#flowModal .auto-modal-head{gap:12px;padding:8px 14px;align-items:center}
.mb-bot-flow-name{flex:1;display:flex;align-items:center;gap:10px;font-size:11px;color:#7c806f;margin:0!important}
.mb-bot-flow-name .auto-input{margin:0;max-width:740px;height:38px;font-size:13px}
.mb-bot-workspace{display:flex;flex:1;margin:0;min-height:0}
.mb-bot-stage{display:flex;flex-direction:column;flex:1;min-height:0}
#flowVisualCanvas{flex:1;min-height:180px;height:auto}
.mb-bot-toolbar{flex:none}.mb-bot-palette{display:flex;align-items:center;gap:8px;padding:9px 12px;overflow-x:auto;flex:none;border-bottom:1px solid #d7e6df;background:#fff;scrollbar-width:thin}
.mb-bot-palette>span{flex:none;color:#81958b;font-size:10px;line-height:1.5}.mb-bot-palette>span small{font-size:9px}
.mb-bot-palette-block{display:flex;align-items:center;gap:7px;flex:none;background:#f7fcfa;border:1px solid #cfe3da;border-radius:9px;padding:10px 14px;font-size:12px;font-weight:600;color:#20755c;cursor:grab;min-height:40px;touch-action:manipulation}
.mb-bot-palette-block:hover{background:#def5e9;border-color:#26a47b}.mb-bot-palette-block:active{cursor:grabbing}.mb-bot-palette-block svg{width:16px;height:16px}
.mb-bot-edit-node{margin-left:auto;display:grid;place-items:center;background:transparent;border:0;padding:3px;color:#40947b;cursor:pointer}
.mb-bot-block-dialog{position:fixed;z-index:2200;top:50%;left:50%;transform:translate(-50%,-50%);width:min(540px,calc(100vw - 24px));max-height:calc(100dvh - 130px);overflow:auto;padding:18px;border-radius:16px;border:1px solid #cdded5;background:#fff;box-shadow:0 0 0 100vmax #14302665,0 20px 80px #0004;box-sizing:border-box}
.mb-bot-block-dialog[hidden]{display:none!important}.mb-bot-dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.mb-bot-dialog-head h4{margin:0;font-size:16px;color:#1b6d54}
.mb-bot-block-dialog .auto-flow-editor-step[hidden]{display:none!important}.mb-bot-block-dialog .auto-flow-editor-step{margin:0 0 14px;padding:12px}.mb-bot-block-dialog .auto-flow-editor-step textarea{min-height:130px}
.mb-bot-block-dialog>label{display:block;margin:12px 0;color:#6b746b;font-size:12px}.mb-bot-block-dialog>label select{margin-top:6px}.mb-bot-done{float:right;margin-top:8px}
#flowModal .auto-modal-foot{gap:8px;padding:9px 14px}.mb-bot-foot-note{margin-right:auto;color:#789080;font-size:11px}#flowModal .auto-flow-active-warning{margin:0 auto 0 0;display:block;border:0;background:transparent;padding:0;font-size:11px;color:#976929}
@media(max-width:600px){#flowModal.auto-modal{height:calc(100dvh - 8px);max-height:calc(100dvh - 8px)}.mb-bot-flow-name{display:block;font-size:10px}.mb-bot-flow-name .auto-input{width:100%;height:35px;margin-top:3px}#flowModal .auto-modal-body{padding:5px}.mb-bot-toolbar{padding:6px 8px}.mb-bot-palette{gap:6px;padding:7px}.mb-bot-palette>span{display:none}.mb-bot-palette-block{padding:8px 10px;font-size:11px}.mb-bot-block-dialog{padding:12px;max-height:calc(100dvh - 80px)}#flowModal .auto-modal-foot{flex-wrap:wrap;justify-content:flex-end}.mb-bot-foot-note,#flowModal .auto-flow-active-warning{flex-basis:100%;font-size:10px}.mb-bot-done{float:none;width:100%}}
