.mermaid-editor{
    width:100%;
    min-height:380px;
    max-height:600px;
    border:none;
    padding:.85rem 1rem;
    font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
    font-size:.85rem;
    line-height:1.55;
    tab-size:2;
    resize:vertical;
    background:var(--bs-body-bg);
    color:var(--bs-body-color);
    outline:none;
    display:block;
}
.mermaid-editor:focus{
    background:var(--bs-body-bg);
    box-shadow:inset 0 0 0 2px rgba(13,110,253,.2);
}

.mermaid-preview-wrap{
    position:relative;
    min-height:380px;
    max-height:600px;
    overflow:auto;
    padding:.75rem;
    background:var(--bs-body-bg);
    text-align:center;
}
.mermaid-preview{
    transform-origin:top center;
    display:inline-block;
    min-width:100%;
}
.mermaid-preview svg{
    max-width:none;
    height:auto;
}

.mermaid-loading{
    position:absolute;
    inset:0;
    display:none;
    align-items:center;
    justify-content:center;
    background:rgba(255,255,255,.6);
    pointer-events:none;
}
[data-bs-theme="dark"] .mermaid-loading{background:rgba(0,0,0,.4);}
.mermaid-loading.is-visible{display:flex;}
