/**
 * Kezakoo Interactive Mindmap Styles
 * Full-screen immersive experience
 */

.kez-mindmap-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.kez-mindmap-canvas {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.kez-mindmap-controls {
    position: fixed;
    top: 100px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.kez-control-btn {
    width: 48px;
    height: 48px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #374151;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.kez-control-btn i {
    font-size: 18px;
    line-height: 1;
}

.kez-control-btn:hover {
    background: #4A90E2;
    border-color: #4A90E2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
    color: white;
}

.kez-control-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.kez-concept-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 420px;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.kez-concept-panel.active {
    right: 0;
}

.kez-concept-panel-header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: #fff;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.kez-concept-panel-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    flex: 1;
    padding-right: 15px;
}

.kez-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.kez-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.kez-concept-panel-content {
    padding: 25px;
    flex: 1;
}

.kez-concept-summary {
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
}

.kez-concept-summary p {
    margin: 0 0 15px 0;
}

.kez-concept-html {
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.7;
    color: #4B5563;
}

.kez-concept-html h4 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #1F2937;
    font-size: 16px;
}

.kez-concept-html p {
    margin-bottom: 12px;
}

.kez-concept-html ul,
.kez-concept-html ol {
    margin-left: 20px;
    margin-bottom: 12px;
}

.kez-concept-html li {
    margin-bottom: 8px;
}

.kez-concept-image {
    margin-bottom: 20px;
}

.kez-concept-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.kez-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.kez-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    text-align: center;
}

.kez-btn-anchor {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.kez-btn-anchor:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    color: #fff;
}

.kez-btn-link {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.kez-btn-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    color: #fff;
}

.kez-mindmap-instructions {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.kez-mindmap-instructions h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1F2937;
    font-size: 18px;
}

.kez-mindmap-instructions ul {
    margin: 0;
    padding-left: 25px;
}

.kez-mindmap-instructions li {
    margin-bottom: 10px;
    color: #4B5563;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .kez-mindmap-container {
        height: 500px;
        border-radius: 8px;
    }

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

    .kez-control-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .kez-concept-panel {
        right: auto;
        left: 0;
        bottom: -100%;
        top: auto;
        width: 100%;
        height: 85vh;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .kez-concept-panel.active {
        bottom: 0;
        right: auto;
    }

    .kez-concept-panel-header {
        padding: 18px 20px;
        border-radius: 20px 20px 0 0;
    }

    .kez-concept-panel-header h3 {
        font-size: 18px;
    }

    .kez-concept-panel-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.5);
        border-radius: 2px;
    }

    .kez-concept-panel-content {
        padding: 20px;
    }

    .kez-mindmap-instructions {
        padding: 15px;
        margin-top: 15px;
    }

    .kez-mindmap-instructions h4 {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .kez-mindmap-instructions li {
        font-size: 14px;
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .kez-mindmap-container {
        height: 420px;
    }

    .kez-control-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .kez-concept-panel {
        height: 90vh;
    }

    .kez-concept-panel-header h3 {
        font-size: 16px;
    }

    .kez-action-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kez-mindmap-canvas {
        animation: none;
    }

    .kez-concept-panel,
    .kez-control-btn,
    .kez-action-btn {
        transition: none;
    }
}

.kez-concept-panel::-webkit-scrollbar {
    width: 8px;
}

.kez-concept-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.kez-concept-panel::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.kez-concept-panel::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.arabic .kez-concept-panel {
    right: auto;
    left: -450px;
    direction: rtl;
}

.arabic .kez-concept-panel.active {
    left: 0;
    right: auto;
}

.arabic .kez-mindmap-controls {
    right: auto;
    left: 20px;
}

.arabic .kez-concept-panel-header h3 {
    padding-right: 0;
    padding-left: 15px;
}

@media (max-width: 768px) {
    .arabic .kez-concept-panel {
        left: 0;
        right: auto;
    }

    .arabic .kez-mindmap-controls {
        left: 10px;
    }
}

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

.kez-concept-panel.active .kez-concept-panel-content > * {
    animation: fadeIn 0.4s ease forwards;
}

.kez-concept-panel.active .kez-concept-panel-content > *:nth-child(1) {
    animation-delay: 0.1s;
}

.kez-concept-panel.active .kez-concept-panel-content > *:nth-child(2) {
    animation-delay: 0.2s;
}

.kez-concept-panel.active .kez-concept-panel-content > *:nth-child(3) {
    animation-delay: 0.3s;
}

.kez-concept-panel.active .kez-concept-panel-content > *:nth-child(4) {
    animation-delay: 0.4s;
}
