/**
 * Unified Questionnaire Styles
 * Date: 14 July 2025
 * Account: DDL
 * 
 * Mobile-first responsive design with full accessibility support
 * Optimized for touch devices and screen readers
 */

/* ============================================
   CSS Variables and Base Setup
   ============================================ */
:root {
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);
    
    /* Animation Durations */
    --duration-fast: 200ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;
    --duration-slower: 800ms;
    
    /* Z-index layers */
    --z-toast: 1000;
    --z-modal: 900;
    --z-overlay: 800;
    --z-dropdown: 700;
    --z-sticky: 600;
    
    /* Touch targets */
    --touch-target-min: 48px;
    --touch-padding: 12px;
    
    /* Responsive spacing */
    --spacing-mobile: 1rem;
    --spacing-tablet: 1.5rem;
    --spacing-desktop: 2rem;
    
    /* Responsive font sizes */
    --font-size-base-mobile: 16px;
    --font-size-base-tablet: 16px;
    --font-size-base-desktop: 16px;
    
    /* Focus indicators */
    --focus-color: #005FCC;
    --focus-width: 3px;
    --focus-offset: 2px;
}

/* ============================================
   Mobile-First Base Styles
   ============================================ */

/* Ensure iOS doesn't zoom on input focus */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    select,
    textarea,
    input {
        font-size: 16px !important;
    }
}

/* Prevent double-tap zoom on iOS */
* {
    touch-action: manipulation;
}

/* Smooth scrolling with iOS momentum */
.unified-questionnaire-container {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
}

/* ============================================
   Container - Mobile First
   ============================================ */

.unified-questionnaire-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: var(--white);
    border-radius: 0;
    box-shadow: none;
    opacity: 0;
    animation: containerFadeIn var(--duration-slower) var(--transition-smooth) forwards;
    /* Prevent text size adjustment on orientation change */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Tablet styles */
@media (min-width: 768px) {
    .unified-questionnaire-container {
        max-width: 768px;
        margin: var(--spacing-tablet) auto;
        border-radius: 0.75rem;
        box-shadow: 0 4px 20px rgba(26, 27, 37, 0.08);
    }
}

/* Desktop styles */
@media (min-width: 1024px) {
    .unified-questionnaire-container {
        max-width: 900px;
        margin: var(--spacing-desktop) auto;
        border-radius: 1rem;
        box-shadow: 0 8px 40px rgba(26, 27, 37, 0.12);
    }
}

/* ============================================
   Container and Section Animations
   ============================================ */

.unified-questionnaire-container {
    opacity: 0;
    animation: containerFadeIn var(--duration-slower) var(--transition-smooth) forwards;
}

@keyframes containerFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section transitions */
.questionnaire-section {
    transition: all var(--duration-normal) var(--transition-smooth);
}

.questionnaire-section.section-entering {
    opacity: 0;
    transform: translateY(30px);
}

.questionnaire-section.section-entered {
    opacity: 1;
    transform: translateY(0);
}

.questionnaire-section.section-exiting {
    opacity: 0;
    transform: translateY(-30px);
}

/* Section completion animation */
.questionnaire-section.section-completed .section-number {
    animation: sectionComplete var(--duration-normal) var(--transition-bounce);
}

@keyframes sectionComplete {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

/* Checkmark appearance */
.questionnaire-section.section-completed .section-number::after {
    animation: checkmarkAppear var(--duration-normal) var(--transition-elastic) forwards;
}

@keyframes checkmarkAppear {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

/* ============================================
   Loading States and Skeleton Screens
   ============================================ */

/* MCQ Loading Skeleton */
.mcq-skeleton {
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: var(--off-white);
    border-radius: 0.75rem;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

@keyframes skeletonPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.skeleton-question {
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.skeleton-option {
    height: 48px;
    background: linear-gradient(90deg, #f8f8f8 25%, #f0f0f0 50%, #f8f8f8 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

@keyframes skeletonShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Form Loading Overlay */
.form-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-normal) ease;
}

.form-loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loading-spinner-container {
    text-align: center;
}

.loading-spinner-container .spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
}

.loading-text {
    font-weight: 600;
    color: var(--body-color);
    animation: loadingTextPulse 1.5s ease-in-out infinite;
}

@keyframes loadingTextPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ============================================
   Question Animations
   ============================================ */

/* Sequential fade-in for questions */
.mcq-question {
    opacity: 0;
    transform: translateY(20px);
    animation: questionFadeIn var(--duration-normal) var(--transition-smooth) forwards;
}

.mcq-question:nth-child(1) { animation-delay: 0ms; }
.mcq-question:nth-child(2) { animation-delay: 100ms; }
.mcq-question:nth-child(3) { animation-delay: 200ms; }
.mcq-question:nth-child(4) { animation-delay: 300ms; }
.mcq-question:nth-child(5) { animation-delay: 400ms; }
.mcq-question:nth-child(6) { animation-delay: 500ms; }

@keyframes questionFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Question hover effect */
.mcq-question {
    transition: all var(--duration-fast) ease;
}

.mcq-question:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 27, 37, 0.12);
}

/* Question completion pulse */
.mcq-question.completed {
    animation: questionCompletePulse var(--duration-normal) ease;
}

@keyframes questionCompletePulse {
    0% { transform: scale(1); }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 8px 32px rgba(167, 122, 205, 0.3);
    }
    100% { transform: scale(1); }
}

