/* Custom styles for Product Dream Weaver Assessment Platform */

/* Scrollbar styling */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Radio button styling */
.radio-custom {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-custom + label {
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background-color: #f3f4f6;
    transition: all 0.2s ease;
    display: inline-block;
    font-weight: 500;
    user-select: none;
}

.radio-custom:hover + label {
    background-color: #e5e7eb;
}

.radio-custom:focus + label {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Flag button animation */
.flag-btn {
    transition: all 0.2s ease;
}

.flag-btn:hover {
    transform: scale(1.1);
}

.flag-btn.flag-active {
    animation: flagPulse 0.3s ease;
}

@keyframes flagPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Info button styling */
.info-btn {
    transition: all 0.2s ease;
}

.info-btn:hover {
    transform: scale(1.1);
    color: #3b82f6;
}

/* Section transitions */
.section-content {
    animation: fadeIn 0.3s ease;
}

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

/* Toast animations */
.toast-show {
    transform: translateY(0) !important;
}

/* Modal animations */
.modal-show {
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Progress bar smooth transitions */
.progress-smooth {
    transition: width 0.5s ease;
}

/* Question card hover effects */
.question-hover {
    transition: all 0.2s ease;
}

.question-hover:hover {
    transform: translateX(4px);
    border-left: 4px solid #3b82f6;
}

/* Sticky header shadow */
.sticky-shadow {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .radio-custom + label {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .question-text {
        font-size: 0.9375rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .question-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* 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;
}

/* Focus visible styling */
:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Custom tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-bottom: 0.25rem;
}

.tooltip:hover::after {
    opacity: 1;
}