/* Custom styles for Exam Simulator */

.question-container {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background-color: #f8f9fa;
}

.question-number {
    font-weight: bold;
    color: #0d6efd;
    font-size: 1.1rem;
}

.answer-option {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.answer-option:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.answer-option.selected {
    background-color: #cfe2ff;
    border-color: #0d6efd;
}

.answer-option.correct {
    background-color: #d1e7dd;
    border-color: #198754;
}

.answer-option.incorrect {
    background-color: #f8d7da;
    border-color: #dc3545;
}

.progress-container {
    margin-bottom: 2rem;
}

.exam-timer {
    font-size: 1.2rem;
    font-weight: bold;
    color: #dc3545;
}

.drag-item {
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    background-color: #e9ecef;
    border: 1px solid #adb5bd;
    border-radius: 0.25rem;
    cursor: move;
    user-select: none;
}

.drag-item:hover {
    background-color: #dee2e6;
}

.drop-zone {
    min-height: 3rem;
    border: 2px dashed #adb5bd;
    border-radius: 0.25rem;
    padding: 1rem;
    margin: 0.5rem 0;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
}

.drop-zone.drag-over {
    border-color: #0d6efd;
    background-color: #cfe2ff;
}

.table-question table {
    width: 100%;
    margin-bottom: 1rem;
}

.table-question th,
.table-question td {
    text-align: center;
    vertical-align: middle;
    padding: 0.75rem;
}

.btn-reveal-answer {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

.btn-reveal-answer:hover {
    background-color: #ffca2c;
    border-color: #ffc720;
    color: #000;
}

.exam-results {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 2rem;
    margin-top: 2rem;
}

.score-display {
    font-size: 2rem;
    font-weight: bold;
}

.score-pass {
    color: #198754;
}

.score-fail {
    color: #dc3545;
}

.question-review {
    border-left: 4px solid #dee2e6;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.question-review.correct {
    border-left-color: #198754;
}

.question-review.incorrect {
    border-left-color: #dc3545;
}

.navbar-brand {
    font-size: 1.5rem;
}

.jumbotron {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.jumbotron .btn {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-primary {
    background-color: #667eea;
    border-color: #667eea;
}

.btn-primary:hover {
    background-color: #5a67d8;
    border-color: #5a67d8;
}

.image-question img {
    max-width: 100%;
    height: auto;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    margin: 0.5rem 0;
}

.image-option {
    display: inline-block;
    margin: 0.5rem;
    padding: 0.5rem;
    border: 2px solid transparent;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.image-option:hover {
    border-color: #adb5bd;
}

.image-option.selected {
    border-color: #0d6efd;
    background-color: #cfe2ff;
}

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Question enabled/disabled badges */
.question-enabled-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #198754;
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
}

.question-disabled-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
}

.question-enabled-badge i,
.question-disabled-badge i {
    margin-right: 0.25rem;
}

/* Visual styling for disabled question cards */
.card.question-disabled {
    opacity: 0.7;
    background-color: #f5f5f5;
}

.card.question-disabled .card-header {
    background-color: #e9ecef;
}

/* Check answer button styling */
.btn-check-answer {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
}

.btn-check-answer:hover {
    background-color: #138496;
    border-color: #117a8b;
    color: #fff;
}

/* Table cell feedback highlighting */
table td.cell-correct {
    background-color: #d1e7dd !important;
    border-color: #badbcc !important;
}

table td.cell-incorrect {
    background-color: #f8d7da !important;
    border-color: #f5c2c7 !important;
}

table td.cell-missing {
    background-color: #fff3cd !important;
    border-color: #ffecb5 !important;
}

/* Feedback legend */
.feedback-legend {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
}

.feedback-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feedback-legend-box {
    width: 20px;
    height: 20px;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
}