/* MCQ Progressive Loader Styles */

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

@keyframes popupSlideIn {
    from { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.8) translateY(-20px); 
    }
    to { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1) translateY(0); 
    }
}

@keyframes celebration {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

/* Unlock Popup Styles */
.mcq-unlock-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.mcq-unlock-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: popupSlideIn 0.4s ease-out;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
}

.mcq-unlock-popup-content {
    padding: 30px;
    text-align: center;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%);
    border: 2px solid #28a745;
}

.mcq-unlock-icon {
    font-size: 48px;
    margin-bottom: 15px;
    animation: celebration 0.6s ease-in-out;
    display: inline-block;
}

.mcq-unlock-title {
    color: #155724;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.mcq-unlock-text {
    color: #155724;
    font-size: 16px;
    margin: 0 0 20px 0;
    line-height: 1.5;
    font-weight: 500;
}

.mcq-unlock-close {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    min-width: 120px;
}

.mcq-unlock-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
}

.mcq-unlock-close:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* MCQ Archive Item Attempted State */
.mcq-archive-item.attempted {
    border-color: #28a745;
    background: #f8fff9;
}

.mcq-archive-item.attempted::after {
    content: '✓ Attempted';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1;
}

.mcq-archive-item {
    position: relative;
}

/* MCQ Answer Feedback Styles */
.mcq-option-preview.correct-answer {
    background: #d4edda !important;
    border-color: #28a745 !important;
    color: #155724;
}

.mcq-option-preview.correct-answer::after {
    content: '✓ Correct';
    margin-left: auto;
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

.mcq-option-preview.selected-answer:not(.correct-answer) {
    background: #f8d7da !important;
    border-color: #dc3545 !important;
    color: #721c24;
}

.mcq-option-preview.selected-answer:not(.correct-answer)::after {
    content: '✗ Wrong';
    margin-left: auto;
    background: #dc3545;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

/* Explanation Button Styles */
.mcq-show-explanation {
    display: none;
    margin-top: 10px;
    background: #f0f8ff;
    border: 1px solid #0073aa;
    padding: 8px 16px;
    border-radius: 6px;
    color: #0073aa;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mcq-show-explanation:hover {
    background: #e1f4ff !important;
    border-color: #0056b3 !important;
    color: #0056b3 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.2);
}

.mcq-show-explanation:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 115, 170, 0.2);
}

/* Explanation Section Styles */
.mcq-explanation {
    display: none;
    margin-top: 15px;
    background: #f8fff9;
    border: 1px solid #28a745;
    border-radius: 8px;
    padding: 15px;
}

.mcq-explanation h4 {
    color: #155724;
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
}

.mcq-explanation .explanation-content {
    color: #155724;
    line-height: 1.6;
}

/* Disable pointer events on attempted options */
.mcq-archive-item.attempted .mcq-option-preview {
    pointer-events: none;
    cursor: default;
}

/* Progress Indicator Styles */
.mcq-progress-indicator {
    background: #f0f8ff;
    border: 1px solid #0073aa;
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    text-align: center;
    color: #0073aa;
    font-weight: 500;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .mcq-unlock-popup {
        margin: 20px;
        max-width: calc(100vw - 40px);
    }
    
    .mcq-unlock-popup-content {
        padding: 25px 20px;
    }
    
    .mcq-unlock-icon {
        font-size: 40px;
    }
    
    .mcq-unlock-title {
        font-size: 20px;
    }
    
    .mcq-unlock-text {
        font-size: 14px;
    }
    
    .mcq-unlock-close {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .mcq-show-explanation {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .mcq-explanation {
        padding: 12px;
    }
    
    .mcq-explanation h4 {
        font-size: 15px;
    }
    
    .mcq-archive-item.attempted::after {
        font-size: 11px;
        padding: 3px 6px;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .mcq-unlock-popup {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .mcq-unlock-popup-content {
        background: linear-gradient(135deg, #0d1a0d 0%, #1a2a1a 100%);
    }
}
