/* Question Bank Plugin Front-end Styles */

/* 1. General Quiz Container */
.question-bank-quiz {
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

ol[type="A"] {
    list-style-type: upper-alpha !important;
}

.question-bank-quiz h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

/* 2. Quiz Form Styling */
.question-bank-quiz-form {
    /* You can add form specific styles here if needed */
}

.question-bank-quiz-form ol {
    list-style-type: none;
    padding-left: 0;
}

/* 3. Individual Question Styling (CONSISTENT ACROSS QUIZ, RESULTS, REVIEW) */
.question-bank-question-box {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    background-color: #fff;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.05);
}

/* Style for the question number/title */
.question-bank-question-box strong {
    display: block;
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #555;
}

/* 4. Answer Options List (Lettered) */
.question-bank-question-box ol[type="A"] { /* Scope to question box */
    list-style-type: upper-alpha;
    padding-left: 25px;
    margin-top: 10px;
}

.question-bank-question-box ol[type="A"] li { /* Scope to question box */
    background-color: transparent;
    border: none;
    padding: 5px 0;
    box-shadow: none;
    margin-bottom: 8px;
}

.question-bank-question-box ol[type="A"] li label { /* Scope to question box */
    display: block;
    cursor: pointer;
}

.question-bank-question-box ol[type="A"] li input[type="radio"] { /* Scope to question box */
    margin-right: 8px;
    vertical-align: middle;
}

/* 5. Explanation Section (Initially Hidden) */
.question-bank-explanation {
    margin-top: 15px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f0f0f0;
    font-size: 0.95em;
}

.question-bank-explanation strong {
    font-weight: bold;
    color: #666;
}

/* 6. General Button Style */
.question-bank-button {
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 10px;
}

.question-bank-button:hover {
    background-color: #0056b3;
    color: white; /* Ensure text color is white on hover */
}

/* 7. Quiz Response Area */
.question-bank-quiz-response {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #e8f0fe; /* Light blue background for response */
}

.question-bank-quiz-response.success {
    border-color: #4CAF50; /* Green border for success */
    background-color: #e6f7e6; /* Light green background for success */
    color: #2e7d32; /* Darker green text for success */
}

.question-bank-quiz-response.error {
    border-color: #f44336; /* Red border for error */
    background-color: #ffebee; /* Light red background for error */
    color: #d32f2f; /* Darker red text for error */
}

.question-bank-quiz-response p {
    margin-top: 0;
    margin-bottom: 10px;
}

.question-bank-quiz-response h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

/* 8. Average Score Container (from View Submissions page - Admin side styling) */
.question-bank-average-score-container {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f0f0f0;
    border-left: 5px solid #4CAF50; /* Green left border */
}

.question-bank-average-score-container h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.question-bank-average-score-container p {
    margin-top: 0;
    margin-bottom: 5px;
}

/* 9. Average Grade Shortcode Output */
.question-bank-average-grade-shortcode {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px dashed #ccc; /* Dashed border to differentiate */
    border-radius: 5px;
    background-color: #fafafa;
    text-align: center;
}

.question-bank-average-grade-shortcode h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #444;
}

.question-bank-average-grade-shortcode p {
    margin-bottom: 0;
    font-size: 1.05em;
}

/* 10. User Submissions Table Container */
.question-bank-user-submissions-table {
    margin-bottom: 30px;
}

.question-bank-user-submissions-table h2 {
    margin-bottom: 20px;
    color: #333;
    text-align: left; /* Adjust as needed */
}

/* 11. User Submissions Table Styles (WordPress List Table - Admin like) */
.question-bank-user-submissions-table .wp-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.question-bank-user-submissions-table th,
.question-bank-user-submissions-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.question-bank-user-submissions-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.question-bank-user-submissions-table tbody tr:nth-child(odd) {
    background-color: #f9f9f9; /* Optional: striped rows */
}

.question-bank-user-submissions-table .delete-submission-link {
    color: #f44336; /* Red color for delete link */
    margin-left: 10px;
    text-decoration: none;
}
.question-bank-user-submissions-table .delete-submission-link:hover {
    text-decoration: underline;
}

/* 12. Error Messages */
.question-bank-error, .question-bank-p.question-bank-error { /* Style both class="error" divs and p.error elements */
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #f44336;
    background-color: #ffebee;
    color: #d32f2f;
    border-radius: 4px;
}

.question-bank-admin-quiz-form-wrapper .question-bank-form-actions {
    text-align: center; /* Or use display: flex; justify-content: center; */
}

#quiz-timer {
    position: sticky;
    /* Set top to the header's height */
    top: /* Replace with your header's height (e.g., 100px) */ 10px;
    background-color: #f0f0f0; /* Or your timer background color */
    color: #333; /* Or your timer text color */
    padding: 10px;
    text-align: center;
    z-index: 100; /* Ensure it's on top of other content */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Optional: Shadow for emphasis */
    margin-bottom: 20px; /* Space below the timer */
}

/* Modal styles */
.question-bank-quiz-modal {
    display: block; /* Show by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.question-bank-quiz-modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
}
.question-bank-quiz-modal-content h2{
    color: #000;
    font-size: 1.5em;
    margin-bottom: 1em;
}
.question-bank-quiz-modal-content p{
    color: #000;
    font-size: 1.1em;
    margin-bottom: 1em;
}

#question-bank-start-quiz-button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

#question-bank-start-quiz-button:hover {
    background-color: #45a049;
}

#question-bank-submit-quiz-button {
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

#question-bank-submit-quiz-button:hover {
    background-color: #0056b3;
}

.admin-note-message {
    background-color: #e0f7fa;
    border: 1px solid #00bcd4;
    padding: 10px;
    margin-bottom: 10px;
    font-style: italic;
}

#question-bank-quiz-warning-modal {
    display: none;
}

#question-bank-quiz-question-container {
    margin-bottom: 20px;
}

.question-bank-quiz-question {
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #ddd;
}

.question-bank-quiz-navigation {
    text-align: center;
    margin-top: 20px;
}

.question-bank-quiz-navigation button,
.question-bank-quiz-navigation input[type="submit"] {
    padding: 10px 20px;
    margin: 0 10px;
    cursor: pointer;
}

#quiz-start-container .question-bank-button,
#quiz-form-container .question-bank-button {
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 10px;
}

/* Consistent styling for the question box */
.question-bank-quiz .question-bank-question-box {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    background-color: #fff;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.05);
}

/* Style for the question number/title */
.question-bank-question-box strong {
    display: block;
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #555;
}

/* 4. Answer Options List (Lettered) */
.question-bank-question-box ol[type="A"] { /* Scope to question box */
    list-style-type: upper-alpha;
    padding-left: 25px;
    margin-top: 10px;
}

.question-bank-question-box ol[type="A"] li { /* Scope to question box */
    background-color: transparent;
    border: none;
    padding: 5px 0;
    box-shadow: none;
    margin-bottom: 8px;
}

.question-bank-question-box ol[type="A"] li label { /* Scope to question box */
    display: block;
    cursor: pointer;
}

.question-bank-question-box ol[type="A"] li input[type="radio"] { /* Scope to question box */
    margin-right: 8px;
    vertical-align: middle;
}

/* Adjust spacing for results/review */
.question-bank-quiz h3 {
    margin-top: 0;
}

.question-bank-quiz ol {
    padding-left: 20px;
}