/* Accessibility Features */

/* Font Options */
body.font-opendyslexic {
  font-family: 'OpenDyslexic', sans-serif !important;
}

body.font-size-125 {
  font-size: 125% !important;
}

body.font-size-150 {
  font-size: 150% !important;
}

/* Color Themes */
body.theme-high-contrast {
  background: #000 !important;
  color: #fff !important;
}

body.theme-high-contrast .hero,
body.theme-high-contrast .course-container,
body.theme-high-contrast .quiz-container {
  background: #000 !important;
  color: #fff !important;
}

body.theme-high-contrast .cta-button {
  border: 3px solid #fff !important;
  font-weight: bold !important;
}

body.theme-high-contrast .lesson-section,
body.theme-high-contrast .question-card {
  background: #1a1a1a !important;
  color: #fff !important;
  border: 2px solid #fff !important;
}

/* Colorblind - Deuteranopia (red-green) */
body.theme-colorblind-deuteranopia .cta-primary,
body.theme-colorblind-deuteranopia .highlight {
  background: #0066cc !important;
  color: #fff !important;
}

body.theme-colorblind-deuteranopia .success-box {
  background: #0066cc !important;
  border-color: #004499 !important;
}

body.theme-colorblind-deuteranopia .warning-box {
  background: #ff9500 !important;
  border-color: #cc7700 !important;
}

/* Colorblind - Protanopia (red-green) */
body.theme-colorblind-protanopia .cta-primary,
body.theme-colorblind-protanopia .highlight {
  background: #0099cc !important;
  color: #fff !important;
}

body.theme-colorblind-protanopia .success-box {
  background: #0099cc !important;
  border-color: #006699 !important;
}

body.theme-colorblind-protanopia .warning-box {
  background: #ffaa00 !important;
  border-color: #dd8800 !important;
}

/* Accessibility Toolbar */
.accessibility-toolbar {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  padding: 1rem;
  z-index: 10000;
  max-width: 300px;
}

.accessibility-toolbar.collapsed {
  width: auto;
  padding: 0.5rem;
}

.accessibility-toolbar h3 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  color: #1e3c72;
}

.accessibility-toolbar button {
  display: block;
  width: 100%;
  margin: 0.5rem 0;
  padding: 0.6rem;
  border: 1px solid #d0d0d0;
  background: #f5f5f5;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.accessibility-toolbar button:hover {
  background: #e0e0e0;
}

.accessibility-toolbar button.active {
  background: #2a5298;
  color: white;
  border-color: #1e3c72;
}

.accessibility-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #2a5298;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 10001;
  transition: all 0.3s;
}

.accessibility-toggle:hover {
  background: #1e3c72;
  transform: scale(1.1);
}

/* Skip to main content link */
.skip-to-main {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 1rem;
  background: #2a5298;
  color: white;
  text-decoration: none;
}

.skip-to-main:focus {
  left: 50%;
  transform: translateX(-50%);
  top: 10px;
}

/* Focus indicators */
button:focus,
a:focus,
input:focus,
select:focus {
  outline: 3px solid #2a5298;
  outline-offset: 2px;
}

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

/* OpenDyslexic font import */
@import url('https://cdn.jsdelivr.net/npm/open-dyslexic@1.0.3/open-dyslexic-regular.min.css');

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

