/**
 * MCQ List and Quiz Styles for ExamHub Theme
 */

/* MCQ List Layout - Single Column */
.mcq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    max-width: 100%;
}

.mcqs-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.mcq-list-item,
.mcq-item-wrapper {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e1e5e9;
    margin-bottom: 1rem;
    width: 100%;
    max-width: none;
}

.mcq-list-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.mcq-list-item.premium-locked {
    border-color: #f093fb;
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.05) 0%, rgba(245, 87, 108, 0.05) 100%);
}

/* MCQ List Header */
.mcq-list-header,
.mcq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
}

.mcq-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.mcq-number {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.mcq-difficulty {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.mcq-difficulty.difficulty-easy {
    background: #d4edda;
    color: #155724;
}

.mcq-difficulty.difficulty-medium {
    background: #fff3cd;
    color: #856404;
}

.mcq-difficulty.difficulty-hard {
    background: #f8d7da;
    color: #721c24;
}

.mcq-subject,
.mcq-topic {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.mcq-actions-header {
    display: flex;
    gap: 0.5rem;
}

/* MCQ Content - Enhanced for Single Column */
.mcq-content {
    padding: 1rem;
}

.mcq-list-container,
.mcq-archive-content {
    width: 100%;
    max-width: none;
}

.mcq-question {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: #1a1a1a;
}

.mcq-question h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.mcq-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.mcq-description p {
    margin-bottom: 1rem;
}

.mcq-description p:last-child {
    margin-bottom: 0;
}

/* MCQ Quiz Section */
.mcq-quiz-section {
    padding: 0 1rem 1rem;
}

.mcq-options {
    margin-bottom: 1rem;
}

.mcq-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

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

.mcq-option:hover {
    border-color: #007cba;
    background: #f8f9fa;
}

.mcq-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.mcq-option input[type="radio"]:checked + .option-marker {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.option-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    font-weight: 600;
    color: #666;
    background: white;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.option-text {
    flex: 1;
    font-size: 1rem;
    line-height: 1.4;
}

.option-status {
    margin-left: auto;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
}

.option-status.correct {
    background: #28a745;
    color: white;
}

.option-status.wrong {
    background: #dc3545;
    color: white;
}

/* MCQ Option States */
.mcq-option.correct-answer {
    border-color: #28a745;
    background: #d4edda;
}

.mcq-option.correct-answer .option-marker {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.mcq-option.wrong-answer {
    border-color: #dc3545;
    background: #f8d7da;
}

.mcq-option.wrong-answer .option-marker {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

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

.mcq-option input[type="radio"]:disabled {
    cursor: not-allowed;
}

/* MCQ Actions */
.mcq-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

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

/* MCQ Result */
.mcq-result {
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.mcq-result.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.mcq-result.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.result-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.result-icon {
    font-size: 1.5rem;
}

.mcq-result.success .result-icon {
    color: #28a745;
}

.mcq-result.error .result-icon {
    color: #dc3545;
}

.result-text {
    font-weight: 600;
    font-size: 1.1rem;
}

.mcq-result.success .result-text {
    color: #155724;
}

.mcq-result.error .result-text {
    color: #721c24;
}

.mcq-explanation {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 1rem;
    margin-top: 1rem;
}

.mcq-explanation h4 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.mcq-explanation p {
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.mcq-explanation p:last-child {
    margin-bottom: 0;
}

/* MCQ Locked State */
.mcq-locked {
    padding: 1.5rem;
    text-align: center;
}

.locked-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.1) 0%, rgba(245, 87, 108, 0.1) 100%);
    border-radius: 12px;
    border: 2px dashed #f093fb;
}

.locked-content i {
    font-size: 3rem;
    color: #f093fb;
}

.locked-content h4 {
    margin-bottom: 0.5rem;
    color: #721c24;
}

.locked-content p {
    color: #666;
    margin-bottom: 1rem;
    max-width: 400px;
}

/* MCQ Error State */
.mcq-error {
    padding: 1.5rem;
    text-align: center;
    color: #666;
}

.mcq-error p {
    margin: 0;
}

/* Premium Badge */
.premium-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Removed Load More Button - Using Pagination Only */

/* MCQ Pagination */
.mcq-pagination {
    margin: 2rem 0;
}

.mcq-pagination .pagination {
    justify-content: center;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.notification-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.notification-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.notification-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.notification-message {
    flex: 1;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mcq-list-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .mcq-meta {
        order: 2;
    }

    .mcq-actions-header {
        order: 1;
        align-self: flex-end;
    }

    .mcq-content {
        padding: 1rem;
    }

    .mcq-quiz-section {
        padding: 0 1rem 1rem;
    }

    .mcq-option {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .option-marker {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .mcq-actions {
        flex-direction: column;
    }

    .mcq-result {
        padding: 1rem;
    }

    .locked-content {
        padding: 1.5rem;
    }

    .locked-content i {
        font-size: 2rem;
    }

    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }

    .notification.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .mcq-list,
    .mcqs-container {
        gap: 1rem;
    }

    .mcq-list-item,
    .mcq-item-wrapper {
        border-radius: 8px;
        margin: 0 0 1rem 0;
    }

    .mcq-question {
        font-size: 1.1rem;
    }

    .mcq-meta {
        gap: 0.5rem;
    }

    .mcq-number,
    .mcq-subject,
    .mcq-topic {
        font-size: 0.8rem;
    }

    .mcq-option {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .option-marker {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }

    .option-text {
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    .mcq-actions,
    .mcq-actions-header,
    .notification {
        display: none !important;
    }

    .mcq-list-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .mcq-option {
        border-color: #ccc;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .mcq-list-item {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .mcq-list-header {
        background: #1a202c;
        border-color: #4a5568;
    }

    .mcq-question {
        color: #f7fafc;
    }

    .mcq-option {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .mcq-option:hover {
        border-color: #63b3ed;
        background: #2a4365;
    }

    .option-marker {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .mcq-result.success {
        background: #276749;
        border-color: #38a169;
        color: #f0fff4;
    }

    .mcq-result.error {
        background: #742a2a;
        border-color: #e53e3e;
        color: #fed7d7;
    }
}
.single-mcq-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.mcq-single-header {
    margin-bottom: 25px;
}

.mcq-breadcrumb .back-link {
    display: inline-flex;
    align-items: center;
    color: #4a6bdf;
    text-decoration: none;
    margin-bottom: 15px;
}

.mcq-breadcrumb .back-link i {
    margin-right: 8px;
}

.mcq-meta-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.mcq-meta-details span {
    display: inline-flex;
    align-items: center;
    background: #f5f7fa;
    padding: 5px 10px;
    border-radius: 20px;
}

.mcq-meta-details i {
    margin-right: 5px;
    font-size: 12px;
}

.mcq-title {
    font-size: 22px;
    margin-bottom: 15px;
    color: #2d3748;
}

.mcq-description {
    margin-bottom: 25px;
    line-height: 1.6;
    color: #4a5568;
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 25px 0;
}

.mcq-single-option {
    position: relative;
}

.mcq-radio-input {
    position: absolute;
    opacity: 0;
}

.mcq-option-label {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.mcq-radio-input:checked + .mcq-option-label {
    border-color: #4a6bdf;
    background-color: #f8faff;
}

.mcq-option-label:hover {
    border-color: #c3dafe;
}

.option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #e2e8f0;
    border-radius: 50%;
    margin-right: 15px;
    font-weight: bold;
    flex-shrink: 0;
}

.mcq-radio-input:checked + .mcq-option-label .option-letter {
    background: #4a6bdf;
    color: white;
}

.option-content-wrapper {
    flex-grow: 1;
    padding-right: 15px;
}

.option-result-icon {
    width: 20px;
    height: 20px;
    opacity: 0;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

/* Feedback Section */
.mcq-feedback-section {
    margin-top: 30px;
    padding: 20px;
    border-radius: 8px;
    background: #f8f9fa;
}

.result-feedback {
    margin-bottom: 15px;
}

.feedback-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.feedback-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.feedback-icon.correct {
    background: #48bb78;
    color: white;
}

.feedback-icon.incorrect {
    background: #f56565;
    color: white;
}

.feedback-text {
    font-size: 18px;
    font-weight: 600;
}

.feedback-text.correct {
    color: #48bb78;
}

.feedback-text.incorrect {
    color: #f56565;
}

.feedback-detail {
    color: #4a5568;
    margin-left: 34px;
}

/* Explanation */
.mcq-explanation-toggle {
    margin: 15px 0;
}

.explanation-toggle-btn {
    display: inline-flex;
    align-items: center;
    color: #4a6bdf;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

.explanation-toggle-btn i {
    margin-right: 8px;
    transition: transform 0.2s;
}

.explanation-toggle-btn[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.mcq-detailed-explanation {
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    border-left: 4px solid #4a6bdf;
    margin-top: 10px;
}

.explanation-content {
    line-height: 1.6;
    color: #4a5568;
}

/* Controls */
.mcq-controls {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* Button styles moved to buttons.css */

/* Difficulty Colors */
.difficulty-easy {
    color: #38a169;
    background-color: #ebf8f2;
}

.difficulty-medium {
    color: #d69e2e;
    background-color: #fffaf0;
}

.difficulty-hard {
    color: #e53e3e;
    background-color: #fff5f5;
}

/* Responsive Design for MCQ Lists */
@media (max-width: 768px) {
    .mcq-list {
        gap: 0.75rem;
    }
    
    .mcq-list-item,
    .mcq-item-wrapper {
        margin-bottom: 0.75rem;
        border-radius: 6px;
    }
    
    .mcq-content {
        padding: 0.75rem;
    }
    
    .mcq-question {
        font-size: 1rem;
    }
    
    .mcq-options {
        gap: 0.4rem;
    }
    
    .mcq-option {
        padding: 0.6rem;
        gap: 0.6rem;
    }
}

@media (max-width: 480px) {
    .mcq-list {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .mcq-list-item,
    .mcq-item-wrapper {
        margin-bottom: 0.5rem;
        padding: 0.5rem;
    }
    
    .mcq-content {
        padding: 0.5rem;
    }
    
    .mcq-question {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .mcq-description {
        margin-bottom: 0.75rem;
    }
    
    .mcq-option {
        padding: 0.5rem;
        gap: 0.5rem;
        margin-bottom: 0.4rem;
    }
    
    .option-marker {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
    
    .option-text {
        font-size: 0.9rem;
    }
}

/* Single MCQ responsive */
@media (min-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr 1fr;
    }
}