/* Mermaid flowcharts — components/_flowchart.html.twig + flowchart_controller.js.
   Node colours come from the diagram's own classDefs; this is only the frame. */

.bit-flowchart {
    margin: 0;
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(29, 53, 87, .12);
    overflow-x: auto;
}

/* − Fit + zoom buttons (same controls as the eSign document pane) */
.bit-flowchart-tools {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 8px;
}
.bit-flowchart-zoom {
    min-width: 32px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid rgba(29, 53, 87, .18);
    border-radius: 8px;
    background: #fff;
    color: #1d3557;
    font-size: .85rem;
    font-weight: 600;
}
.bit-flowchart-zoom:hover { background: #e8f1fb; }
.bit-flowchart-zoom-level { min-width: 52px; }

.bit-flowchart-viewport {
    overflow: hidden;
    border-radius: 10px;
    touch-action: pan-y;
}
.bit-flowchart.is-zoomed .bit-flowchart-viewport { cursor: grab; touch-action: none; }
.bit-flowchart.is-panning .bit-flowchart-viewport { cursor: grabbing; }
.bit-flowchart.is-panning .bit-flowchart-canvas { user-select: none; }

.bit-flowchart-canvas {
    display: flex;
    justify-content: center;
    min-height: 60px;
    transform-origin: 0 0;
}

.bit-flowchart-canvas svg {
    max-width: 100%;
    height: auto;
}

.bit-flowchart-loading,
.bit-flowchart-error {
    align-self: center;
    color: #6c757d;
    font-size: 13px;
}

.bit-flowchart-error {
    color: #b02a37;
}

.bit-flowchart figcaption {
    margin-top: 10px;
    font-size: 12px;
    color: #6c757d;
    text-align: center;
}
