/* Basic styling for MCQ plugin */

/* General Styling */
.mcq-page-header {
    margin: 20px 0;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.mcq-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px auto;
    max-width: 1200px;
    padding: 0 5px;
    max-width: 100%; /* Ensure elements do not exceed the screen width */
    box-sizing: border-box; /* Include padding and border in width calculations */
    overflow-wrap: break-word; /* Prevent long text from overflowing */
}

/* General Fix for Mobile Responsiveness */
.mcq-wrapper,
.mcq-box,
.mcq-question,
.mcq-options,
#mcq-explanation {
    max-width: 100%; /* Ensure elements do not exceed the screen width */
    box-sizing: border-box; /* Include padding and border in width calculations */
    overflow-wrap: break-word; /* Prevent long text from overflowing */
}

/* MCQ Box Styling */
.mcq-box {
    background: #fff;
    border: 1px solid #00000030;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    min-width: 300px; /* Ensure the container doesn't shrink too much */
    max-width: 1200px; /* Prevent the container from becoming too wide */
    min-height: 100px; /* Ensure the container has a consistent height */
    overflow-wrap: break-word; /* Prevent long words from overflowing */
}

/* Question Text */
.mcq-question-text {
    font-size: 18px;
    font-weight: 500;
line-height: 1.5; /* Improve readability */
    text-align: left;
    overflow-wrap: break-word; /* Ensure long text wraps */
    word-break: break-word; /* Break long words if necessary */
}

.mcq-question {
    max-width: 100%; /* Ensure elements do not exceed the screen width */
    box-sizing: border-box; /* Include padding and border in width calculations */
    overflow-wrap: break-word; /* Prevent long text from overflowing */
}

/* MCQ Options List */
.mcq-options {
    list-style: none; /* Remove default list styling */
    padding: 0;
    margin: 20px 0;
}

.mcq-options li {
    margin-bottom: 10px; /* Add spacing between options */
}

/* MCQ Option Buttons */
.mcq-option {
    display: flex; /* Use flexbox for alignment */
    align-items: center; /* Vertically align items */
    width: 100%; /* Take full width of the parent */
    box-sizing: border-box; /* Include padding and border in the element's total width */
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 12px;
    color: #000;
    cursor: pointer;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    gap: 10px; /* Space between letter and text */
}

.mcq-option .option-letter {
    flex-shrink: 0; /* Prevent the letter from shrinking */
}

.mcq-option .option-text {
    flex-grow: 1; /* Allow text to take up available space */
    word-wrap: break-word; /* Wrap long words */
    word-break: break-word; /* Break words if necessary */
    min-width: 0; /* Allow flex item to shrink and wrap */
}

/* Correct Answer Styling */
.mcq-option.correct {
    background-color: #dfffe7;
    border-color: #00871f;
    color: #00871f;
}

/* Correct Answer Label */
.mcq-option.correct::after {
    content: "🎉 Correct Answer";
    font-size: 14px;
    color: #155724;
    font-weight: bold;
    white-space: nowrap;
    margin-left: auto;
    padding-left: 10px;
}

/* Wrong Answer Styling */
.mcq-option.wrong {
    background-color: #ffecee;
    border-color: #db0014;
    color: #db0014;
}

/* Wrong Answer Label */
.mcq-option.wrong::after {
    content: "🤔 Your Answer";
    font-size: 14px;
    color: #721c24;
    font-weight: bold;
    white-space: nowrap;
    margin-left: auto;
    padding-left: 10px;
}

/* Explanation Box */
#mcq-explanation {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-left: 1px solid #aaa;
    border-radius: 8px;
    font-style: italic;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 100%; /* Ensure it fits within the screen */
    overflow-wrap: break-word; /* Prevent long text from overflowing */
}

/* Mobile Responsiveness */
@media (max-width: 768px) { /* Mobile screens */
    .mcq-wrapper {
        flex-direction: column; /* Stack content vertically */
        padding: 5px; /* Reduce padding */
    }

    .mcq-box {
        padding: 10px; /* Reduce padding inside boxes */
        margin-bottom: 15px; /* Reduce spacing between boxes */
    }

    .mcq-question {
        font-size: 14px; /* Smaller font size for questions */
        word-wrap: break-word; /* Prevent long text from overflowing */
    }

    .mcq-option {
        font-size: 14px; /* Smaller font size for options */
        padding: 8px 10px; /* Adjust padding for smaller screens */
    }

    .mcq-option.correct::after,
    .mcq-option.wrong::after {
        font-size: 12px; /* Smaller font size for labels */
    }

    #mcq-explanation {
        font-size: 12px; /* Smaller font size for explanation */
        padding: 10px; /* Adjust padding for smaller screens */
    }
}

@media (max-width: 1024px) { /* Tablet and smaller screens */
    .mcq-wrapper {
        flex-direction: column; /* Stack content vertically */
        padding: 10px; /* Reduce padding */
    }

    .mcq-box {
        margin-bottom: 20px; /* Reduce spacing between boxes */
        padding: 15px; /* Reduce padding inside boxes */
    }

    .mcq-question {
        font-size: 16px; /* Slightly smaller font size for questions */
    }

    .mcq-options li {
        margin-bottom: 8px; /* Reduce spacing between options */
    }

    .mcq-option {
        font-size: 14px; /* Smaller font size for options */
        padding: 8px 15px; /* Adjust padding for smaller screens */
    }

    #mcq-explanation {
        font-size: 14px; /* Adjust font size for explanation */
        padding: 12px; /* Adjust padding for explanation */
    }
}

.mcq-taxonomies {
    margin-top: 20px;
    border-top: 1px solid #ddd;
    padding-top: 10px;
    font-size: 0.9rem;
    color: #555;
}

.mcq-taxonomy-item {
    margin-bottom: 5px;
}

.taxonomy-label {
    font-weight: bold;
    margin-right: 5px;
}


.mcq-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Taxonomy Card Section */
.taxonomy-card-section {
    margin-bottom: 40px;
}


.taxonomy-card-section h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8em;
    color: #333;
}

.taxonomy-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.taxonomy-card {
    display: block;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.taxonomy-card:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}

.taxonomy-card h4 {
    margin-top: 0;
    color: #0073aa;
    font-size: 1.4em;
}

.taxonomy-card p {
    font-size: 0.9em;
    color: #666;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .taxonomy-card-grid {
        grid-template-columns: 1fr;
    }
}
/* MCQ Explanation Box (Visually separated, matches overall design) */
.mcq-explanation-box {
    margin-top: 30px;
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f3faff;
    border-left: 4px solid #0073aa;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease-in-out;
    max-width: 100%;
    overflow-wrap: break-word;
    border: 1px solid #e1f0ff;
}

.mcq-explanation-box h3 {
    margin-top: 0;
    font-size: 18px;
    font-weight: 600;
    color: #0073aa;
}

.mcq-explanation-box .explanation-content {
    margin-top: 10px;
    font-size: 15px;
    color: #333;
    line-height: 1.6;
}