/* Custom styles for CCPA Audit Readiness Kit */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Progress bar animations */
.progress-animate {
    transition: width 0.5s ease-in-out;
}

/* Score circle animation */
#score-circle {
    transition: stroke-dashoffset 1s ease-in-out;
}

/* Button hover effects */
.btn-primary {
    @apply bg-primary hover:bg-primary-dark text-white font-bold py-3 px-6 rounded-lg transition-colors duration-200;
}

.btn-secondary {
    @apply bg-gray-600 hover:bg-gray-500 text-white font-bold py-3 px-6 rounded-lg transition-colors duration-200;
}

/* Card hover effects */
.hover-lift {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #2d3748;
}

::-webkit-scrollbar-thumb {
    background: #5919C1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4A16A3;
}

/* Form focus states */
input:focus, textarea:focus, select:focus {
    @apply outline-none ring-2 ring-primary ring-opacity-50;
}

/* Loading spinner */
.spinner {
    border: 4px solid rgba(89, 25, 193, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border-left-color: #5919C1;
    animation: spin 1s ease infinite;
}

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

/* Question animation */
.question-slide-in {
    animation: slideInFromRight 0.3s ease-out;
}

.question-slide-out {
    animation: slideOutToLeft 0.3s ease-in;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutToLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50px);
    }
}

/* Radio button and checkbox custom styling */
.custom-radio {
    @apply w-5 h-5 text-primary border-2 border-gray-400 rounded-full;
}

.custom-radio:checked {
    @apply bg-primary border-primary;
}

.custom-checkbox {
    @apply w-5 h-5 text-primary border-2 border-gray-400 rounded;
}

.custom-checkbox:checked {
    @apply bg-primary border-primary;
}

/* Alert styles */
.alert-success {
    @apply bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded;
}

.alert-warning {
    @apply bg-yellow-100 border border-yellow-400 text-yellow-700 px-4 py-3 rounded;
}

.alert-error {
    @apply bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded;
}

.alert-info {
    @apply bg-blue-100 border border-blue-400 text-blue-700 px-4 py-3 rounded;
}

/* Score color classes */
.score-critical {
    color: #EF4444; /* red-500 */
}

.score-warning {
    color: #F59E0B; /* yellow-500 */
}

.score-good {
    color: #10B981; /* green-500 */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .text-4xl {
        font-size: 2.25rem;
    }
    
    .text-6xl {
        font-size: 3rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-gray-dark, .bg-gray-darker {
        background: white !important;
        border: 1px solid #ccc !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-primary {
        background-color: #000080 !important;
    }
    
    .text-gray-300 {
        color: #ffffff !important;
    }
    
    .border-gray-600 {
        border-color: #ffffff !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus indicators for accessibility */
.focus\:ring-primary:focus {
    --tw-ring-color: #5919C1;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #5919C1;
    color: white;
    padding: 8px;
    border-radius: 4px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -20px 0 0 -20px;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(89, 25, 193, 0.1);
    border-left-color: #5919C1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}