.flow-studio{margin:0 20px 24px;border:1px solid #e4e9f1;border-radius:14px;overflow:hidden;background:#fff}.flow-studio-bar{padding:14px 18px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e9edf4;gap:12px}.flow-studio-bar>div:first-child{display:flex;align-items:center;gap:12px}.flow-studio-bar strong{font-size:14px}.flow-studio-bar [data-flow-count]{background:#f1f4f9;color:#7b8496;padding:4px 8px;border-radius:6px;font-size:11px}.flow-studio-tools{display:flex;gap:5px}.customer-pbx .flow-studio-tools button{border:0;background:#f6f8fb;padding:7px 10px;font-size:18px;line-height:1}.flow-palette{display:flex;align-items:center;gap:8px;padding:12px 16px;border-bottom:1px solid #e9edf4;flex-wrap:wrap;background:#fcfdff}.flow-palette>span{font-size:10px;letter-spacing:.08em;color:#8992a5;margin-right:5px}.customer-pbx .flow-palette button{background:#fff;border-color:#e1e7f0;padding:8px 12px;font-size:12px;cursor:grab;box-shadow:0 2px 3px #152a4510}.flow-studio-body{display:grid;grid-template-columns:minmax(0,1fr) 330px;height:660px}.flow-canvas-wrap{position:relative;min-width:0;overflow:hidden;background-color:#f6f8fc;background-image:radial-gradient(#cfd7e5 1px,transparent 1px);background-size:20px 20px}[data-flow-canvas]{width:100%;height:100%;position:relative}.flow-canvas-hint{position:absolute;left:16px;bottom:16px;pointer-events:none;color:#8692a9;font-size:11px;max-width:60%}.flow-zoom-tools{position:absolute;bottom:16px;right:16px;display:flex;align-items:center;gap:4px;padding:5px;background:#fff;border:1px solid #e4e9f1;border-radius:9px;box-shadow:0 4px 12px #18233c0d}.customer-pbx .flow-zoom-tools button{border:0;padding:5px 9px}.flow-zoom-tools span{font-size:11px;color:#74809a;min-width:36px;text-align:center}.flow-inspector{overflow-y:auto;border-left:1px solid #e4e9f1;background:#fff;min-width:0}.flow-inspector-heading{padding:16px 18px;border-bottom:1px solid #e9edf4;position:sticky;top:0;background:#fff;z-index:2}.flow-inspector-heading strong{display:block;font-size:13px}.flow-inspector-heading small{font-size:11px;color:#8992a5;display:block;margin-top:4px}.flow-inspector .pbx-form-grid{grid-template-columns:minmax(0,1fr);padding:18px;gap:16px}.flow-inspector .pbx-wide{grid-column:1}.flow-inspector .pbx-menu-row{flex-wrap:wrap}.flow-inspector .pbx-form-grid label{font-size:12px}.flow-inspector .pbx-actions{gap:7px}.flow-inspector .pbx-actions button{font-size:11px}.flow-inspector audio{width:100%}.flow-inspector .pbx-days{gap:7px}.flow-inspector .pbx-form-grid .pbx-form-grid{padding:0}.flow-inspector textarea{min-height:90px;resize:vertical}.flow-studio .drawflow .drawflow-node{width:232px;min-height:125px;border:1px solid #dce3ef;border-radius:12px;padding:0;background:#fff;box-shadow:0 5px 18px #263b5910;color:#29334b}.flow-studio .drawflow .drawflow-node.selected{border-color:#f56a2a;box-shadow:0 0 0 3px #f56a2a20,0 8px 20px #263b5915}.flow-card{padding:16px}.flow-card-title{display:flex;align-items:center;gap:10px;font-size:13px}.flow-card-icon{width:30px;height:30px;display:grid;place-items:center;background:#efe9ff;color:#8154d7;border-radius:8px;font-size:20px}.flow-incoming .flow-card-icon{background:#e5f7ef;color:#159669}.flow-extension .flow-card-icon{background:#e8f0ff;color:#3971d4}.flow-time_control .flow-card-icon{background:#fff3d9;color:#c98c16}.flow-card p{font-size:12px;color:#7b869a;margin:10px 0;line-height:1.5;white-space:normal;overflow-wrap:anywhere;max-height:54px;overflow:hidden}.flow-card small{display:block;color:#99a2b4;font-size:9px;border-top:1px solid #f0f3f8;padding-top:9px}.flow-studio .drawflow .drawflow-node .input,.flow-studio .drawflow .drawflow-node .output{width:13px;height:13px;background:#fff;border:2px solid #a3afc5}.flow-studio .drawflow .drawflow-node .input{left:-7px}.flow-studio .drawflow .drawflow-node .output{right:6px}.flow-studio .drawflow .connection .main-path{stroke:#a8b5cb;stroke-width:2.5}.flow-studio .drawflow .connection .main-path:hover,.flow-studio .drawflow .connection .main-path.selected{stroke:#f56a2a;stroke-width:3}.flow-studio:fullscreen{margin:0;border-radius:0;width:100vw;height:100vh}.flow-studio:fullscreen .flow-studio-body{height:calc(100vh - 115px)}html[data-portal-theme=dark] .flow-studio,html[data-portal-theme=dark] .flow-inspector,html[data-portal-theme=dark] .flow-inspector-heading,html[data-portal-theme=dark] .flow-studio-bar{background:#20242e;color:#dce3ef;border-color:#363d4b}html[data-portal-theme=dark] .flow-palette{background:#242934;border-color:#363d4b}html[data-portal-theme=dark] .flow-canvas-wrap{background-color:#1a1f29;background-image:radial-gradient(#384253 1px,transparent 1px)}html[data-portal-theme=dark] .flow-studio .drawflow .drawflow-node{background:#252c39;border-color:#49556a;color:#e4ebf7}html[data-portal-theme=dark] .flow-zoom-tools,html[data-portal-theme=dark] .flow-palette button{background:#252c39;color:#e4ebf7;border-color:#49556a}@media(max-width:1100px){.flow-studio-body{grid-template-columns:minmax(0,1fr);height:auto}.flow-canvas-wrap{height:500px}.flow-inspector{max-height:520px;border-left:0;border-top:1px solid #e4e9f1}.flow-studio:fullscreen .flow-studio-body{height:calc(100vh - 140px);overflow:auto}}@media(max-width:600px){.flow-studio{margin:0 10px 16px}.flow-palette{gap:6px;padding:10px}.flow-palette>span{width:100%}.flow-canvas-wrap{height:420px}.flow-canvas-hint{display:none}.flow-studio-bar{padding:12px}.flow-studio-bar>div:first-child{gap:6px;flex-wrap:wrap}.flow-studio-bar strong{font-size:12px}}

.customer-pbx[data-section="flow"]>.pbx-notice:empty{display:none}.customer-pbx[data-section="flow"] .flow-studio{margin:0 0 24px}

/* Let the flow workspace fill the available viewport. */
.content:has(.customer-pbx[data-section="flow"]){max-width:none;padding:12px;min-width:0}
.customer-pbx[data-section="flow"]{width:100%;min-width:0;border:0;box-shadow:none;background:transparent}
.customer-pbx[data-section="flow"] .flow-studio{margin:0;border:0;border-radius:0;box-shadow:none;width:100%;height:calc(100dvh - 100px);min-height:420px;display:flex;flex-direction:column}
.customer-pbx[data-section="flow"] .flow-studio-bar,.customer-pbx[data-section="flow"] .flow-palette{flex-shrink:0}
.customer-pbx[data-section="flow"] .flow-studio-body{height:auto;flex:1;min-height:0}
.customer-pbx[data-section="flow"] .flow-studio:fullscreen{height:100dvh;min-height:0}
@media(max-width:1100px){.customer-pbx[data-section="flow"] .flow-studio-body{overflow:auto;grid-template-rows:minmax(300px,55dvh) auto}.customer-pbx[data-section="flow"] .flow-canvas-wrap{height:100%;min-height:300px}.customer-pbx[data-section="flow"] .flow-inspector{max-height:none;overflow:visible}}
@media(max-width:800px){.content:has(.customer-pbx[data-section="flow"]){padding:8px}.customer-pbx[data-section="flow"] .flow-studio{height:calc(100dvh - 81px)}}

.customer-pbx .flow-studio-tools .flow-save,.customer-pbx .flow-studio-tools .flow-apply{font-size:12px;padding:10px 14px;white-space:nowrap}.customer-pbx .flow-studio-tools .flow-apply{background:var(--orange,#f56a2a);color:#fff}.flow-studio-tools{flex-wrap:wrap;justify-content:flex-end}@media(max-width:600px){.flow-studio-bar{flex-wrap:wrap}.flow-studio-tools{margin-left:auto}}

/* Node settings float beside the selected step instead of reserving a column. */
.customer-pbx[data-section="flow"] .flow-studio-body{position:relative;display:block;overflow:hidden}
.customer-pbx[data-section="flow"] .flow-canvas-wrap{width:100%;height:100%;min-height:0}
.customer-pbx[data-section="flow"] .flow-inspector{position:absolute;z-index:20;width:330px;max-width:calc(100% - 16px);overflow:auto;border:1px solid #e4e9f1;border-radius:12px;box-shadow:0 12px 36px #18233c26;overscroll-behavior:contain}
.flow-inspector-heading [data-flow-inspector-close]{float:right;border:0;background:transparent;font-size:22px;line-height:1;padding:0 4px;margin-left:8px}
html[data-portal-theme=dark] .flow-inspector{border-color:#363d4b}

.flow-trunk-row{display:flex;align-items:center;gap:8px;margin-bottom:10px}.flow-trunk-row select{flex:1;min-width:0}.flow-trunk-row button{flex-shrink:0}

.flow-inspector-actions{float:right;display:flex;align-items:center;gap:5px;margin-left:8px}
.customer-pbx .flow-inspector-actions button{display:grid;place-items:center;width:29px;height:29px;padding:5px;margin:0;float:none;border:1px solid #e1e7f0;border-radius:6px;background:transparent;color:inherit;line-height:1}
.flow-inspector-actions svg{width:17px;height:17px}
.flow-inspector-heading{min-height:62px}
.flow-inspector-actions button:disabled{opacity:.35;cursor:default}
.customer-pbx .flow-inspector-actions [data-flow-delete]:not(:disabled):hover{color:#dc3545;border-color:#dc3545}

.flow-heading-name{display:block;margin-right:110px;min-width:0}.customer-pbx .flow-heading-name input{width:100%;min-width:0;box-sizing:border-box;font-size:13px;font-weight:600;padding:7px 9px;height:32px}

.customer-pbx .flow-inspector-actions [data-flow-listen][data-audio-ready="true"]{color:#15803d;border-color:#22c55e;background:#dcfce7}
.customer-pbx .flow-inspector-actions [data-flow-listen][data-audio-ready="false"]{color:#b91c1c;border-color:#ef4444;background:#fee2e2}

.flow-palette>.flow-studio-tools{margin-left:auto;flex-shrink:0}
.customer-pbx .flow-palette .flow-studio-tools button{cursor:pointer;background:#f6f8fb;box-shadow:none}
.customer-pbx .flow-palette .flow-studio-tools .flow-apply{background:var(--orange,#f56a2a);color:#fff}
@media(max-width:600px){.flow-palette>.flow-studio-tools{width:100%;justify-content:flex-end}}
.flow-inspector [data-pbx-time]{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:10px}.flow-inspector [data-pbx-time]>.pbx-wide,.flow-inspector [data-pbx-time]>label:has(select){grid-column:1 / -1}.flow-inspector [data-pbx-time]>label{min-width:0}.flow-inspector [data-pbx-time] input[type=time]{width:100%;min-width:0;box-sizing:border-box;padding-left:7px;padding-right:7px}
.flow-department-ring-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}.flow-department-ring-row>label{min-width:0}.customer-pbx .flow-department-ring-row select,.customer-pbx .flow-department-ring-row input{width:100%;min-width:0;box-sizing:border-box}



.customer-pbx .pbx-notice.pbx-toast{position:fixed;right:24px;bottom:24px;z-index:10000;max-width:min(380px,calc(100vw - 32px));margin:0;padding:15px 20px;border:1px solid #86cfa1;border-radius:12px;background:#ecfdf3;color:#166534;font-size:14px;font-weight:600;line-height:1.5;box-shadow:0 8px 28px #12261a26;pointer-events:none}@media(max-width:600px){.customer-pbx .pbx-notice.pbx-toast{right:16px;bottom:16px}}
