/* Mindmap Styles */

.mindmap-tab-content {
    min-height: 500px;
    position: relative;
}

/* Mindmap Wrapper */
.mindmap-wrapper {
    position: relative;
    width: 100%;
    height: 600px;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#mindmap-svg {
    width: 100%;
    height: 100%;
    cursor: grab;
}

#mindmap-svg:active {
    cursor: grabbing;
}

/* Mindmap Controls */
.mindmap-controls {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

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

.mindmap-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.mindmap-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mindmap-btn svg {
    color: #4b5563;
}

/* Loading State */
.mindmap-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    gap: 16px;
}

.mindmap-loading .loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.mindmap-loading p {
    margin: 0;
    color: #6b7280;
    font-size: 16px;
    font-weight: 500;
}

.mindmap-loading .loading-subtext {
    font-size: 14px;
    color: #9ca3af;
    font-weight: 400;
}

/* Error State */
.mindmap-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    gap: 16px;
    padding: 32px;
    text-align: center;
}

.mindmap-error svg {
    color: #ef4444;
    margin-bottom: 8px;
}

.mindmap-error h3 {
    margin: 0;
    color: #1f2937;
    font-size: 20px;
    font-weight: 600;
}

.mindmap-error p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    max-width: 400px;
}

.mindmap-error .retry-btn {
    margin-top: 16px;
    padding: 10px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mindmap-error .retry-btn:hover {
    background: #2563eb;
}

/* Markmap Node Styles Override */
.markmap-node {
    cursor: pointer;
}

.markmap-node-circle {
    transition: all 0.2s ease;
}

.markmap-node:hover .markmap-node-circle {
    stroke-width: 3;
    filter: brightness(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mindmap-wrapper {
        height: 500px;
    }

    .mindmap-controls {
        top: 8px;
        right: 8px;
        gap: 6px;
    }

    .mindmap-btn {
        width: 36px;
        height: 36px;
    }

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

    .mindmap-loading {
        min-height: 400px;
    }

    .mindmap-error {
        min-height: 400px;
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .mindmap-wrapper {
        height: 400px;
    }

    .mindmap-loading,
    .mindmap-error {
        min-height: 300px;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .mindmap-wrapper {
        background: linear-gradient(to bottom, #1f2937, #111827);
        border-color: #374151;
    }

    .mindmap-btn {
        background: #374151;
        border-color: #4b5563;
    }

    .mindmap-btn:hover {
        background: #4b5563;
        border-color: #6b7280;
    }

    .mindmap-btn svg {
        color: #d1d5db;
    }

    .mindmap-loading .loading-spinner {
        border-color: #374151;
        border-top-color: #60a5fa;
    }

    .mindmap-error h3 {
        color: #f9fafb;
    }

    .mindmap-error p {
        color: #9ca3af;
    }
}
