/* Custom styles for Qyventroxa */

:root {
    --color-primary: #0F172A;
    --color-secondary: #2563EB;
    --color-accent: #dc2626;
}

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

/* Custom focus styles */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Accordion animations */
.accordion-content {
    transition: max-height 0.3s ease-in-out;
    overflow: hidden;
}

.accordion-button[aria-expanded="true"] .lucide {
    transform: rotate(180deg);
}

/* Form validation styles */
.form-error {
    border-color: var(--color-accent) !important;
}

.form-success {
    border-color: #10b981 !important;
}

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

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

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

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

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

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #000000;
        --color-secondary: #0000ff;
        --color-accent: #ff0000;
    }
}

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

/* Mobile optimizations */
@media (max-width: 768px) {
    /* Improve touch targets */
    button,
    a,
    input,
    textarea,
    select {
        min-height: 44px;
    }
    
    /* Better spacing for mobile */
    .mobile-spacing {
        padding: 1rem;
    }
}

/* Cookie banner specific styles */
#cookie-banner {
    backdrop-filter: blur(8px);
}

#cookie-modal {
    backdrop-filter: blur(4px);
}

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

/* Custom button hover effects */
.btn-primary {
    background-color: var(--color-primary);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

/* Image lazy loading support */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

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

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

/* Form field enhancements */
.form-field {
    position: relative;
}

.form-field.has-error .form-input {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-field.has-success .form-input {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

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

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

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Text selection styling */
::selection {
    background-color: var(--color-secondary);
    color: white;
}

::-moz-selection {
    background-color: var(--color-secondary);
    color: white;
}
/* 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; }
