/* Graph Editor 样式 (M15) */

.graph-edit-mode {
    cursor: crosshair;
}

.graph-edit-mode .node {
    cursor: grab;
}

.graph-edit-mode .node:active {
    cursor: grabbing;
}

.graph-edit-mode .node circle {
    stroke: #35A85B;
    stroke-width: 3;
}

.graph-editor-drag-line {
    pointer-events: none;
}

.graph-editor-hint {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    pointer-events: none;
    z-index: 50;
}

.graph-editor-toolbar {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 8px;
    z-index: 50;
}

.graph-editor-toolbar .btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.graph-editor-toolbar .btn-edit-active {
    background: #35A85B;
    color: #ffffff;
}

.graph-editor-toolbar .btn-edit-inactive {
    background: #e2e8f0;
    color: #475569;
}

.graph-editor-toolbar .btn-edit-inactive:hover {
    background: #cbd5e1;
}

/* 编辑模式下的选中态 */
.node-selected circle {
    stroke: #f59e0b !important;
    stroke-width: 4 !important;
}

.link-selected {
    stroke: #f59e0b !important;
    stroke-width: 4 !important;
}

/* 属性编辑弹窗 */
.graph-editor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}

.graph-editor-modal-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.dark .graph-editor-modal-content {
    background: #1e293b;
    color: #f1f5f9;
}

.graph-editor-modal-content h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
}

.graph-editor-modal-content .form-group {
    margin-bottom: 12px;
}

.graph-editor-modal-content label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}

.dark .graph-editor-modal-content label {
    color: #94a3b8;
}

.graph-editor-modal-content input,
.graph-editor-modal-content textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #1e293b;
    font-size: 14px;
    box-sizing: border-box;
}

.dark .graph-editor-modal-content input,
.dark .graph-editor-modal-content textarea {
    background: #0f172a;
    border-color: #475569;
    color: #f1f5f9;
}

.graph-editor-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.graph-editor-modal-actions .btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.graph-editor-modal-actions .btn-primary {
    background: #35A85B;
    color: #ffffff;
}

.graph-editor-modal-actions .btn-secondary {
    background: #e2e8f0;
    color: #475569;
}

.dark .graph-editor-modal-actions .btn-secondary {
    background: #334155;
    color: #cbd5e1;
}
