﻿/* Exam Component Styles */

/* Custom scrollbar for better UX */
.exam-container::-webkit-scrollbar {
    width: 8px;
}

.exam-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.exam-container::-webkit-scrollbar-thumb {
    background: #22c55e;
    border-radius: 10px;
}

    .exam-container::-webkit-scrollbar-thumb:hover {
        background: #16a34a;
    }

/* Animation for timer warning */
@keyframes pulse-red {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.timer-warning {
    animation: pulse-red 1s ease-in-out infinite;
}

/* Smooth transitions for question navigation */
.question-transition {
    transition: all 0.3s ease-in-out;
}

/* Focus styles for accessibility */
input[type="checkbox"]:focus,
input[type="radio"]:focus,
input[type="text"]:focus,
textarea:focus {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* Custom checkbox styles */
input[type="checkbox"]:checked {
    background-color: #22c55e;
    border-color: #22c55e;
}

/* Custom radio button styles */
input[type="radio"]:checked {
    background-color: #22c55e;
    border-color: #22c55e;
}

/* Button hover effects */
button:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

button:not(:disabled):active {
    transform: translateY(0);
}

/* Disabled state */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Progress ring animation */
.progress-ring-circle {
    transition: stroke-dashoffset 0.5s ease-in-out;
}

/* Question card shadow on hover */
.question-option:hover {
    box-shadow: 0 4px 6px -1px rgba(34, 197, 94, 0.1), 0 2px 4px -1px rgba(34, 197, 94, 0.06);
}

/* Responsive text sizing */
@media (max-width: 640px) {
    .question-text {
        font-size: 0.9rem;
    }

    .question-option-text {
        font-size: 0.85rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    .print-page-break {
        page-break-after: always;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    button,
    input,
    textarea {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}
