.ws-mindmap-pro {
    --mindmap-scale: 1;
    position: relative;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    margin: 28px 0 28px calc((100% - 100vw) / 2 + 12px);
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fbff;
    overflow: hidden;
    color: #172033;
    outline: none;
}

.ws-mindmap-pro.is-readonly .ws-mindmap-toolbar {
    display: none;
}

.ws-mindmap-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px;
    border-bottom: 1px solid #dbeafe;
    background: rgba(248, 251, 255, .92);
    backdrop-filter: blur(10px);
}

.ws-mindmap-toolbar button {
    height: 30px;
    padding: 0 10px;
    border: 1px solid #c7d2fe;
    border-radius: 7px;
    background: #fff;
    color: #1e3a8a;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.ws-mindmap-toolbar label,
.ws-mindmap-toolbar select {
    height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    border: 1px solid #c7d2fe;
    border-radius: 7px;
    background: #fff;
    color: #1e3a8a;
    font-size: 13px;
    font-weight: 700;
}

.ws-mindmap-toolbar input[type="range"] {
    width: 110px;
}

.ws-mindmap-toolbar input[type="color"] {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.ws-mindmap-toolbar button:hover {
    background: #eff6ff;
}

.ws-mindmap-stage {
    position: relative;
    min-height: 520px;
    overflow: auto;
    cursor: grab;
}

.ws-mindmap-stage:active {
    cursor: grabbing;
}

.ws-mindmap-pro.no-grid .ws-mindmap-canvas {
    background-image: none !important;
}

.ws-mindmap-canvas {
    position: relative;
    width: 2400px;
    height: 1200px;
    transform: scale(var(--mindmap-scale));
    transform-origin: 0 0;
    background-image:
        linear-gradient(rgba(147, 197, 253, .18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(147, 197, 253, .18) 1px, transparent 1px);
    background-size: 28px 28px;
}

.ws-mindmap-lines {
    position: absolute;
    inset: 0;
    width: 2400px;
    height: 1200px;
    pointer-events: none;
    overflow: visible;
}

.ws-mindmap-node {
    position: absolute;
    z-index: 2;
    min-width: 28px;
    max-width: 420px;
    padding: 6px 8px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    line-height: 1.55;
    font-weight: 700;
    overflow: hidden;
    cursor: default;
}

.ws-mindmap-pro.is-style-business .ws-mindmap-node {
    border-width: 1px;
}

.ws-mindmap-pro.is-style-art .ws-mindmap-node {
    border-width: 2px;
    box-shadow: 0 12px 30px rgba(168, 85, 247, .14);
}

.ws-mindmap-pro.is-style-fun .ws-mindmap-node {
    border-width: 3px;
    box-shadow: 0 12px 26px rgba(249, 115, 22, .16);
}

.ws-mindmap-node[data-shape="rect"] {
    border-radius: 2px;
}

.ws-mindmap-node[data-shape="round"] {
    border-radius: 10px;
}

.ws-mindmap-node[data-shape="pill"] {
    border-radius: 999px;
}

.ws-mindmap-node[data-shape="soft"] {
    border-radius: 18px;
}

.ws-mindmap-node.is-root {
    min-width: 28px;
    max-width: 420px;
    padding: 8px 10px;
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
    font-size: 20px;
    text-align: center;
}

.ws-mindmap-pro.is-editing .ws-mindmap-node.is-selected {
    outline: 3px solid rgba(37, 99, 235, .28);
}

.ws-mindmap-pro.is-editing .ws-mindmap-node.is-reparent-target {
    outline: 3px solid rgba(22, 163, 74, .45);
    box-shadow: 0 0 0 6px rgba(22, 163, 74, .12), 0 10px 24px rgba(15, 23, 42, .08);
}

.ws-mindmap-drag {
    display: none !important;
}

.ws-mindmap-resize,
.ws-mindmap-img-resize,
.ws-mindmap-text-resize {
    position: absolute;
    z-index: 4;
    display: none;
    width: 10px;
    height: 10px;
    border: 2px solid #2563eb;
    border-radius: 999px;
    background: #fff;
}

.ws-mindmap-pro.is-editing .ws-mindmap-node.is-selected .ws-mindmap-resize,
.ws-mindmap-pro.is-editing .ws-mindmap-node.is-selected .ws-mindmap-img-resize,
.ws-mindmap-pro.is-editing .ws-mindmap-free-image.is-selected .ws-mindmap-img-resize,
.ws-mindmap-pro.is-editing .ws-mindmap-free-text.is-selected .ws-mindmap-text-resize,
.ws-mindmap-pro.is-editing .ws-mindmap-free-video.is-selected .ws-mindmap-video-resize {
    display: block;
}

.ws-mindmap-video-resize {
    position: absolute;
    z-index: 4;
    display: none;
    width: 10px;
    height: 10px;
    border: 2px solid #7c3aed;
    border-radius: 999px;
    background: #fff;
}

.ws-mindmap-resize.nw,
.ws-mindmap-img-resize.nw,
.ws-mindmap-text-resize.nw,
.ws-mindmap-video-resize.nw {
    left: -7px;
    top: -7px;
    cursor: nwse-resize;
}

.ws-mindmap-resize.ne,
.ws-mindmap-img-resize.ne,
.ws-mindmap-text-resize.ne,
.ws-mindmap-video-resize.ne {
    right: -7px;
    top: -7px;
    cursor: nesw-resize;
}

.ws-mindmap-resize.sw,
.ws-mindmap-img-resize.sw,
.ws-mindmap-text-resize.sw,
.ws-mindmap-video-resize.sw {
    left: -7px;
    bottom: -7px;
    cursor: nesw-resize;
}

.ws-mindmap-resize.se,
.ws-mindmap-img-resize.se,
.ws-mindmap-text-resize.se,
.ws-mindmap-video-resize.se {
    right: -7px;
    bottom: -7px;
    cursor: nwse-resize;
}

.ws-mindmap-img-resize {
    border-color: #16a34a;
}

.ws-mindmap-pro.is-editing .ws-mindmap-node {
    cursor: move;
}

.ws-mindmap-text {
    outline: none;
    overflow: hidden;
    cursor: text;
}

.ws-mindmap-img-wrap {
    position: relative;
    display: block;
    width: max-content;
    max-width: none;
    margin: 8px auto 0;
}

.ws-mindmap-img-wrap a,
.ws-mindmap-free-image a {
    display: block;
}

.ws-mindmap-free-image a {
    width: 100%;
}

.ws-mindmap-node-img {
    display: block;
    max-width: none;
    max-height: 180px;
    border-radius: 8px;
    object-fit: contain;
    height: auto;
    cursor: pointer;
    user-select: none;
}

.ws-mindmap-node.is-folded-hidden {
    display: none !important;
}

.ws-mindmap-free-image {
    position: absolute;
    z-index: 3;
    width: 180px;
    line-height: 0;
    cursor: move;
    user-select: none;
}

.ws-mindmap-free-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    pointer-events: none;
}

.ws-mindmap-pro.is-editing .ws-mindmap-free-image.is-selected {
    outline: 3px solid rgba(22, 163, 74, .28);
}

.ws-mindmap-free-text {
    position: absolute;
    z-index: 3;
    min-width: 20px;
    max-width: none;
    min-height: 18px;
    padding: 4px 8px 4px 34px;
    color: #111827;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.35;
    cursor: text;
    outline: none;
    white-space: pre-wrap;
    box-sizing: border-box;
    overflow: hidden;
}

.ws-mindmap-free-widget {
    padding: 8px 10px 8px 38px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(37,99,235,.18);
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(15,23,42,.10);
    overflow: auto;
}

.ws-mindmap-pro:not(.is-editing) .ws-mindmap-free-widget {
    padding: 0;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.ws-mindmap-free-widget .table-wrap,
.ws-mindmap-free-widget .ws-mindmap-table-wrap {
    margin: 0;
    overflow: auto;
}

.ws-mindmap-free-widget .editor-table,
.ws-mindmap-free-widget .ws-mindmap-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 14px;
    font-weight: 400;
}

.ws-mindmap-free-widget .editor-table td,
.ws-mindmap-free-widget .editor-table th,
.ws-mindmap-free-widget .ws-mindmap-table td,
.ws-mindmap-free-widget .ws-mindmap-table th {
    border: 1px solid #94a3b8;
    min-width: 64px;
    min-height: 30px;
    padding: 6px 8px;
    font-weight: 400;
    vertical-align: top;
    color: #111827;
    background: rgba(255,255,255,.35);
    outline: none;
    white-space: normal;
    word-break: break-word;
}

.ws-mindmap-free-widget .fold-text {
    margin: 0;
    font-weight: 400;
    overflow: visible;
}

.ws-mindmap-free-widget .fold-content {
    min-height: 96px;
    overflow: visible;
}

.ws-mindmap-free-widget[data-widget-type="fold"] {
    overflow: visible;
}


.ws-mindmap-free-drag,
.ws-mindmap-free-text-drag {
    display: none;
    position: absolute;
    left: 6px;
    top: 50%;
    width: 22px;
    height: 22px;
    transform: translateY(-50%);
    border-radius: 6px;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    cursor: move;
    user-select: none;
    z-index: 12;
    pointer-events: auto;
    box-shadow: 0 4px 12px rgba(37,99,235,.28);
}

.ws-mindmap-free-text-drag {
    top: 50%;
}

.ws-mindmap-pro.is-editing .ws-mindmap-free-text .ws-mindmap-free-text-drag {
    display: block;
}

.ws-mindmap-pro.is-editing .ws-mindmap-free-text.is-selected {
    outline: 3px solid rgba(37, 99, 235, .24);
}

.ws-mindmap-free-video {
    position: absolute;
    z-index: 3;
    width: 360px;
    min-height: 200px;
    cursor: move;
    background: #000;
}

.ws-mindmap-free-video video,
.ws-mindmap-free-video iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.ws-mindmap-free-video .video-media-box {
    width: 100%;
    height: 100%;
}

.ws-mindmap-free-video .v-click-shield {
    z-index: 2;
}

.ws-mindmap-pro.is-editing .ws-mindmap-free-video.is-selected {
    outline: 3px solid rgba(37, 99, 235, .28);
}

.ws-mindmap-free-shape {
    position: absolute;
    z-index: 3;
    width: 150px;
    height: 110px;
    cursor: move;
    user-select: none;
    border: 0;
    box-sizing: border-box;
}

.ws-mindmap-free-shape[data-shape="circle"] {
    border-radius: 999px;
}

.ws-mindmap-free-shape[data-shape="diamond"] {
    transform: rotate(45deg);
}

.ws-mindmap-free-shape[data-shape="triangle"] {
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.ws-mindmap-pro.is-editing .ws-mindmap-free-shape.is-selected {
    outline: 3px solid rgba(37, 99, 235, .28);
}

.ws-mindmap-free-image.is-locked,
.ws-mindmap-free-text.is-locked,
.ws-mindmap-free-video.is-locked,
.ws-mindmap-free-shape.is-locked {
    cursor: not-allowed;
}

.ws-mindmap-pro.is-editing .ws-mindmap-free-image.is-locked.is-selected,
.ws-mindmap-pro.is-editing .ws-mindmap-free-text.is-locked.is-selected,
.ws-mindmap-pro.is-editing .ws-mindmap-free-video.is-locked.is-selected,
.ws-mindmap-pro.is-editing .ws-mindmap-free-shape.is-locked.is-selected {
    outline-color: rgba(239, 68, 68, .34);
}

.ws-mindmap-node.is-root .ws-mindmap-drag {
    background: rgba(255, 255, 255, .22);
}

@media (max-width: 768px) {
    .ws-mindmap-stage {
        min-height: 460px;
    }

    .ws-mindmap-toolbar {
        gap: 6px;
    }

    .ws-mindmap-toolbar button {
        height: 30px;
        padding: 0 8px;
        font-size: 12px;
    }
}
