/* Custom styles for RapidIridium */

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Custom focus styles */
*:focus {
    outline: none;
}

/* Button focus styles */
button:focus,
.btn:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

/* Link focus styles */
a:focus {
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
    border-radius: 0.125rem;
}

/* Form input focus styles */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Smooth transitions for interactive elements */
a, button, input, textarea, select {
    transition: all 0.2s ease-in-out;
}

/* Custom styles for mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease-in-out;
}

/* Loading animation for forms */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Success message styling */
.success-message {
    background-color: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 12px 16px;
    border-radius: 0.25rem;
    margin-bottom: 16px;
}

/* Error message styling */
.error-message {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 0.25rem;
    margin-bottom: 16px;
}

/* Custom styles for cookie banner animations */
#cookie-banner {
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

#cookie-banner:not(.hidden) {
    transform: translateY(0);
}

/* Modal backdrop animation */
#cookie-modal {
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease-in-out;
}

/* Responsive image handling */
img {
    max-width: 100%;
    height: auto;
}

/* Print styles */
@media print {
    .no-print,
    nav,
    footer,
    #cookie-banner,
    #cookie-modal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: underline;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #000000;
        --color-secondary: #000000;
    }
    
    .border-gray-200 {
        border-color: #000000;
    }
    
    .text-gray-600 {
        color: #000000;
    }
}

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

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here if needed */
}

/* Custom utility classes */
.text-balance {
    text-wrap: balance;
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hover effects for cards */
.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Custom checkbox and radio button styles */
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--color-primary);
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--color-primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 0.25rem;
    z-index: 1000;
}

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

/* Table responsive wrapper */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Form validation styles */
.field-error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.field-success {
    border-color: #10b981;
    background-color: #f0fdf4;
}

/* Loading spinner */
.spinner {
    border: 2px solid #f3f4f6;
    border-top: 2px solid var(--color-primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Custom prose styles for legal pages */
.prose h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose p {
    margin-bottom: 1rem;
}

.prose ul {
    margin-bottom: 1rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

/* Responsive typography adjustments */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .text-lg {
        font-size: 1rem;
    }
}
/* Cookie banner visibility — independent of Tailwind */
#cookie-banner.hidden, #cookie-consent-banner.hidden { display: none !important; }
#cookie-banner:not(.hidden), #cookie-consent-banner:not(.hidden) { display: block !important; }
#cookie-modal.hidden { display: none !important; }