/* ============================================
   Button Micro-interactions
   ============================================ */

/* Enhanced button hover */
.mcq-answer-button {
    position: relative;
    overflow: hidden;
    transition: all var(--duration-fast) var(--transition-smooth);
}

.mcq-answer-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(167, 122, 205, 0.1);
    transform: translate(-50%, -50%);
    transition: width var(--duration-normal) ease, height var(--duration-normal) ease;
}

.mcq-answer-button:hover::before {
    width: 100%;
    height: 100%;
}

/* Button press animation */
.mcq-answer-button:active {
    transform: scale(0.98);
}

/* Enhanced ripple effect */
.mcq-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(167, 122, 205, 0.4);
    transform: scale(0);
    animation: enhancedRipple 0.8s ease-out;
    pointer-events: none;
}

@keyframes enhancedRipple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ============================================
   Form Field Animations
   ============================================ */

/* Input focus animations */
.unified-input {
    transition: all var(--duration-fast) ease;
    position: relative;
}

.unified-input:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(167, 122, 205, 0.15);
}

/* Floating label animation */
.form-floating {
    position: relative;
}

.form-floating label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    transition: all var(--duration-fast) ease;
    pointer-events: none;
    color: var(--slate-grey);
}

.form-floating input:focus ~ label,
.form-floating input:not(:placeholder-shown) ~ label,
.form-floating select:focus ~ label,
.form-floating select:valid ~ label {
    top: -0.5rem;
    left: 0.75rem;
    font-size: 0.8rem;
    background: white;
    padding: 0 0.25rem;
    color: var(--accent-color);
}

/* ============================================
   Error States and Animations
   ============================================ */

/* Shake animation for errors */
@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.unified-input.is-invalid {
    animation: errorShake var(--duration-normal) ease;
    border-color: var(--danger-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

/* Error message fade in */
.invalid-feedback {
    opacity: 0;
    transform: translateY(-10px);
    transition: all var(--duration-fast) ease;
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.unified-input.is-invalid ~ .invalid-feedback {
    opacity: 1;
    transform: translateY(0);
}

/* Error highlight pulse */
.field-error {
    animation: errorPulse 1s ease infinite;
}

@keyframes errorPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(220, 53, 69, 0); }
}

/* ============================================
   Success States and Animations
   ============================================ */

/* Success message animation */
.success-message {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    animation: successAppear var(--duration-slow) var(--transition-bounce) forwards;
}

@keyframes successAppear {
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Success checkmark animation */
.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    position: relative;
}

.success-checkmark {
    stroke: var(--success-color);
    stroke-width: 3;
    fill: none;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkmarkDraw var(--duration-slower) ease-out forwards;
    animation-delay: var(--duration-normal);
}

@keyframes checkmarkDraw {
    to {
        stroke-dashoffset: 0;
    }
}

/* Confetti animation */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: var(--z-modal);
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    animation: confettiFall 3s ease-out forwards;
}

.confetti:nth-child(odd) {
    background: var(--primary-color);
    width: 8px;
    height: 8px;
}

.confetti:nth-child(3n) {
    background: var(--success-color);
    width: 12px;
    height: 12px;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================
   Smooth Scroll Behavior
   ============================================ */

/* Smooth scroll for all browsers */
html {
    scroll-behavior: smooth;
}

/* Scroll indicator */
.scroll-indicator {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0);
    transition: all var(--duration-normal) ease;
    z-index: var(--z-sticky);
    box-shadow: 0 4px 12px rgba(167, 122, 205, 0.3);
}

