/* NCERT MCQ Quiz Stylesheet
 * For use in WordPress theme
 * Add this file to: wp-content/themes/twentynineteen_bootstrap/assets/css/ncert-mcq-quiz.css
 * Then enqueue it in functions.php
 */

/* Base Styles */
.mcq-quiz-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.mcq-quiz-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mcq-quiz-header {
    border-bottom: 3px solid #2c3e50;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.mcq-quiz-header h1 {
    color: #2c3e50;
    font-size: 2em;
    margin-bottom: 15px;
}

.mcq-intro-text {
    margin-bottom: 20px;
    color: #555;
    line-height: 1.6;
    font-size: 1.05em;
}

.mcq-intro-text p {
    margin: 0;
    padding: 0;
}

.mcq-meta-info {
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Question Block */
.mcq-question-block {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    transition: box-shadow 0.3s;
}

.mcq-question-block:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.mcq-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.mcq-question-number {
    font-weight: bold;
    color: #3498db;
    font-size: 1.1em;
}

.mcq-question-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mcq-marks-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

/* Global Timer */
.mcq-global-timer-container {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.mcq-timer-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #fff;
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 10px 15px;
}

.mcq-timer-icon {
    font-size: 1.3em;
}

.mcq-global-timer-display {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.5em;
    color: #2c3e50;
    min-width: 70px;
}

.mcq-global-timer-display.warning {
    color: #dc3545;
    animation: mcq-pulse 1s infinite;
}

.mcq-global-timer-display.expired {
    color: #dc3545;
}

.mcq-timer-label {
    color: #7f8c8d;
    font-size: 0.9em;
}

.mcq-total-marks-info {
    color: #2c3e50;
    font-size: 1.1em;
}

/* Question Text and Options */
.mcq-question-text {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 500;
}

.mcq-options-container {
    margin-bottom: 15px;
}

.mcq-option {
    margin-bottom: 10px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.mcq-option:hover {
    background-color: #f8f9fa;
    border-color: #3498db;
}

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

.mcq-option-label {
    cursor: pointer;
    user-select: none;
}

.mcq-option.selected {
    background-color: #e3f2fd;
    border-color: #2196f3;
}

.mcq-option.correct {
    background-color: #c8e6c9;
    border-color: #4caf50;
}

.mcq-option.incorrect {
    background-color: #ffcdd2;
    border-color: #f44336;
}

/* Answer Reveal */
.mcq-answer-reveal {
    margin-top: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #4caf50;
}

.mcq-correct-answer {
    font-size: 1.05em;
}

.mcq-answer-letter {
    display: inline-block;
    background-color: #4caf50;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: bold;
    margin: 0 5px;
}

.mcq-answer-text-container {
    margin-top: 10px;
    color: #2c3e50;
}

.mcq-answer-content {
    font-size: 1.05em;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    line-height: 1.4;
    word-spacing: 0.1em;
}

/* Hint Section */
.mcq-hint-section {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.mcq-hint-title {
    font-weight: bold;
    font-size: 1.2em;
    color: #667eea;
    margin-bottom: 15px;
    text-align: center;
}

.mcq-hint-content {
    font-family: 'Kalam', 'Comic Sans MS', 'Brush Script MT', cursive;
    text-align: center;
    line-height: 1.5;
    word-spacing: 0.30em;
    letter-spacing: 0.02em;
}

.mcq-hint-step {
    margin: 8px 0;
    padding: 6px 12px;
    font-size: 1.1em;
    color: #2c3e50;
    line-height: 1.4;
    word-spacing: 0.30em;
}

.mcq-hint-step:first-child {
    margin-top: 0;
}

.mcq-hint-step:last-child {
    margin-bottom: 0;
}

/* Submit Section */
.mcq-submit-section {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
}

.mcq-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.mcq-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.mcq-submit-btn:active {
    transform: translateY(0);
}

.mcq-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Results */
.mcq-results-container {
    margin-top: 30px;
}

.mcq-results-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.mcq-results-card h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.mcq-score-display {
    margin-bottom: 20px;
}

.mcq-score-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.mcq-score-item.total-score {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 15px;
}

.mcq-score-label {
    font-weight: 500;
}

.mcq-score-value {
    font-weight: bold;
}

.mcq-score-value.correct {
    color: #28a745;
}

.mcq-score-value.wrong {
    color: #dc3545;
}

.mcq-total-score .mcq-score-value {
    color: white;
}

.mcq-show-answers-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}

.mcq-show-answers-btn:hover {
    background-color: #2980b9;
}

/* MathJax Styling */
.mcq-quiz-container .MathJax {
    font-size: 1.1em !important;
    margin: 0 3px !important;
    vertical-align: middle;
}

.mcq-hint-content .MathJax {
    display: inline-block;
    margin: 0 4px !important;
    vertical-align: middle;
}

.mcq-hint-step .MathJax {
    margin: 0 3px !important;
}

/* Breadcrumb */
.mcq-breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9em;
    color: #7f8c8d;
}

.mcq-breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.mcq-breadcrumb a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes mcq-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive */
@media (max-width: 768px) {
    .mcq-quiz-container {
        padding: 15px;
    }
    
    .mcq-quiz-header h1 {
        font-size: 1.5em;
    }
    
    .mcq-global-timer-container {
        flex-direction: column;
        text-align: center;
    }
}

