/**
 * Video Quiz - Popup Styles
 *
 * Styles for quiz popup modal
 */

/* Overlay */
.video-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Modal */
.video-popup-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header */
.video-popup-header {
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.video-popup-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
    font-weight: 600;
}

.video-popup-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    transition: color 0.2s;
    font-weight: 300;
}

.video-popup-close:hover {
    color: #333;
}

/* Body */
.video-popup-body {
    padding: 32px;
}

.quiz-question {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.question-text {
    font-size: 18px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Quiz Options */
.quiz-option {
    display: block;
    padding: 16px 20px;
    margin-bottom: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.quiz-option:hover {
    border-color: #3498db;
    background: #f0f8ff;
}

.quiz-option input[type="radio"] {
    margin-right: 12px;
    cursor: pointer;
}

.quiz-option span {
    font-size: 16px;
    color: #34495e;
    line-height: 1.5;
}

.quiz-option input[type="radio"]:checked+span {
    font-weight: 600;
    color: #2c3e50;
}

/* Quiz Result */
.quiz-result {
    margin-top: 24px;
    border-radius: 8px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-correct {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
    padding: 15px;
    border-radius: 15px;
}

.result-incorrect {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
    padding: 15px;
    border-radius: 15px;
}

.quiz-result h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
}

.quiz-result p {
    margin: 8px 0;
    font-size: 15px;
}

.quiz-result .explanation {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-style: italic;
}

/* Footer */
.video-popup-footer {
    padding: 20px 32px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.video-popup-submit,
.video-popup-skip,
.video-popup-continue,
.video-popup-next {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.video-popup-submit {
    background: #3498db;
    color: #fff;
}

.video-popup-continue {
    background: #27ae60;
    color: #fff;
}

.video-popup-next {
    background: #27ae60;
    color: #fff;
}

.video-popup-submit:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.video-popup-submit:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.6;
}

.video-popup-skip {
    background: #ecf0f1;
    color: #2c3e50;
}

.video-popup-skip:hover {
    background: #bdc3c7;
}

/* Prevent body scroll when popup is active */
body.video-popup-active {
    overflow: hidden;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .video-popup-modal {
        width: 95%;
        max-height: 90vh;
        border-radius: 8px;
    }

    .video-popup-header {
        padding: 16px;
        border-radius: 8px 8px 0 0;
    }

    .video-popup-header h2 {
        font-size: 18px;
    }

    .video-popup-body {
        padding: 20px;
    }

    .question-text {
        font-size: 16px;
    }

    .quiz-option {
        padding: 12px 16px;
    }

    .quiz-option span {
        font-size: 15px;
    }

    .video-popup-footer {
        flex-direction: column;
        padding: 16px;
        border-radius: 0 0 8px 8px;
    }

    .video-popup-submit,
    .video-popup-skip {
        width: 100%;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .video-popup-overlay {
        padding: 10px;
    }

    .video-popup-modal {
        width: 100%;
    }

    .question-text {
        font-size: 15px;
    }

    .quiz-option span {
        font-size: 14px;
    }
}