/* Add this to your theme's style.css or a custom CSS file */

/* Default font for the entire page */
body,
p, h1, h2, h3, h4, h5, h6, li, label, input, select, button {
    font-family: 'Noto Sans Bengali', sans-serif !important;
}

/* Apply Noto Sans Bengali specifically to MCQ questions and options */
.cns-mcq-question-practice p,
.cns-mcq-question-practice li label {
    font-family: 'Noto Sans Bengali', sans-serif !important;
}

/* Other specific elements */
.cns-mcq-practice-main-container,
.cns-selector-container,
.cns-mcq-feedback,
.cns-mcq-timer-display,
.cns-mcq-summary,
.cns-incorrect-answers-list { /* Added for consistency */
    font-family: 'Noto Sans Bengali', sans-serif !important;
}

.cns-mcq-practice-main-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.cns-mcq-practice-main-container h2 {
    color: #333;
    margin-top: 0;
    text-align: center; /* Ensure consistent centering */
}

.cns-selector-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.cns-selector-container label {
    font-weight: bold;
    color: #555;
}

.cns-selector-container select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
    font-size: 1em;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s ease;
}

.cns-selector-container select:focus {
    border-color: #007bff;
}

.cns-mcq-progress-container {
    width: 90%;
    background-color: #e0e0e0;
    border-radius: 10px;
    margin: 20px auto;
    height: 30px;
    overflow: hidden; /* Ensures the inner bar stays within bounds */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

#cns-mcq-progress-bar {
    height: 100%;
    background: linear-gradient(to right, #4CAF50, #8bc34a); /* Gradient for a modern look */
    border-radius: 10px;
    text-align: center;
    line-height: 30px;
    color: white;
    font-weight: bold;
    font-size: 0.9em;
    transition: width 0.5s ease-in-out; /* Smooth transition for progress */
}

.cns-mcq-timer-display {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.3em;
    color: #333;
    font-weight: bold;
}

.cns-mcq-question-practice {
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    background-color: #fcfcfc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.cns-mcq-question-practice strong {
    color: #0056b3;
    font-size: 1.1em;
    display: block;
    margin-bottom: 15px;
}

/* Styles for the MCQ options list */
.cns-mcq-options {
    list-style: none;
    padding: 0;
    margin: 0; /* Changed from 20px 0 to 0 for consistency */
}

.cns-mcq-options li {
    margin-bottom: 10px;
}

.cns-mcq-options label {
    display: flex; /* Use flexbox to align the circle and text */
    align-items: center; /* Vertically center the items */
    cursor: pointer;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px; /* Slightly rounded corners for the option box */
    transition: background-color 0.2s, border-color 0.2s;
    background-color: #f9f9f9; /* Light background for options */
}

/* Hide the default radio input */
.cns-mcq-options input[type="radio"] {
    display: none;
}

/* Style for the circular option label (A, B, C, D) */
.cns-option-circle {
    display: flex; /* Use flexbox to center the letter inside the circle */
    justify-content: center;
    align-items: center;
    width: 30px; /* Size of the circle */
    height: 30px; /* Size of the circle */
    border: 2px solid #007bff; /* Blue border for the circle */
    border-radius: 50%; /* Makes it a perfect circle */
    margin-right: 15px; /* Space between the circle and the option text */
    font-weight: bold;
    color: #007bff; /* Blue color for the letter */
    background-color: #fff; /* White background for the circle */
    flex-shrink: 0; /* Prevents the circle from shrinking */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Subtle shadow */
    transition: all 0.2s ease-in-out;
}

/* Style for the option text */
.cns-option-text {
    flex-grow: 1; /* Allows the text to take up available space */
    color: #333; /* Darker text color */
}

/* Styles for when a radio button is checked */
.cns-mcq-options input[type="radio"]:checked + .cns-option-circle {
    background-color: #007bff; /* Blue background when checked */
    color: #fff; /* White letter when checked */
    border-color: #0056b3; /* Darker blue border when checked */
}

/* Styles for when the entire label is hovered */
.cns-mcq-options label:hover {
    background-color: #e2f0ff; /* Lighter blue on hover */
    border-color: #007bff;
}

/* Styles for when a radio button is checked (to indicate selected state on the parent label) */
.cns-mcq-options input[type="radio"]:checked + .cns-option-circle + .cns-option-text {
    color: #0056b3; /* Darker blue for text when checked */
    font-weight: 600; /* Slightly bolder text when checked */
}

/* Styles for disabled options after submission */
.cns-mcq-options input[type="radio"]:disabled + .cns-option-circle {
    opacity: 0.7; /* Dim the circles */
    cursor: not-allowed;
    background-color: #f1f1f1;
    color: #777;
    border-color: #ccc;
}

.cns-mcq-options input[type="radio"]:disabled + .cns-option-circle + .cns-option-text {
    opacity: 0.7; /* Dim the text */
    cursor: not-allowed;
    color: #777;
}

.cns-mcq-feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid; /* Will be set by JS for specific color */
    background-color: #e9f5ff; /* Default light blue background */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Added for consistent look */
}

.cns-mcq-feedback p {
    margin: 5px 0;
    line-height: 1.5;
}

.cns-mcq-feedback p:last-child {
    margin-bottom: 0;
}

/* Specific styles for correct/incorrect feedback - using direct style matches as per JS */
.cns-mcq-feedback[style*="border-color: rgb(40, 167, 69)"] { /* Correct answer border (green) */
    border-color: #28a745 !important;
    background-color: #e6ffee !important;
}

.cns-mcq-feedback[style*="border-color: rgb(220, 53, 69)"] { /* Incorrect answer border (red) */
    border-color: #dc3545 !important;
    background-color: #ffe6e6 !important;
}

/* General button styling */
.button { /* Added to ensure button styles are applied */
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin-right: 10px;
    transition: background-color 0.2s, border-color 0.2s;
}

.cns-submit-practice-answer,
.cns-next-question-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cns-submit-practice-answer {
    background-color: #28a745;
    color: white;
}

.cns-submit-practice-answer:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

.cns-next-question-btn {
    background-color: #007bff;
    color: white;
    margin-left: 10px;
}

.cns-next-question-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.cns-mcq-summary {
    margin-top: 30px;
    padding: 25px;
    border: 1px solid #b3e0ff;
    border-radius: 10px;
    background-color: #e6f7ff;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.1);
}

.cns-mcq-summary h3 {
    color: #0056b3;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.cns-mcq-summary p {
    margin: 10px 0;
    font-size: 1.1em;
    color: #333;
}

.cns-mcq-summary p strong {
    color: #007bff;
}

.cns-mcq-summary p.correct {
    color: #28a745;
}

.cns-mcq-summary p.incorrect {
    color: #dc3545;
}

/* Incorrect answers list in summary */
.cns-incorrect-answers-list {
    margin-top: 30px;
    border-top: 1px dashed #ccc;
    padding-top: 20px;
}

.cns-incorrect-answers-list h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #dc3545;
}

.cns-incorrect-item {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #dc3545; /* Red border for incorrect items */
    border-radius: 8px;
    background-color: #ffebe6; /* Light red background */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.cns-incorrect-item p strong {
    color: #333;
}

.cns-incorrect-feedback p {
    margin-top: 5px;
    margin-bottom: 5px;
    line-height: 1.5;
}

.cns-incorrect-feedback p:last-child {
    margin-bottom: 0;
}

.cns-unanswered-highlight {
    border: 2px solid #dc3545; /* Red border for highlight */
    padding: 10px;
    margin-bottom: 15px;
    background-color: #ffeaea; /* Light red background */
    border-radius: 5px;
}
