/* Product § 02 (10-08): the workflow builder as a Plasmole tab, on the shared glass stage. Chrome
   after WorkflowBuilder.tsx; nodes after nodes/AssemblyNode.tsx and nodes/DNAFragmentNode.tsx
   (head with icon and name, status pill, body, "View Details" foot with its meta). */
.wf { margin: 0; min-width: 0; }
.wf svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wf__win { position: relative; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); overflow: hidden; box-shadow: 0 18px 35px #24264a29; font-size: 12px; color: var(--ink); }
.wf__tabs { display: flex; align-items: flex-end; gap: 3px; height: 38px; padding: 4px 8px 0; border-bottom: 1px solid var(--rule); background: var(--card); }
.wf__tab { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; font-size: 12px; color: var(--muted); }
.wf__tab svg { width: 14px; height: 14px; }
.wf__tab i { display: inline-flex; margin-left: 2px; opacity: .6; }
.wf__tab i svg { width: 11px; height: 11px; }
.wf__tab.is-on { background: var(--paper); border-color: var(--rule); color: var(--ink); }
.wf__bar { display: flex; align-items: center; gap: 2px; height: 42px; padding: 0 10px; border-bottom: 1px solid var(--rule); color: var(--muted); white-space: nowrap; }
.wf__tool { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 5px; }
.wf__tool svg { width: 14px; height: 14px; }
.wf__sep { width: 1px; height: 16px; margin: 0 4px; background: var(--rule); }
.wf__view { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 0 6px; font-size: 11.5px; color: var(--ink-2); }
.wf__view svg { width: 11px; height: 11px; }
.wf__spacer { flex: 1; }
.wf__state { margin-right: 8px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.wf__btn { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; margin-left: 6px; border: 1px solid var(--rule); border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--ink); }
.wf__btn svg { width: 13px; height: 13px; }
.wf__btn em, .wf__run em { font-style: normal; }
.wf__btn--primary { border-color: var(--purple); background: var(--purple); color: #fff; }
.wf__btn--primary svg { fill: currentColor; stroke: none; }
.wf__btn--primary.is-busy { opacity: .75; }
.wf__canvas { position: relative; height: 440px; /* set to 440 × scale by product-workflow.js */ background-color: #FAFAF8; background-image: radial-gradient(#D6D6D1 1px, transparent 1px); background-size: 16px 16px; overflow: hidden; }
/* A fixed 680 × 440 board, scaled to the canvas width by the script so pixel layout holds. */
.wf__board { position: absolute; left: 0; top: 0; width: 680px; height: 440px; transform-origin: 0 0; }
.wf__edges { position: absolute; inset: 0; width: 680px; height: 440px; }
.wf__edge { stroke: #9A9CA6; stroke-width: 1.6; fill: none; }
.wf__edge--out { stroke-dasharray: 80; stroke-dashoffset: 80; opacity: 0; transition: stroke-dashoffset .6s ease, opacity .2s; }
.wf__edge--out.is-in { stroke-dashoffset: 0; opacity: 1; }
.wf__node { position: absolute; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); box-shadow: 0 1px 2px rgba(18,19,22,.05), 0 6px 18px -10px rgba(18,19,22,.25); }
.wf__node::before, .wf__node::after { content: ''; position: absolute; top: 50%; width: 7px; height: 7px; margin-top: -4px; border: 1px solid #9A9CA6; border-radius: 50%; background: var(--paper); }
.wf__node::before { left: -4px; } .wf__node::after { right: -4px; }
.wf__node--entity::before { display: none; }
.wf__node--product::after { display: none; }
.wf__node--product { opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .4s ease; }
.wf__node--product.is-off { visibility: hidden; transition: none; }
.wf__node--product.is-in { opacity: 1; transform: none; }
.wf__head { display: flex; align-items: center; gap: 7px; padding: 9px 10px 7px; }
.wf__head b { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf__ic { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 6px; }
.wf__ic svg { width: 13px; height: 13px; }
.wf__ic--dna { background: #E6F4EA; color: #2E7D32; }
.wf__ic--assy { background: #EFEFFB; color: var(--purple); }
.wf__pill { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 2px 7px; border: 1px solid var(--rule); border-radius: 999px; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.wf__pill i { width: 6px; height: 6px; border-radius: 50%; background: #B9BAC2; }
.wf__pill.is-running { color: var(--purple); border-color: #D9D3F3; }
.wf__pill.is-running i { background: var(--purple); animation: wf-blink 1s ease-in-out infinite; }
.wf__pill.is-success { color: #1F5A33; border-color: #CDE8D5; background: #EAF6EE; }
.wf__pill.is-success i { background: #2E7D32; }
@keyframes wf-blink { 50% { opacity: .35; } }
.wf__body { padding: 0 10px 8px; }
.wf__body--map { display: grid; place-items: center; }
/* SeqViz circular mini map, as nodes/SeqVizMiniMap.tsx: a 150 px box, the viewer rendered at 2x
   and scaled to half so features get room. The generated SVG shows until the viewer mounts. */
.wf-svmap { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 150px; overflow: hidden; }
.wf-svmap__mount { display: none; transform: scale(.5); transform-origin: center center; }
.wf-svmap.is-live .wf-svmap__mount { display: block; }
.wf-svmap.is-live .wf-svmap__fallback { display: none; }
.wf-svmap__mount svg { fill: revert; stroke: revert; stroke-width: revert; }
.wf-svmap__mount * { font-family: var(--mono) !important; }
.wf-map { width: 128px; height: auto; }
.wf-map text { font-family: var(--mono); font-size: 6.5px; fill: var(--ink-2); stroke: none; }
.wf-map .wf-map__name { font-family: var(--body); font-size: 8px; font-weight: 600; fill: var(--ink); }
.wf-map .wf-map__bp { font-size: 6px; fill: var(--muted); }
.wf-map__arc { stroke-linecap: butt; }
.wf-lmap { width: 100%; height: auto; }
.wf-lmap text { font-family: var(--mono); font-size: 7px; fill: var(--muted); stroke: none; }
.wf-lmap .wf-lmap__lab { font-family: var(--body); font-size: 8px; font-weight: 600; fill: #0E3B14; }
.wf-lmap line { stroke-width: 1; }
.wf__lab { display: block; margin: 2px 0 6px; font-size: 10.5px; color: var(--muted); }
.wf__field { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; padding: 5px 8px; border: 1px solid var(--rule); border-radius: 6px; font-size: 11.5px; }
.wf__field i { width: 10px; height: 10px; border-radius: 50%; }
.wf__field em { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.wf__run { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 28px; margin-top: 4px; border-radius: 6px; background: var(--purple); color: #fff; font-size: 11.5px; font-weight: 500; }
.wf__run svg { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.wf__run.is-busy { opacity: .7; }
.wf__run--ghost { background: transparent; border: 1px solid var(--rule); color: var(--ink-2); }
.wf__run--ghost svg { fill: none; stroke: currentColor; }
.wf__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.wf__stats[hidden], .wf__frag[hidden] { display: none; }
.wf__stat { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border: 1px solid var(--rule); border-radius: 6px; background: var(--card); }
.wf__stat small { font-family: var(--mono); font-size: 9px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.wf__stat b { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf__stats .wf__run { grid-column: 1 / -1; }
.wf__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px 7px; border-top: 1px solid var(--rule); font-size: 10.5px; color: var(--muted); }
.wf__foot span { display: inline-flex; align-items: center; gap: 4px; flex: none; white-space: nowrap; }
.wf__foot svg { width: 11px; height: 11px; }
.wf__foot em { min-width: 0; font-style: normal; font-family: var(--mono); font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf__ctl { position: absolute; right: 12px; bottom: 12px; z-index: 2; display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); overflow: hidden; }
.wf__ctl span { display: grid; place-items: center; width: 28px; height: 28px; color: var(--ink-2); }
.wf__ctl span + span { border-top: 1px solid var(--rule); }
.wf__ctl svg { width: 13px; height: 13px; }
.wf__status { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; border-top: 1px solid var(--rule); background: var(--card); font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.wf__status b { font-weight: 500; color: var(--ink-2); }
@media (max-width: 760px) {
  .wf__canvas { height: 380px; }
  .wf__bar .wf__btn:not(.wf__btn--primary), .wf__state, .wf__view { display: none; }
}
