/* ===== 文档图表（流程图/思维导图） ===== */

/* 占位符：保留在源码中供搜索，视觉隐藏 */
.doc-diagram-hidden {
    display: none !important;
}
.doc-diagram-text {
    display: none;
}

/* 内嵌画布 */
.doc-diagram-box {
    position: relative;
    margin: 1rem 0;
    border: 1px solid #e3e6eb;
    border-radius: 4px;
    background: #fafbfc;
    overflow: hidden;
}
.doc-diagram-canvas {
    width: 100%;
    height: 340px;
    background: #fff;
}
.doc-diagram-tools {
    padding: .4rem .6rem;
    background: #f7f8fa;
    border-bottom: 1px solid #e9ebee;
    text-align: left;
}
.dd-tool-btn {
    margin-right: .8rem;
    color: #0e76a8;
    font-size: 13px;
}
.dd-tool-btn i {
    margin-right: .2rem;
}
.dd-error {
    padding: 2rem;
    text-align: center;
    color: #999;
}

/* 弹窗 */
.dd-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dd-modal {
    background: #fff;
    border-radius: 6px;
    width: min(920px, 94vw);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
}
.dd-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .7rem 1rem;
    border-bottom: 1px solid #e9ebee;
}
.dd-modal-title {
    font-weight: bold;
    font-size: 15px;
}
.dd-modal-close {
    font-size: 22px;
    line-height: 1;
    color: #999;
    text-decoration: none;
}
.dd-modal-close:hover {
    color: #333;
}
.dd-modal-body {
    padding: .8rem 1rem;
    overflow-y: auto;
}
.dd-modal-foot {
    padding: .6rem 1rem;
    border-top: 1px solid #e9ebee;
    text-align: right;
}
.dd-dialog-canvas {
    width: 100%;
    height: 46vh;
    min-height: 300px;
    border: 1px solid #e3e6eb;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

/* 编辑栏 */
.dd-edit-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .3rem;
    margin-bottom: .5rem;
}
.dd-palette {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}
.dd-node-btn {
    padding: .15rem .6rem;
    border: 1px solid #cfd6dd;
    border-radius: 3px;
    background: #fff;
    color: #444;
    font-size: 13px;
    cursor: grab;
    user-select: none;
}
.dd-node-btn:hover {
    border-color: #0e76a8;
    color: #0e76a8;
}

/* 搜索框 */
.dd-search {
    margin-top: .5rem;
}
.dd-search-input {
    display: inline-block;
    width: 240px;
    padding: .3rem .6rem;
    border: 1px solid #cfd6dd;
    border-radius: 3px;
    font-size: 13px;
}
.dd-search-count {
    margin-left: .5rem;
    color: #0e76a8;
}
.dd-search-list {
    max-height: 130px;
    overflow-y: auto;
    margin-top: .3rem;
}
.dd-search-item {
    display: block;
    padding: .2rem .5rem;
    color: #444;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dd-search-item:hover {
    background: #f2f8fc;
    color: #0e76a8;
}
