/* Mobile Lesson Exam Iframe Fixes */
/* Force mobile iframe improvements with !important */

@media (max-width: 768px) {
    .exam-iframe {
        min-height: 400px !important;
        max-height: calc(100vh - 200px) !important;
        height: auto !important;
        overflow-y: auto !important;
        width: 100% !important;
        border: none !important;
        background: white !important;
        display: block !important;
    }
    
    .exam-container {
        border-radius: 8px !important;
        overflow: hidden !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
        margin-bottom: 1rem !important;
        position: relative !important;
        background: white !important;
        display: block !important;
    }
    
    .exam-actions {
        position: sticky !important;
        bottom: 0 !important;
        z-index: 1000 !important;
        background: white !important;
        border-top: 2px solid #e9ecef !important;
        padding: 1rem !important;
        margin-top: 0 !important;
        text-align: center !important;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.15) !important;
    }
    
    .restart-exam {
        width: 100% !important;
        padding: 1rem 1.5rem !important;
        font-size: 1.1rem !important;
        min-height: 48px !important;
        border-radius: 6px !important;
        background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
        border: none !important;
        color: white !important;
        font-weight: 500 !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }
    
    .restart-exam:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3) !important;
        background: linear-gradient(135deg, #2563eb, #1e40af) !important;
        color: white !important;
    }
    
    .exam-card {
        margin-bottom: 1rem !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    }
    
    /* Show exam content with modal implementation */
    .exam-card,
    .exam-container,
    .exam-actions {
        display: block !important;
    }
    
    /* Additional mobile optimizations */
    .lesson-exams {
        padding: 1rem !important;
    }
    
    .exam-header h4 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .exam-info {
        margin-top: 0.5rem !important;
    }
    
    .question-count,
    .view-count {
        font-size: 0.9rem !important;
    }
}