/* 在线思维导图编辑器样式 */
.mm-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.mm-toolbar .layui-btn { margin: 0; }
.mm-name-input { width: 220px; }
.mm-name-input input { height: 38px; }
.mm-dirty { font-size: 12px; color: #e8862e; min-width: 52px; }
.mm-theme-btns { display: inline-flex; gap: 6px; align-items: center; }
.mm-theme-btns .layui-btn { min-width: 0; padding: 0 10px; }
.mm-theme-btns .layui-btn.active { box-shadow: inset 0 0 0 2px rgba(255,255,255,.75); }

.mm-stage-wrap { position: relative; border: 1px solid #dfe6ee; border-radius: 10px; background: #fbfcfe;
  overflow: hidden; height: 560px; }
.mm-stage-wrap svg.mm-stage { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.mm-stage-wrap svg.mm-stage.panning { cursor: grabbing; }
.mm-stage-wrap svg.mm-stage.dragging, .mm-stage-wrap svg.mm-stage.dragging .mm-node { cursor: grabbing; }
.mm-stage .mm-edge { fill: none; stroke-width: 2; }
.mm-stage .mm-node { cursor: grab; }
.mm-stage .mm-node rect.mm-box { stroke-width: 2; }
.mm-stage .mm-node text.mm-label { font-size: 14px; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; user-select: none; }
.mm-stage .mm-node.selected rect.mm-box { stroke-dasharray: 6 3; stroke-width: 2.5; }
.mm-stage .mm-toggle { cursor: pointer; }
.mm-stage .mm-toggle circle { stroke-width: 1.5; }
.mm-stage .mm-toggle text { font-size: 13px; font-weight: 700; user-select: none; pointer-events: none; }

.mm-edit-input { position: absolute; z-index: 30; font-size: 14px; font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  padding: 8px 14px; border: 2px solid #2b7cd3; border-radius: 8px; outline: none; background: #fff; box-sizing: border-box; }

.mm-panel { position: absolute; top: 12px; left: 12px; z-index: 20; width: 320px; max-height: calc(100% - 24px);
  overflow: auto; background: #fff; border: 1px solid #dfe6ee; border-radius: 10px; box-shadow: 0 8px 24px rgba(20,40,70,.14); padding: 12px 14px; }
.mm-panel[hidden] { display: none; }
.mm-panel h4 { font-size: 15px; margin: 0 0 10px; }
.mm-panel .mm-close { float: right; cursor: pointer; color: #999; font-size: 16px; line-height: 1; }
.mm-panel .mm-close:hover { color: #333; }
.mm-tpl-item { display: flex; gap: 10px; align-items: center; position: relative;
  border: 1px solid #e6ecf3; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; cursor: pointer; }
.mm-tpl-item:hover { border-color: #2b7cd3; background: #f2f7fe; }
.mm-tpl-thumb { width: 110px; height: 68px; object-fit: cover; border-radius: 6px;
  border: 1px solid #e6ecf3; flex: none; background: #fff; }
.mm-tpl-meta { flex: 1; min-width: 0; }
.mm-tpl-meta b { font-size: 14px; display: block; margin-bottom: 2px; }
.mm-tpl-meta span { font-size: 12px; color: #8a97a8; }
/* 悬停放大预览：fixed 定位，不会被面板的 overflow 裁掉 */
.mm-tpl-zoom { display: none; position: fixed; z-index: 200; left: 50%; top: 50%;
  transform: translate(-50%, -50%); background: #fff; padding: 12px; border-radius: 12px;
  box-shadow: 0 16px 48px rgba(10, 30, 60, .28); pointer-events: none; }
.mm-tpl-item:hover .mm-tpl-zoom { display: block; }
.mm-tpl-zoom img { width: 560px; max-width: 86vw; height: auto; display: block; border-radius: 6px; }
.mm-my-item { display: flex; align-items: center; gap: 8px; border: 1px solid #e6ecf3; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.mm-my-item .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.mm-my-item .tm { font-size: 12px; color: #8a97a8; }
.mm-my-item .layui-btn { margin: 0; }
.mm-empty { color: #8a97a8; font-size: 13px; text-align: center; padding: 18px 0; }

.mm-help-list { font-size: 13px; line-height: 2; color: #4a5a6e; }
.mm-help-list kbd { background: #eef2f7; border: 1px solid #d5dde7; border-bottom-width: 2px; border-radius: 4px;
  padding: 1px 7px; font-family: Consolas, monospace; font-size: 12px; }

/* 未登录时的保存提示条 */
.mm-save-tip { display: flex; align-items: center; gap: 10px; background: #eef6ff; border: 1px solid #bcd8f7;
  border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 13px; color: #2b5f9e; }
.mm-save-tip[hidden] { display: none; }
.mm-save-tip b { color: #1a5fa8; }
.mm-save-tip .layui-btn { margin: 0; }
.mm-save-tip-close { margin-left: auto; cursor: pointer; color: #8a97a8; font-size: 14px; line-height: 1; }
.mm-save-tip-close:hover { color: #333; }

@media (max-width: 768px) {
  .mm-stage-wrap { height: 440px; }
  .mm-panel { width: calc(100% - 24px); }
  .mm-name-input { width: 150px; }
}
