/* Styles belong to the flow builder only. */
body:has(#closing-flow.active) .main{padding:24px!important}
.flow-builder{--flow-purple:#7744b3;--flow-line:#9a76c8;--flow-ink:#30283d;--flow-muted:#83768f;color:var(--flow-ink);min-width:0}
.flow-builder *{box-sizing:border-box}
.flow-header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:16px}.flow-eyebrow{font-size:10px;letter-spacing:.12em;font-weight:700;color:#927ca6}.flow-header h2{font-size:26px;letter-spacing:-.7px;margin:6px 0}.flow-header p{font-size:13px;color:var(--flow-muted);margin:7px 0}.flow-publish{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.flow-publish .btn{font-size:12px;min-height:42px}.flow-infobar{display:flex;gap:16px;align-items:center;justify-content:space-between;font-size:12px;padding:0 2px 14px;min-height:30px;color:var(--flow-muted)}.flow-infobar [data-state]{white-space:nowrap}.flow-infobar .is-active{color:#278761}.flow-status{color:#785191;text-align:right}
.flow-workspace{display:grid;grid-template-columns:minmax(0,1fr);min-height:620px;height:calc(100dvh - 190px);max-height:1000px;border:1px solid #e0d9e8;border-radius:16px;overflow:hidden;background:#edf0f5;position:relative}.flow-builder.has-inspector .flow-workspace{grid-template-columns:minmax(0,1fr) 340px}.flow-canvas-area{min-width:0;position:relative;overflow:hidden}.flow-viewport{position:absolute;inset:0;overflow:hidden;touch-action:none;outline-offset:-3px;background-color:#f0f1f6;background-image:radial-gradient(#d9d5e1 1px,transparent 1px);background-size:20px 20px;cursor:grab;user-select:none}.flow-viewport:active{cursor:grabbing}.flow-world{position:absolute;top:0;left:0;transform-origin:0 0;width:0;height:0}.flow-lines{position:absolute;inset:0;width:1px;height:1px;overflow:visible;pointer-events:none}.flow-lines path{fill:none;stroke:var(--flow-line);stroke-width:2;vector-effect:non-scaling-stroke}.flow-lines .flow-temp{stroke-dasharray:5 4;stroke:#60329e}.flow-top-tools{position:absolute;top:16px;left:16px;z-index:4;display:flex;gap:6px}.flow-tool{min-height:40px;min-width:40px;border:1px solid #ddd6e7;background:#fff;color:#675376;border-radius:9px;padding:8px 12px;font-size:12px;font-family:inherit;cursor:pointer;box-shadow:0 2px 8px #3c284808}.flow-tool:hover{background:#f7f2fd}.flow-tool:disabled{opacity:.4;cursor:default}.flow-add{color:#6c359e;font-weight:600;padding:10px 15px}.flow-bottom-tools{position:absolute;bottom:18px;left:16px;z-index:4;display:flex;gap:4px;padding:5px;border:1px solid #e3dceb;background:#ffffffed;border-radius:12px;box-shadow:0 6px 18px #2e143d09}.flow-bottom-tools .flow-tool{box-shadow:none;border:0;background:transparent;min-width:36px}.flow-bottom-tools [data-zoom-reset]{min-width:50px}.flow-minimap{position:absolute;right:16px;bottom:18px;width:130px;height:85px;border:1px solid #d5c9e6;border-radius:10px;background:#ffffffd9;z-index:3;cursor:pointer;overflow:hidden}.flow-hint{position:absolute;top:18px;right:16px;font-size:10px;color:#95879e;max-width:230px;text-align:right;pointer-events:none}.flow-empty{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:30px;text-align:center;cursor:default}.flow-empty[hidden]{display:none}.flow-empty>span{display:grid;place-items:center;background:#e5dced;color:#9871bb;border-radius:24px;width:74px;height:74px;font-size:35px}.flow-empty h3{font-size:19px;margin:22px 0 8px}.flow-empty p{font-size:13px;color:#8a7c94;max-width:330px;line-height:1.7;margin-bottom:24px}.flow-node{position:absolute;width:260px;border:1px solid #dfd8e7;background:#fff;border-radius:12px;box-shadow:0 5px 18px #3d27410c;cursor:default;overflow:visible;touch-action:none}.flow-node.is-selected{border:2px solid #8a55c0;box-shadow:0 0 0 4px #9a79bf18}.flow-start-badge{position:absolute;top:-26px;left:12px;font-size:10px;color:#357b64;background:#e7f4ed;border:1px solid #c9e4d6;border-radius:6px;padding:4px 8px;font-weight:700}.flow-node-head{display:flex;align-items:center;gap:9px;min-height:48px;padding:12px 14px;border-bottom:1px solid #eee7f3;cursor:grab;background:#fbf9fd;border-radius:12px 12px 0 0;touch-action:none}.flow-node-head strong{font-size:12px;font-weight:650;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:1;min-width:0}.flow-node-icon{font-size:18px;color:#8e67ae}.flow-grip{color:#b1a3bd;font-size:20px}.flow-node-body{padding:12px 14px 8px}.flow-node-body img{display:block;max-height:145px;width:100%;object-fit:cover;border-radius:7px;margin-bottom:10px;pointer-events:none}.flow-video-thumb{background:#e8dfee;color:#8256a8;padding:30px 12px;text-align:center;border-radius:7px;margin-bottom:10px;font-size:12px}.flow-node-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.55;margin:2px 0 12px;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}.flow-node-text.is-empty{color:#ae9bbd;font-style:italic}.flow-node-choice{position:relative;margin:6px 0}.flow-node-choice>button:first-child{width:100%;min-height:36px;padding:9px 12px;background:#f3edf8;border:1px solid #e5d8ee;border-radius:6px;color:#775695;font-size:11px;text-align:left;overflow-wrap:anywhere;display:flex;justify-content:space-between;gap:8px;cursor:pointer}.flow-node-choice span{opacity:.6;flex-shrink:0}.flow-node-edit{border:0;background:transparent;color:#a492b2;font-size:10px;min-height:32px;width:100%;text-align:left;cursor:pointer}.flow-output-port,.flow-input-port{position:absolute;min-width:20px;min-height:20px;width:20px;height:20px;border:3px solid #fff;border-radius:50%;background:#bda5d2;box-shadow:0 0 0 1px #9e7aba;cursor:crosshair;z-index:2;touch-action:none;padding:0}.flow-output-port{right:-25px;top:calc(50% - 10px)}.flow-input-port{left:-11px;top:15px}.flow-output-port:hover,.flow-input-port:hover,.flow-output-port.is-linked{background:#8050b4;box-shadow:0 0 0 3px #cdb5e5}.flow-inspector{background:#fff;border-left:1px solid #e3dcea;min-width:0;overflow-y:auto;overscroll-behavior:contain}.flow-inspector[hidden]{display:none}.flow-inspector-head{padding:18px 20px;border-bottom:1px solid #ede7f3;display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:0;background:#fffffffa;z-index:3}.flow-inspector-head small{font-size:9px;letter-spacing:.12em;color:#a089b2}.flow-inspector-head h3{margin:6px 0 0;font-size:15px;overflow-wrap:anywhere}.flow-inspector-body{padding:2px 20px 22px}.flow-inspector label{display:block;font-size:12px;font-weight:600;margin:18px 0 12px}.flow-inspector input,.flow-inspector textarea,.flow-inspector select{display:block;width:100%;font:400 14px/1.6 Inter,Arial,sans-serif;padding:10px 12px;border:1px solid #dfd7e6;border-radius:8px;margin-top:8px;color:#564360;min-height:42px;background:#fff}.flow-inspector textarea{resize:vertical}.flow-note{font-size:11px;color:#a08aaf;line-height:1.6;font-weight:400}.flow-inspector h4{font-size:13px;margin:22px 0 12px}.flow-inspector h4 span{float:right;color:#b39ebf;font-weight:400}.flow-media-section{border-top:1px solid #efe8f4;margin-top:20px}.flow-media-preview{display:block;width:100%;max-height:170px;object-fit:contain;background:#f5eff9;border-radius:8px}.flow-inspector .flow-upload{border:1px dashed #cdb6de;border-radius:8px;text-align:center;color:#8959a9;padding:13px;cursor:pointer;font-size:12px}.flow-upload input{font-size:11px;padding:5px;min-height:0;max-width:100%;border:0}.flow-button-editor{border:1px solid #e8dfef;border-radius:10px;padding:12px;margin:12px 0;background:#fcfafd}.flow-button-title{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#9b80ad}.flow-button-editor label{margin:12px 0;font-size:11px}.flow-text-action{border:0;background:none;color:#9066ab;min-height:32px;padding:6px 0;font-size:11px;cursor:pointer}.flow-full{width:100%}.flow-inspector hr{border:0;border-top:1px solid #ede4f3;margin:20px 0}.flow-node-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.flow-test-dialog{border:1px solid #e2d5ed;padding:22px;border-radius:18px;max-width:430px;width:calc(100% - 32px);max-height:85dvh;overflow:auto;box-shadow:0 20px 100px #25103330}.flow-test-dialog::backdrop{background:#21132d66}.flow-test-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.flow-test-header h3{margin:0;font-size:18px}.flow-test-chat{background:#e9e1f0;padding:18px;border-radius:12px;min-height:140px;margin-top:16px}.flow-test-bubble{background:#fff;padding:14px;border-radius:12px;box-shadow:0 2px 8px #4c275309}.flow-test-bubble p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.7}.flow-test-bubble img,.flow-test-bubble video{width:100%;max-height:250px;object-fit:contain;border-radius:7px}.flow-test-choice{display:block;width:100%;background:#f4eef8;border:1px solid #dccde8;padding:12px;border-radius:7px;color:#78538f;cursor:pointer;margin-top:7px;font-size:13px}.flow-builder button:focus-visible,.flow-node-head:focus-visible{outline:3px solid #b396d1;outline-offset:3px}.flow-builder button:disabled{cursor:default}
@media(max-width:1250px){.flow-header{align-items:flex-start;flex-direction:column;gap:8px}.flow-workspace{height:calc(100dvh - 230px)}.flow-hint{display:none}.flow-builder.has-inspector .flow-workspace{grid-template-columns:minmax(0,1fr) 310px}.flow-minimap{width:100px;height:64px;bottom:78px}}
@media(max-width:760px){body:has(#closing-flow.active) .main{padding:78px 12px 24px!important}.flow-header h2{font-size:23px}.flow-header p{line-height:1.6;font-size:12px}.flow-publish{gap:6px;width:100%}.flow-publish .btn{flex:1;font-size:11px;padding:10px 8px;white-space:nowrap}.flow-infobar{align-items:flex-start;gap:8px;font-size:10px}.flow-workspace,.flow-builder.has-inspector .flow-workspace{display:block;height:620px;min-height:620px}.flow-canvas-area{height:100%}.flow-inspector{position:absolute;top:0;right:0;bottom:0;width:min(340px,100%);z-index:8;border-left:1px solid #e2d8e9;box-shadow:-12px 0 50px #4d245b1c}.flow-inspector-body{padding:0 16px 22px}.flow-inspector input,.flow-inspector textarea,.flow-inspector select{font-size:16px}.flow-top-tools{left:10px;top:10px}.flow-bottom-tools{left:10px;right:10px;bottom:10px;justify-content:center}.flow-bottom-tools .flow-tool{font-size:10px;padding:8px;min-width:30px}.flow-minimap{bottom:70px;right:10px;width:85px;height:55px}.flow-empty{padding:24px}.flow-empty h3{font-size:18px}.flow-add{font-size:12px}}

/* Ordered message content blocks */
.flow-builder .flow-content-editor{border:1px solid #ded5e9;border-radius:12px;padding:12px;margin:12px 0;background:#fff}
.flow-builder .flow-block-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;cursor:grab}
.flow-builder .flow-block-tools,.flow-builder .flow-block-add{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-top:10px}
.flow-builder .flow-block-tools button{min-height:44px;min-width:44px}
.flow-builder .flow-content img{margin-bottom:8px}
.flow-builder .flow-content p{white-space:pre-wrap;overflow-wrap:anywhere}
.flow-builder .flow-block-add .flow-upload{margin:0;flex:1}
.flow-builder .flow-content-editor[draggable=true]:active .flow-block-heading{cursor:grabbing}

/* Direct manipulation of content on the canvas. */
.flow-builder .flow-canvas-block{position:relative;margin:8px 0;padding:6px;border:1px solid #e5dcef;border-radius:8px;background:#fff}
.flow-builder .flow-content-grip{display:flex;align-items:center;gap:5px;width:100%;min-height:38px;background:#f6f1fc;color:#73538e;border:0;border-radius:5px;text-align:left;padding:6px;cursor:grab;touch-action:none;font-size:11px}
.flow-builder .flow-content-grip:active{cursor:grabbing}
.flow-builder .flow-drag-label{margin-left:auto;font-size:9px;color:#78628d}
.flow-builder .flow-canvas-block .flow-node-text{margin:8px 0;pointer-events:none}
.flow-builder .flow-canvas-block img{margin:8px 0 0;pointer-events:none}
.flow-builder .flow-block-dragging{opacity:.4}
.flow-builder .flow-drop-before:before,.flow-builder .flow-drop-after:after{content:'';position:absolute;left:-5px;right:-5px;height:4px;background:#7744b3;border-radius:4px;z-index:2}
.flow-builder .flow-drop-before:before{top:-7px}.flow-builder .flow-drop-after:after{bottom:-7px}
.flow-builder .flow-connection-status{font-size:13px;margin:12px 0;overflow-wrap:anywhere}

.flow-tag-settings{border:1px solid #ded5e9;border-radius:10px;padding:12px;margin:12px 0}.flow-tag-settings summary{font-weight:600;cursor:pointer;margin-bottom:10px}.flow-condition-label{background:#f1e8fc;padding:12px;border-radius:8px;overflow-wrap:anywhere}.flow-preview-tags{display:block;padding:0 20px}.flow-preview-tags input{display:block;width:100%;padding:10px;border:1px solid #ded5e9;border-radius:8px}.flow-top-tools{flex-wrap:wrap;max-width:calc(100% - 24px)}.flow-test-dialog .flow-content-editor{overflow-wrap:anywhere}
