/* Custom styles extending Tailwind */

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

/* Body scroll lock for burger menu */
body.menu-open {
  overflow: hidden;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #4263eb;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Form input validation states */
input.error,
textarea.error {
  border-color: #e03131;
  box-shadow: 0 0 0 3px rgba(224, 49, 49, 0.1);
}

input.success,
textarea.success {
  border-color: #2f9e44;
  box-shadow: 0 0 0 3px rgba(47, 158, 68, 0.1);
}

/* Burger menu transitions */
#burger-menu {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#burger-menu.open {
  transform: translateX(0);
}

/* Cookie consent entrance animation */
#cookie-consent {
  animation: slideInRight 0.4s ease-out;
}

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

/* Image fallback for empty src */
img[src=""] {
  background: linear-gradient(135deg, #dbe4ff 0%, #bac8ff 50%, #91a7ff 100%);
  min-height: 200px;
  display: block;
}

/* Typography refinements */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* Smooth transitions for interactive elements */
a,
button {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.hover-lift:hover {
  transform: translateY(-2px);
}

/* Selection color */
::selection {
  background-color: #bac8ff;
  color: #212529;
}

/* Scrollbar styling for modern browsers */
::-webkit-scrollbar {
  width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: #adb5bd;
}

/* Print styles */
@media print {
  header,
  footer,
  #cookie-consent,
  #burger-menu {
    display: none !important;
  }

  main {
    padding: 0;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Ensure minimum tap target size on mobile */
@media (max-width: 640px) {
  a,
  button,
  input[type="submit"],
  input[type="button"] {
    min-height: 44px;
  }
}
