/**
 * Accessibility enhancements
 */

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-accent);
  color: var(--color-bg);
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
  border-radius: 0 0 4px 0;
  transition: top 0.3s ease;
  /* Better hiding for screen readers when not focused */
  clip: rect(1px, 1px, 1px, 1px);
  overflow: hidden;
}

.skip-link:focus {
  top: 0;
  clip: auto;
  overflow: visible;
}

/* Focus indicators */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Ensure interactive elements have minimum touch target size */
button,
a,
input[type="submit"],
input[type="button"],
input[type="reset"] {
  min-height: 44px;
  min-width: 44px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .bg-accent {
    background-color: #FFD700;
  }
  
  .text-accent {
    color: #FFD700;
  }
  
  .border-accent {
    border-color: #FFD700;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .animate-pulse,
  .animate-fade-in {
    animation: none !important;
  }
}

/* Screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Ensure proper heading hierarchy visibility */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  margin-top: 1em;
  margin-bottom: 0.5em;
}

/* Improve form label association */
label {
  display: block;
  margin-bottom: 0.25rem;
  cursor: pointer;
}

/* Error message visibility */
.error-message,
.text-red-500 {
  font-weight: 600;
}

/* Success message visibility */
.success-message,
.text-green-500 {
  font-weight: 600;
}