.scroll-indicator.visible {
    opacity: 1;
    transform: scale(1);
}

.scroll-indicator:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(167, 122, 205, 0.4);
}

/* Scroll animation */
.scroll-indicator i {
    animation: scrollBounce 1.5s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* ============================================
   Progress Bar Animations
   ============================================ */

/* Enhanced progress bar */
.progress-bar {
    position: relative;
    overflow: hidden;
    background: rgba(167, 122, 205, 0.1);
}

.progress-fill {
    position: relative;
    background: linear-gradient(90deg, var(--accent-color) 0%, #9A6BC5 50%, var(--accent-color) 100%);
    background-size: 200% 100%;
    animation: progressShimmer 2s linear infinite;
    transition: width var(--duration-slow) var(--transition-smooth);
}

@keyframes progressShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Progress milestone pulse */
.progress-milestone {
    animation: milestonePulse var(--duration-normal) ease;
}

@keyframes milestonePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ============================================
   Toast Notifications
   ============================================ */

.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: var(--z-toast);
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateX(calc(100% + 2rem));
    transition: transform var(--duration-normal) var(--transition-smooth);
    pointer-events: all;
}

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

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--danger-color);
}

.toast.info {
    border-left: 4px solid var(--info-color);
}

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

.toast.success .toast-icon {
    color: var(--success-color);
}

.toast.error .toast-icon {
    color: var(--danger-color);
}

.toast.info .toast-icon {
    color: var(--info-color);
}

/* ============================================
   Section Divider Animation
   ============================================ */

.section-divider {
    position: relative;
    overflow: hidden;
}

.divider-line {
    position: relative;
    background: var(--border-color);
    height: 2px;
}

.divider-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    animation: dividerFlow 3s linear infinite;
}

@keyframes dividerFlow {
    to {
        left: 100%;
    }
}

.divider-icon {
    animation: dividerSpin 4s linear infinite;
}

@keyframes dividerSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Responsive Animations
   ============================================ */

@media (max-width: 767.98px) {
    /* Reduce motion for mobile */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }
    
    /* Adjust animations for mobile */
    .mcq-question:hover {
        transform: none;
    }
    
    .toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .toast {
        transform: translateY(-100%);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}

/* ============================================
   Accessibility Enhancements
   ============================================ */

/* Focus visible for keyboard navigation */
.mcq-answer-button:focus-visible,
.unified-input:focus-visible,
.btn:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mcq-answer-button.selected {
        outline: 3px solid currentColor;
    }
    
    .progress-fill {
        background: var(--accent-color);
    }
}

/* ============================================
   Performance Optimizations
   ============================================ */

/* Use GPU acceleration for animations */
.questionnaire-section,
.mcq-question,
.mcq-answer-button,
.toast {
    will-change: transform, opacity;
}

/* Remove will-change after animation */
.questionnaire-section.section-entered,
.mcq-question.animated {
    will-change: auto;
}

/* ============================================
   Mobile-Specific Styles
   ============================================ */

/* Questionnaire Header - Mobile */
@media (max-width: 767.98px) {
    .questionnaire-header {
        padding: var(--spacing-mobile) var(--spacing-mobile);
        text-align: left;
    }
    
    .questionnaire-header h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .questionnaire-header .lead {
        font-size: 1rem;
        line-height: 1.5;
    }
}

