/* Graph editor additions: UI Kit BW semantic tokens, light and dark compatible. */
.graph-svg{overflow:visible;touch-action:pan-x pan-y;isolation:isolate}
.graph-svg .graph-pool-header{cursor:pointer;outline:none}
.graph-pool-header-hit{fill:transparent;stroke:none;transition:fill var(--t)}
.graph-pool-header:hover .graph-pool-header-hit,.graph-pool-header:focus-visible .graph-pool-header-hit{fill:var(--muted)}
.graph-pool-header:focus-visible .graph-pool-header-hit{stroke:var(--ring);stroke-width:1.5}
.graph-pool-chevron{fill:none;stroke:var(--muted-foreground);stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
.graph-svg .pool-name{font-size:11px;font-weight:500;fill:var(--foreground)}
.graph-svg .graph-vertical-name{font-size:10px;letter-spacing:.8px}
.graph-svg .lane-name{font-size:10px;fill:var(--muted-foreground)}
.graph-pool-state{font:9px var(--font-mono);fill:var(--muted-foreground);letter-spacing:.5px}
.graph-node{outline:none;transition:opacity var(--t)}
.graph-svg.editing .graph-node{cursor:grab}
.graph-svg.editing .graph-node:active,.graph-svg .graph-node.dragging{cursor:grabbing}
.graph-svg.editing{touch-action:none}
.graph-node .node-box,.graph-gateway-shape,.graph-event-shape,.graph-participant-shape{fill:var(--card);stroke:color-mix(in oklch,var(--foreground) 45%,var(--border));stroke-width:1.25;transition:stroke var(--t),fill var(--t)}
.graph-svg .node-title{font-size:11px;font-weight:500;fill:var(--foreground);font-family:var(--font-sans);pointer-events:none}
.graph-svg .node-code{font:8px var(--font-mono);fill:var(--muted-foreground);pointer-events:none}
.graph-svg .node-role{font:8px var(--font-sans);fill:var(--muted-foreground);pointer-events:none}
.graph-event-end{stroke-width:2.5}
.graph-gateway-cross,.graph-participant-mark{fill:none;stroke:var(--muted-foreground);stroke-width:1.3;stroke-linecap:round;pointer-events:none}
.graph-event-label{font:9px var(--font-sans);fill:var(--muted-foreground);pointer-events:none}
.graph-hint-mark{pointer-events:none;fill:none;stroke:var(--muted-foreground);stroke-width:1;stroke-linecap:round}
.graph-node:hover>.node-box,.graph-node:focus-visible>.node-box,.graph-node.selected>.node-box,.graph-node:hover>.graph-gateway-shape,.graph-node:focus-visible>.graph-gateway-shape,.graph-node:hover>.graph-event-shape,.graph-node:focus-visible>.graph-event-shape,.graph-node:hover>.graph-participant-shape,.graph-node:focus-visible>.graph-participant-shape{stroke:var(--foreground);stroke-width:1.9;fill:var(--muted)}
.graph-node.connect-source>.node-box,.graph-node.connect-source>.graph-gateway-shape,.graph-node.connect-source>.graph-event-shape,.graph-node.connect-source>.graph-participant-shape{stroke:var(--primary);stroke-width:2;stroke-dasharray:4 3}
.graph-svg .node-port{fill:var(--card);stroke:var(--foreground);stroke-width:1.3;opacity:0;pointer-events:none;cursor:crosshair;transition:opacity .12s,fill .12s;outline:none}
.graph-svg.editing .node-port,.graph-svg .graph-node:hover .node-port,.graph-svg .graph-node:focus-within .node-port,.graph-svg.connecting .node-port{opacity:1;pointer-events:all}
.graph-svg .node-port:hover,.graph-svg .node-port:focus-visible{fill:var(--primary);stroke:var(--primary);stroke-width:2.5}
.graph-svg:not(.editing) .node-port{pointer-events:none}
.graph-edge{cursor:pointer;outline:none;color:var(--muted-foreground)}
.graph-edge-hit{fill:none;stroke:transparent;stroke-width:14px;pointer-events:stroke;stroke-linecap:round;stroke-linejoin:round}
.graph-edge-line{fill:none;stroke:var(--muted-foreground);stroke-width:1.35;stroke-linejoin:round;stroke-linecap:round;pointer-events:none}
.graph-edge-message .graph-edge-line{stroke-dasharray:5 4}
.graph-edge-association .graph-edge-line{stroke-dasharray:1 4;stroke-width:1.2}
.graph-default-slash{stroke:var(--muted-foreground);stroke-width:1.5;fill:none;pointer-events:none}
.graph-marker-fill{fill:var(--muted-foreground);stroke:none}
.graph-marker-stroke{fill:none;stroke:var(--muted-foreground);stroke-width:1.2;stroke-linejoin:round;stroke-linecap:round}
.graph-marker-condition{fill:var(--card);stroke:var(--muted-foreground);stroke-width:1.1}
.graph-edge-label rect{fill:var(--card);stroke:none;fill-opacity:.98}
.graph-edge-label-text{font:10px var(--font-sans);fill:var(--muted-foreground);pointer-events:none}
.graph-edge:hover .graph-edge-line,.graph-edge:focus-visible .graph-edge-line,.graph-edge.selected .graph-edge-line{stroke:var(--foreground);stroke-width:2}
.graph-edge:hover .graph-edge-label rect,.graph-edge:focus-visible .graph-edge-label rect,.graph-edge.selected .graph-edge-label rect{stroke:var(--border);fill:var(--muted)}
.graph-edge:hover .graph-edge-label-text,.graph-edge:focus-visible .graph-edge-label-text,.graph-edge.selected .graph-edge-label-text{fill:var(--foreground)}
.graph-edge.selected .graph-edge-hit{stroke:color-mix(in oklch,var(--foreground) 6%,transparent);stroke-width:10px}
.graph-svg .dimmed{opacity:.22}
.graph-connection-preview,.connection-preview{fill:none;stroke:var(--foreground);stroke-width:1.5;stroke-dasharray:5 4;pointer-events:none}
.editor-toolbar,.graph-editor-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:12px 14px;border-bottom:1px solid var(--border);background:var(--card)}
.editor-toolbar-group,.editor-actions,.edit-mode-actions,.graph-editor-actions{display:flex;align-items:center;flex-wrap:wrap;gap:7px}
.editor-toolbar .btn,.graph-editor-toolbar .btn{height:31px;font-size:11px;padding:0 10px}
.editor-toolbar .btn .icon,.graph-editor-toolbar .btn .icon{width:14px;height:14px}
.editor-toolbar .icon-btn,.graph-editor-toolbar .icon-btn{width:30px;height:30px}
.editor-separator{height:20px;width:1px;background:var(--border);margin:0 3px}
.editing-pill,.edit-mode-pill{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--border);border-radius:999px;padding:4px 9px;font-size:10px;white-space:nowrap;background:var(--muted);color:var(--foreground)}
.editing-pill:before,.edit-mode-pill:before{content:'';width:5px;height:5px;border-radius:50%;background:var(--foreground)}
.editor-help{font-size:10px;color:var(--muted-foreground);line-height:1.55;max-width:48ch}
.connection-banner{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:11px 15px;border-bottom:1px solid var(--border);background:var(--muted);color:var(--foreground);font-size:11px;line-height:1.6}
.connection-banner>.icon{width:15px;height:15px;flex:none}
.connection-banner>span,.connection-banner>p{flex:1;min-width:160px}
.connection-banner .btn,.connection-banner .text-link{flex:none;margin-left:auto}
.connection-banner strong{font-weight:600}
#diagram-tooltip,.diagram-tooltip{position:fixed;z-index:90;pointer-events:none;max-width:min(340px,calc(100vw - 24px));padding:12px 14px;border-radius:9px;border:1px solid color-mix(in oklch,var(--background) 18%,var(--foreground));background:var(--foreground);color:var(--background);font:12px/1.65 var(--font-sans);box-shadow:var(--shadow-md);white-space:pre-line;overflow-wrap:anywhere}
#diagram-tooltip[hidden],.diagram-tooltip[hidden]{display:none!important}
.graph-empty-state{padding:35px;text-align:center;font-size:12px;color:var(--muted-foreground)}
.graph-heading-toolbar{flex-wrap:wrap}.graph-heading-toolbar .toolbar-actions{flex-wrap:wrap;min-width:0;max-width:100%}.graph-heading-toolbar .select{max-width:100%}.graph-heading-toolbar .section-title{flex-wrap:wrap;gap:7px 10px}
.graph-hint-readout{padding:14px 16px;background:var(--muted);border:1px solid var(--border);border-radius:9px;margin-bottom:20px}.graph-hint-readout h3{display:flex;align-items:center;gap:7px;margin:0 0 8px}.graph-hint-readout h3 .icon{width:14px;height:14px}.graph-hint-readout p{white-space:pre-line;overflow-wrap:anywhere;margin:0;font-size:12px;line-height:1.7}.graph-edge-type{display:flex;align-items:center;gap:9px;font-size:12px;margin-bottom:16px}.graph-form-two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.editor-toolbar .is-active,.graph-heading-toolbar .is-active{background:var(--muted);border-color:var(--foreground)}.manual-route{margin-top:16px;padding-top:12px;border-top:1px solid var(--border)}.manual-route ul{margin-top:7px}.connection-banner>button{display:flex;align-items:center;padding:4px;border-radius:5px}.connection-banner>button:hover{background:var(--card)}
@media(max-width:480px){.graph-form-two{grid-template-columns:1fr}.graph-heading-toolbar .toolbar-actions{width:100%}.graph-heading-toolbar .select{flex:1;min-width:120px;width:120px}}
.edge-type-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.edge-type-option{display:flex;align-items:center;gap:8px;padding:10px;border:1px solid var(--border);border-radius:8px;font-size:11px;text-align:left}
.edge-type-option.active{background:var(--muted);border-color:var(--foreground)}
@media(max-width:700px){.editor-toolbar,.graph-editor-toolbar{padding:10px;gap:9px}.editor-toolbar-group,.editor-actions,.edit-mode-actions,.graph-editor-actions{gap:5px}.editor-help{width:100%;max-width:none}.editor-toolbar .btn,.graph-editor-toolbar .btn{font-size:10px;height:30px;padding:0 8px}.editor-separator{display:none}.connection-banner{padding:10px 12px;font-size:10px}.edge-type-options{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.graph-svg *,#diagram-tooltip{transition:none!important}}
@media print{.editor-toolbar,.graph-editor-toolbar,.connection-banner,.node-port,#diagram-tooltip{display:none!important}.graph-svg{break-inside:avoid}}
