/* Mentor-Gated Registration Flow - Mermaid MicroSim stylesheet
   Layout: 2/3 diagram panel + 1/3 info panel, zero padding for iframe embedding */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
}

main {
    display: block;
    width: 100%;
    height: 100%;
}

.container {
    display: flex;
    width: 100%;
    height: 100vh;
    /* Capped at CANVAS_HEIGHT so the layout never renders taller than the
       iframe it is embedded in. Keep this in sync with CANVAS_HEIGHT. */
    max-height: 760px;
}

/* Left 2/3: the flowchart */
.diagram-panel {
    width: 66.67%;
    height: 100%;
    background-color: aliceblue;
    display: flex;
    padding: 10px;
}

.mermaid {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* This flowchart is tall and narrow, so it is HEIGHT-constrained inside the
   iframe. Overriding Mermaid's own width/height attributes with auto lets the
   viewBox aspect ratio drive the size, and max-height: 100% then guarantees the
   last node stays on screen at any panel width. Capping only max-width (the
   template default) let the diagram overflow the bottom on narrow viewports. */
.mermaid svg {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    max-height: 100%;
}

/* Right 1/3: step details */
.info-panel {
    width: 33.33%;
    height: 100%;
    background-color: #f8f9fa;
    border-left: 1px solid #dee2e6;
    padding: 15px;
    overflow-y: auto;
}

.info-panel h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #4A90D9;
}

.info-title {
    font-size: 16px;
    font-weight: bold;
    color: #2E6BA8;
    margin-bottom: 8px;
}

.info-content {
    font-size: 14px;
    line-height: 1.5;
    color: #444;
}

.info-pin {
    margin-top: 10px;
    font-size: 12px;
    font-style: italic;
    color: #B87B12;
}

.info-placeholder {
    color: #888;
    font-style: italic;
    font-size: 14px;
}

/* Colour key, shown in the panel's resting state */
.legend {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #dee2e6;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #444;
    margin: 6px 0;
}

.swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    margin-right: 8px;
    border: 1px solid #333;
    flex-shrink: 0;
}

.sw-doc      { background-color: #4A90D9; }
.sw-decision { background-color: #F5A623; }
.sw-danger   { background-color: #D64545; }
.sw-resolve  { background-color: #3E9E6E; }
.sw-start    { background-color: #5B7186; }
.sw-wait     { background-color: #8E7CC3; }
.sw-remediate{ background-color: #E8833A; }

/* Optional running-total counter (stepper-style sims) */
.counter {
    margin-top: 14px;
    padding: 10px 12px;
    background-color: #fff;
    border: 2px solid #F5A623;
    border-radius: 8px;
}

.counter-label {
    font-size: 12px;
    color: #555;
}

.counter-value {
    font-size: 26px;
    font-weight: bold;
    color: #B87B12;
}

.counter-unit {
    font-size: 16px;
    margin-left: 2px;
}

.counter-note {
    font-size: 11px;
    color: #777;
    margin-top: 4px;
    line-height: 1.4;
}

/* Node hover and pinned states */
.node {
    cursor: pointer;
}

.node:hover rect,
.node:hover circle,
.node:hover polygon {
    filter: brightness(1.12);
}

/* The pinned outline itself is applied inline by script.js -- Mermaid's own
   id-scoped !important rules outrank any selector this file can write. */
