/* Mind Map Generator Styles */

.mindmap-item {
    /* Container for mind map creation items */
    position: relative;
}

/* Preview Container */
.mindmap-preview-container {
    position: relative;
    width: 100%;
    min-height: 300px;
    background: #0d1117;
    border-radius: 8px;
    overflow: hidden;
}

.mindmap-item.single-view .mindmap-preview-container {
    min-height: 500px;
    height: 70vh;
    max-height: 800px;
}

.mindmap-canvas {
    width: 100%;
    height: 100%;
    position: relative;
}

.mindmap-canvas svg {
    display: block;
    width: 100%;
    height: 100%;
}

.mindmap-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #6afcff;
}

.mindmap-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(106, 252, 255, 0.3);
    border-top: 3px solid #6afcff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.mindmap-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ef4444;
    font-size: 1.1em;
}

.no-mindmap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    color: #6b7280;
}

.no-mindmap span {
    font-size: 3em;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* Controls */
.mindmap-controls {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(13, 17, 23, 0.9);
    border-radius: 8px;
    border: 1px solid rgba(106, 252, 255, 0.2);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.mindmap-control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    min-width: 36px;
    height: 36px;
    background: rgba(106, 252, 255, 0.1);
    border: 1px solid rgba(106, 252, 255, 0.2);
    border-radius: 6px;
    color: #6afcff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75em;
    font-weight: 600;
}

.mindmap-control-btn:hover {
    background: rgba(106, 252, 255, 0.2);
    border-color: rgba(106, 252, 255, 0.4);
}

.mindmap-control-btn svg {
    width: 18px;
    height: 18px;
}

.mindmap-control-separator {
    width: 1px;
    background: rgba(106, 252, 255, 0.2);
    margin: 4px 4px;
}

/* Node styles */
.mindmap-node {
    /* Cursor changes to pointer on interactive maps */
    cursor: default;
}

.mindmap-node .node-bg {
    transition: filter 0.2s ease, stroke 0.2s ease, stroke-width 0.2s ease;
}

/* Hover effect using stroke highlight instead of scale to avoid bouncing */
.mindmap-node:hover .node-bg {
    filter: brightness(1.2);
    stroke: rgba(255, 255, 255, 0.6);
    stroke-width: 2px;
}

/* Title and Description */
.mindmap-item .mindmap-title {
    margin: 16px 15px 8px;
    font-size: 1.25em;
    font-weight: 600;
    color: #e6edf3;
    line-height: 1.3;
}

.mindmap-item .mindmap-description {
    margin: 0 15px 12px;
    font-size: 0.95em;
    color: #8b949e;
    line-height: 1.5;
}

.mindmap-item.browse-view .mindmap-title {
    font-size: 1.1em;
    margin: 12px 15px 6px;
}

.mindmap-item.browse-view .mindmap-description {
    font-size: 0.9em;
    margin: 0 15px 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Creation Info */
.mindmap-item .creation-prompt {
    padding: 12px 15px;
    font-size: 0.95em;
    color: #c8d4e0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.mindmap-item .creation-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 15px;
    font-size: 0.85em;
}

/* Theme color dots in dropdown */
.theme-preview {
    display: inline-flex;
    gap: 3px;
    margin-left: 8px;
}

.theme-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* Output Area */
.mindmap-output-container {
    margin-top: 20px;
    border: 1px solid rgba(106, 252, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    background: #0d1117;
}

.mindmap-output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(106, 252, 255, 0.05);
    border-bottom: 1px solid rgba(106, 252, 255, 0.1);
}

.mindmap-output-header h3 {
    margin: 0;
    font-size: 1em;
    color: #6afcff;
}

.mindmap-output-body {
    position: relative;
    min-height: 400px;
    height: 60vh;
    max-height: 600px;
}

/* Generator Output */
#output .mindmap-output-container {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fullscreen mode */
.mindmap-canvas:fullscreen {
    background: #0d1117;
}

.mindmap-canvas:fullscreen svg {
    width: 100vw;
    height: 100vh;
}

/* Browse view */
.mindmap-item.browse-view .mindmap-preview-container {
    min-height: 250px;
    max-height: 300px;
}

/* Responsive */
@media (max-width: 768px) {
    .mindmap-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        padding: 6px 10px;
    }
    
    .mindmap-control-btn {
        padding: 6px;
        min-width: 32px;
        height: 32px;
        font-size: 0.7em;
    }
    
    .mindmap-item.single-view .mindmap-preview-container {
        min-height: 350px;
        height: 50vh;
    }
}

