/**
 * EXPORT PUBLIC CSS
 * Locație: /Modules/QuizSystem/ExportPublic/assets/export.css
 */

/* Animații */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Checkbox Custom Styling */
.question-checkbox:checked + div {
    background-color: #EEF2FF;
}

/* Scrollbar Styling */
.overflow-y-auto::-webkit-scrollbar {
    width: 8px;
}

.overflow-y-auto::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 4px;
}

.overflow-y-auto::-webkit-scrollbar-thumb {
    background: #9CA3AF;
    border-radius: 4px;
}

.overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: #6B7280;
}

/* Radio Button Styling */
input[type="radio"]:checked + div {
    border-color: #4F46E5 !important;
    background-color: #EEF2FF;
}

/* Button Loading State */
.button-loading {
    position: relative;
    pointer-events: none;
}

.button-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* ================================================================
 * FIX PENTRU SCROLL ȘI STICKY HEADER
 * ================================================================ */

/* Fix pentru sticky header - limitează înălțimea */
#selection-sticky {
    position: sticky;
    top: 0;
    z-index: 10;
    max-height: 100px; /* Limitează înălțimea pentru a nu bloca scroll-ul */
    overflow: hidden; /* Ascunde conținutul în plus dacă e necesar */
}

/* Asigură-te că formularul de export este accesibil */
body {
    min-height: 100vh;
    padding-bottom: 100px; /* Spațiu la final pentru scroll complet */
}

/* Îmbunătățire scroll pentru lista de întrebări */
.max-h-96 {
    max-height: 24rem; /* 384px = 96 * 4px (Tailwind) */
    overflow-y: auto;
}

/* Asigură scroll smooth */
html {
    scroll-behavior: smooth;
}

/* Responsive: pe mobile, sticky header mai mic */
@media (max-width: 768px) {
    #selection-sticky {
        max-height: 80px;
        font-size: 0.875rem; /* text-sm */
    }
    
    body {
        padding-bottom: 80px;
    }
}

/* ================================================================
 * SELECTION INDICATOR - Floating Badge
 * ================================================================ */

#selection-indicator {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Pulse animation pentru atenție */
#selection-indicator::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: inherit;
    border-radius: inherit;
    z-index: -1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.02);
    }
}

/* Checkbox selected state highlight */
.question-checkbox:checked + div {
    background-color: #ECFDF5;
    border-radius: 0.375rem;
    padding: 0.25rem;
    margin: -0.25rem;
}