/* Mermaid MicroSim Stylesheet
   Layout: 2/3 diagram panel + 1/3 info panel
   Click a node to pin its details in the info panel.
   Designed for minimal padding in 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 container: diagram left 2/3, info panel right 1/3 */
.container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Left 2/3: Mermaid diagram */
.diagram-panel {
    width: 66.67%;
    height: 100%;
    background-color: aliceblue;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 10px;
    overflow: auto;
}

.mermaid {
    width: 100%;
    max-height: 100%;
}

.mermaid svg {
    max-width: 100%;
}

/* Right 1/3: Info panel for clicked-node content */
.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 #2a9d8f;
}

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

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

.info-content .mini {
    display: block;
    margin-top: 8px;
    padding: 6px 8px;
    background: #eef6f5;
    border-left: 3px solid #2a9d8f;
    font-size: 13px;
    color: #2b2b2b;
}

.info-content .req {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}

.req.required { background: #d8f0ec; color: #21867a; }
.req.optional { background: #f1e4cf; color: #a5701c; }

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

/* Node interaction styling */
.node {
    cursor: pointer;
}

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

.node.node-selected rect,
.node.node-selected circle,
.node.node-selected polygon {
    filter: brightness(1.12);
    stroke: #e63946 !important;
    stroke-width: 3px !important;
}
