/* File: css/components/exams.css */

/* =========================================
   1. DASHBOARD & CARDS
   ========================================= */
.exam-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.exam-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.stat-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.card-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
}

/* =========================================
   2. EXAM RUNNER (FOCUS MODE)
   ========================================= */
/* When this class is added to body, hide all navigation */
body.exam-mode-active #sidebar-wrapper,
body.exam-mode-active .navbar,
body.exam-mode-active .sidebar-heading {
    display: none !important;
}

body.exam-mode-active #page-content-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 0 !important;
    height: 100vh;
}

body.exam-mode-active #wrapper {
    padding-left: 0 !important;
}

/* Timer Animation */
.timer-badge {
    min-width: 120px;
    justify-content: center;
}

@keyframes blink-red {
    0% { color: #dc3545; opacity: 1; }
    50% { color: #dc3545; opacity: 0.5; }
    100% { color: #dc3545; opacity: 1; }
}

.timer-badge .text-danger.blink {
    animation: blink-red 1s infinite;
}

/* Question Navigation Grid */
.pagination-btn {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* =========================================
   3. GRADING & RESULTS
   ========================================= */
/* Answer Inputs */
.answer-input:checked + div {
    font-weight: bold;
}

/* Custom Scrollbar for Sidebar Lists */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* =========================================
   4. PRINT MEDIA QUERIES (For Results)
   ========================================= */
@media print {
    /* Hide everything strictly not needed */
    #sidebar-wrapper, 
    .navbar, 
    .btn, 
    .no-print,
    .card-header button,
    .alert-info,
    .alert-warning {
        display: none !important;
    }

    /* Reset layout constraints */
    #wrapper.toggled #page-content-wrapper,
    #page-content-wrapper {
        position: relative;
        width: 100%;
        margin-left: 0;
        padding: 0;
    }

    /* Ensure Cards look like documents */
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    
    .table {
        width: 100% !important;
        border-collapse: collapse;
    }
    
    /* Force background colors (browsers often strip them) */
    .bg-light {
        background-color: #f8f9fa !important;
        -webkit-print-color-adjust: exact;
    }
    
    .badge {
        border: 1px solid #000;
        color: #000 !important;
    }

    /* Page Breaks */
    tr { page-break-inside: avoid; }
}

   /* 5. STANDALONE BLINK UTILITY
   Used by: exam-monitor.view.js violation indicators
   ========================================= */
.blink {
    animation: blink-red 1s infinite;
}
 
/* Ensure the scoped rule inside .timer-badge still works for the timer */
.timer-badge .text-danger.blink {
    animation: blink-red 1s infinite;
}