/* Sections - Mobile */
@media (max-width: 767.98px) {
    .questionnaire-section {
        padding: var(--spacing-mobile);
    }
    
    .section-body {
        margin-left: 0;
        margin-top: var(--spacing-mobile);
    }
    
    .section-header {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
    
    .section-number {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .section-content h2 {
        font-size: 1.25rem;
    }
    
    .section-content p {
        font-size: 0.875rem;
    }
}

/* MCQ Questions - Mobile */
@media (max-width: 767.98px) {
    .mcq-question {
        padding: var(--spacing-mobile);
        margin-bottom: var(--spacing-mobile);
    }
    
    .mcq-question-text {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: var(--spacing-mobile);
    }
    
    .mcq-question-number {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Form Fields - Mobile */
@media (max-width: 767.98px) {
    .form-label {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }
    
    .unified-input {
        min-height: var(--touch-target-min);
        padding: var(--touch-padding);
        font-size: var(--font-size-base-mobile);
    }
    
    .form-text {
        font-size: 0.75rem;
        margin-top: 0.25rem;
    }
    
    /* Full width columns on mobile */
    .col-md-6 {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
}

/* Submit Button - Mobile */
@media (max-width: 767.98px) {
    .form-actions {
        padding: var(--spacing-mobile);
        flex-direction: column;
        gap: var(--spacing-mobile);
    }
    
    .btn-submit-unified {
        width: 100%;
        min-height: var(--touch-target-min);
        font-size: 1rem;
        padding: var(--touch-padding) var(--spacing-mobile);
    }
}

/* ============================================
   Enhanced Accessibility
   ============================================ */

/* Focus styles that meet WCAG 2.1 Level AA */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: var(--focus-width) solid var(--focus-color);
    outline-offset: var(--focus-offset);
    border-radius: 4px;
}

/* Specific focus styles for different elements */
.mcq-answer-button:focus-visible {
    outline: var(--focus-width) solid var(--focus-color);
    outline-offset: var(--focus-offset);
    box-shadow: 0 0 0 4px rgba(0, 95, 204, 0.3);
}

.unified-input:focus-visible {
    border-color: var(--focus-color);
    outline: var(--focus-width) solid var(--focus-color);
    outline-offset: 0;
}

.btn:focus-visible {
    outline: var(--focus-width) solid var(--focus-color);
    outline-offset: var(--focus-offset);
    box-shadow: 0 0 0 4px rgba(0, 95, 204, 0.3);
}

/* Skip links for keyboard navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--focus-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: var(--z-modal);
}

.skip-link:focus {
    top: 0;
}

/* Screen reader only text */
.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;
}

/* Live regions for dynamic updates */
[aria-live="polite"] {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ============================================
   Touch Interaction Improvements
   ============================================ */

/* Increase touch targets */
.mcq-answer-button,
.form-check-input,
button,
a,
.btn {
    position: relative;
    min-height: var(--touch-target-min);
    min-width: var(--touch-target-min);
}

/* Touch feedback */
@media (hover: none) and (pointer: coarse) {
    .mcq-answer-button:active,
    .btn:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* Prevent touch delay */
.mcq-answer-button,
.btn,
a {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* ============================================
   iOS-Specific Fixes
   ============================================ */

/* Fix iOS form zoom */
@supports (-webkit-touch-callout: none) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="password"],
    input[type="date"],
    input[type="datetime-local"],
    input[type="month"],
    input[type="time"],
    input[type="week"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Fix iOS momentum scrolling */
.unified-questionnaire-container,
.mcq-questions-container {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
}

/* ============================================
   Android-Specific Fixes
   ============================================ */

/* Fix Android tap highlight */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (hover: none) {
    * {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }
}

/* ============================================
   Cross-Browser Compatibility
   ============================================ */

/* Firefox */
@-moz-document url-prefix() {
    .mcq-answer-button {
        /* Firefox-specific fixes if needed */
    }
}

/* Edge */
@supports (-ms-ime-align: auto) {
    .unified-input {
        /* Edge-specific fixes if needed */
    }
}

/* Safari */
@media not all and (min-resolution: .001dpcm) {
    @supports (-webkit-appearance: none) {
        .unified-input {
            /* Safari-specific fixes if needed */
        }
    }
}

/* ============================================
   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;
        scroll-behavior: auto !important;
    }
    
    /* Keep essential feedback */
    .mcq-answer-button:focus-visible,
    .unified-input:focus-visible {
        transition-duration: 0.1s !important;
    }
}

/* ============================================
   High Contrast Mode
   ============================================ */

@media (prefers-contrast: high) {
    .mcq-answer-button {
        border-width: 3px;
    }
    
    .mcq-answer-button.selected {
        outline: 3px solid currentColor;
        outline-offset: 2px;
    }
    
    .progress-fill {
        background: currentColor;
    }
    
    .unified-input {
        border-width: 3px;
    }
    
    .btn {
        border: 3px solid currentColor;
    }
}

/* ============================================
   Dark Mode Support
   ============================================ */

@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .unified-questionnaire-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .btn,
    .scroll-indicator,
    .toast-container {
        display: none !important;
    }
    
    .mcq-answer-button.selected {
        background: #000 !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
