/* Scoped Mind Map Styles */

/* Wrapper for the embedded component */
.mindmap-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    /* Fills the parent container defined in HTML */
    overflow: hidden;
    background-color: #f6f7f8;
    /* var(--bg-light) hardcoded for safety */
    font-family: 'Montserrat', sans-serif;
    /* Match Main Site Font */
    border-radius: 0.75rem;
    /* rounded-xl */
}

/* Header/Nav styles removed - not needed for embedded version */

/* Main Viewport */
.viewport {
    position: absolute;
    inset: 0;
    /* Fills the parent completely */
    overflow: hidden;
    /* The key to infinite canvas */
    background-color: #f6f7f8;
    cursor: grab;
    touch-action: none;
}

.viewport:active {
    cursor: grabbing;
}

/* The Infinite World (Transformed) */
.world {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    transform-origin: 0 0;
}

/* Grid Background */
.grid-bg {
    position: absolute;
    top: -50000px;
    left: -50000px;
    width: 100000px;
    height: 100000px;
    background-size: 40px 40px;
    background-image: radial-gradient(circle, #cbd5e1 1px, transparent 1px);
    pointer-events: none;
    z-index: 0;
    /* Lower z-index */
}

/* SVG Layer */
.mindmap-svg-layer {
    position: absolute;
    top: 0;
    left: 0;
    overflow: visible;
    pointer-events: none;
    z-index: 1;
}

/* Content Layer */
.mindmap-content {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    pointer-events: none;
}

/* Node Styling */
.mm-node {
    position: absolute;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
    /* Boosted for visibility safety */
    cursor: default;
    transition: all 0.3s ease-out;
    user-select: none;
    -webkit-user-select: none;
    opacity: 1;
    /* Explicit Default */
}

/* The Main Text Pill */
.node-pill {
    background-color: #dbeafe;
    padding: 12px 24px;
    border-radius: 30px;
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    text-align: left;
    width: auto;
    min-width: 180px;
    white-space: nowrap;
    border: 1px solid #e2e8f0;
    border-left-width: 5px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.node-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    background-color: #eff6ff;
    border-color: #003399;
    /* var(--primary) hardcoded */
}

/* Root Node Style Overrides */
.mm-node.root .node-pill {
    font-size: 16px;
    font-weight: 800;
    background: linear-gradient(135deg, #003399 0%, #002266 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 8px 25px rgba(0, 51, 153, 0.25);
    min-width: 300px;
    white-space: nowrap;
}

/* Color Dot Icon */
.node-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 12px;
    display: inline-block;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* The Toggle Circle Button */
.node-toggle {
    width: 32px;
    height: 32px;
    background-color: #dbeafe;
    border: 1px solid #bfdbfe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1e293b;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
    flex-shrink: 0;
}

.node-toggle:hover {
    background-color: #003399;
    color: white;
    transform: scale(1.1);
}

.node-toggle.hidden {
    display: none;
}

.connector-path {
    fill: none;
    stroke: #cbd5e1;
    stroke-width: 2px;
    transition: stroke 0.3s ease;
}

/* Controls */
.controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 100;
}

.control-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn:hover {
    background: #f8fafc;
    color: #003399;
}