/* 마인드맵 버튼 스타일 - 팟캐스트, PDF, 복사 버튼과 동일한 스타일 */
.mindmap-button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mindmap-button:hover:not(:disabled) {
    color: var(--accent-primary);
}

.mindmap-button:active:not(:disabled) {
    transform: scale(0.95);
}

.mindmap-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.2);
}

.mindmap-button svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* 마인드맵 모달 스타일 */
.mindmap-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.mindmap-modal-content {
    position: relative;
    background-color: #ffffff;
    margin: 2% auto;
    padding: 0;
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

.mindmap-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.mindmap-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
    font-weight: 600;
}

.mindmap-modal-close {
    color: #999;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.mindmap-modal-close:hover {
    color: #333;
    background-color: rgba(0, 0, 0, 0.1);
}

.mindmap-modal-body {
    flex: 1;
    padding: 20px;
    overflow: auto;
    position: relative;
}

/* 로딩 스타일 */
.mindmap-loading {
    display: none;
    text-align: center;
    padding: 50px;
}

.mindmap-loading .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.mindmap-loading p {
    color: #666;
    font-size: 16px;
    margin-top: 20px;
}

/* 에러 스타일 */
.mindmap-error {
    display: none;
    text-align: center;
    padding: 50px;
}

.mindmap-error .error-message {
    color: #e74c3c;
    font-size: 16px;
    padding: 20px;
    background-color: #ffe6e6;
    border-radius: 8px;
    display: inline-block;
}

/* iframe 컨테이너 */
.mindmap-iframe-container {
    width: 100%;
    height: 100%;
    min-height: 500px;
}

.mindmap-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

/* 반응형 디자인 */
@media screen and (max-width: 768px) {
    .mindmap-modal-content {
        width: 95%;
        height: 90vh;
        margin: 5% auto;
    }
    
    .mindmap-modal-header {
        padding: 15px 20px;
    }
    
    .mindmap-modal-header h2 {
        font-size: 20px;
    }
    
    .mindmap-modal-body {
        padding: 15px;
    }
    
    .mindmap-iframe-container {
        min-height: 400px;
    }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .mindmap-modal-content {
        background-color: #1e1e1e;
        color: #ffffff;
    }
    
    .mindmap-modal-header {
        background-color: #2a2a2a;
        border-bottom-color: #444;
    }
    
    .mindmap-modal-header h2 {
        color: #ffffff;
    }
    
    .mindmap-modal-close {
        color: #999;
    }
    
    .mindmap-modal-close:hover {
        color: #ffffff;
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .mindmap-loading p {
        color: #ccc;
    }
    
    .mindmap-error .error-message {
        background-color: #4a1f1f;
        color: #ff9999;
    }
}
