:root {
  --color-primary: #2563eb;
  --color-secondary: #16a34a;
  --color-accent: #dc2626;
}

/* Custom Tailwind utilities */
.btn-primary {
  @apply bg-[var(--color-primary)] text-white px-6 py-3 rounded-[1rem] font-medium hover:opacity-90 transition-colors;
}

.btn-secondary {
  @apply bg-white text-[var(--color-primary)] border border-[var(--color-primary)] px-6 py-3 rounded-[1rem] font-medium hover:bg-[var(--color-primary)] hover:text-white transition-colors;
}

.card {
  @apply bg-white border border-gray-200 rounded-[1rem] shadow-sm p-6 hover:shadow-md transition-shadow;
}

/* Form styles */
.form-input {
  @apply w-full px-4 py-3 border border-gray-300 rounded-[1rem] focus:ring-2 focus:ring-[var(--color-primary)] focus:border-[var(--color-primary)] transition-colors;
}

.form-label {
  @apply block text-sm font-medium text-gray-700 mb-2;
}

/* Animation utilities */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

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

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

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

/* Focus styles for accessibility */
.focus-visible:focus {
  @apply outline-none ring-2 ring-[var(--color-primary)] ring-offset-2;
}

/* 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;
  }
  
  p, li {
    orphans: 2;
    widows: 2;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --color-primary: #000080;
    --color-secondary: #006400;
    --color-accent: #8b0000;
  }
}

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

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

/* Mobile-specific optimizations */
@media (max-width: 768px) {
  .mobile-padding {
    @apply px-4;
  }
  
  .mobile-text {
    @apply text-base;
  }
}

/* Loading states */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Error states */
.error {
  @apply border-red-300 bg-red-50;
}

.error-text {
  @apply text-red-600;
}

/* Success states */
.success {
  @apply border-green-300 bg-green-50;
}

.success-text {
  @apply text-green-600;
}

/* Cookie banner specific styles */
#cookie-banner {
  backdrop-filter: blur(8px);
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

/* Ensure proper stacking context */
.z-cookie-banner {
  z-index: 50;
}

.z-cookie-modal {
  z-index: 60;
}
/* 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; }
