/* ===== AGGRESSIVE ACCESSIBILITY OVERRIDES ===== */

/* High Contrast Mode - Target everything */
html[data-access~="hc"],
html[data-access~="hc"] body,
html[data-access~="hc"] main,
html[data-access~="hc"] .page-wrapper,
html[data-access~="hc"] .site-header,
html[data-access~="hc"] .nav,
html[data-access~="hc"] .page-card,
html[data-access~="hc"] .content-block,
html[data-access~="hc"] .markdown-block,
html[data-access~="hc"] .card-grid,
html[data-access~="hc"] .section-wrapper,
html[data-access~="hc"] .hero-section,
html[data-access~="hc"] .site-footer,
html[data-access~="hc"] div,
html[data-access~="hc"] section,
html[data-access~="hc"] article {
  background: #000000 !important;
  background-color: #000000 !important;
  color: #ffffff !important;
}

/* High contrast text elements */
html[data-access~="hc"] h1,
html[data-access~="hc"] h2,
html[data-access~="hc"] h3,
html[data-access~="hc"] h4,
html[data-access~="hc"] h5,
html[data-access~="hc"] h6,
html[data-access~="hc"] .page-title,
html[data-access~="hc"] .section-header h1,
html[data-access~="hc"] .section-wrapper h2,
html[data-access~="hc"] .text-heading {
  color: #FFD600 !important;
  background: transparent !important;
}

html[data-access~="hc"] p,
html[data-access~="hc"] span,
html[data-access~="hc"] li,
html[data-access~="hc"] .summary,
html[data-access~="hc"] .section-description,
html[data-access~="hc"] .text-secondary {
  color: #ffffff !important;
  background: transparent !important;
}

/* High contrast buttons and links */
html[data-access~="hc"] a,
html[data-access~="hc"] .nav-menu li a,
html[data-access~="hc"] .cta-btn,
html[data-access~="hc"] .page-card a,
html[data-access~="hc"] button,
html[data-access~="hc"] .toggle-dark-mode {
  background: #FFD600 !important;
  color: #000000 !important;
  border: 2px solid #ffffff !important;
}

html[data-access~="hc"] a:hover,
html[data-access~="hc"] button:hover {
  background: #ffffff !important;
  color: #000000 !important;
}

/* Focus Mode - Cream background everywhere */
html[data-access~="focus"],
html[data-access~="focus"] body,
html[data-access~="focus"] main,
html[data-access~="focus"] .page-wrapper,
html[data-access~="focus"] .site-header,
html[data-access~="focus"] .page-card,
html[data-access~="focus"] .content-block,
html[data-access~="focus"] .markdown-block,
html[data-access~="focus"] .card-grid,
html[data-access~="focus"] .section-wrapper,
html[data-access~="focus"] .hero-section,
html[data-access~="focus"] div,
html[data-access~="focus"] section,
html[data-access~="focus"] article {
  background: #F5F5DC !important;
  background-color: #F5F5DC !important;
  color: #000000 !important;
}

html[data-access~="focus"] .site-header {
  box-shadow: none !important;
  border-bottom: 2px solid #CCCCCC !important;
}

html[data-access~="focus"] h1,
html[data-access~="focus"] h2,
html[data-access~="focus"] h3,
html[data-access~="focus"] h4,
html[data-access~="focus"] h5,
html[data-access~="focus"] h6,
html[data-access~="focus"] .nav-menu a {
  font-weight: 700 !important;
}

html[data-access~="focus"] a,
html[data-access~="focus"] .nav-menu li a,
html[data-access~="focus"] .cta-btn,
html[data-access~="focus"] button {
  background: #4169E1 !important;
  color: #ffffff !important;
  border-color: #4169E1 !important;
}

/* Dyslexic Font - Apply to everything */
html[data-access~="dys"] *,
html[data-access~="dys"] body,
html[data-access~="dys"] h1,
html[data-access~="dys"] h2,
html[data-access~="dys"] h3,
html[data-access~="dys"] h4,
html[data-access~="dys"] h5,
html[data-access~="dys"] h6,
html[data-access~="dys"] p,
html[data-access~="dys"] span,
html[data-access~="dys"] li,
html[data-access~="dys"] a,
html[data-access~="dys"] button {
  font-family: "OpenDyslexic", "Atkinson Hyperlegible", "Comic Sans MS", "Arial", sans-serif !important;
  letter-spacing: 0.05em !important;
  word-spacing: 0.1em !important;
  line-height: 1.6 !important;
}

/* Large Text - Scale everything */
html[data-access~="xl"] {
  font-size: 130% !important;
}

html[data-access~="xl"] * {
  font-size: inherit !important;
}

html[data-access~="xl"] .nav-controls button {
  padding: 0.6rem 1rem !important;
}

html[data-access~="xl"] .dropdown-menu {
  min-width: 350px !important;
  padding: 0.75rem !important;
}

html[data-access~="xl"] .lang-flag {
  width: 28px !important;
  height: 20px !important;
}

/* ===== UI COMPONENTS ===== */
#access-menu button.active {
  background: var(--accent-primary) !important;
  color: var(--text-light) !important;
  font-weight: 600 !important;
}

#access-menu button.active::before {
  font-weight: 900;
  font-size: 1.1em;
  margin-right: 0.25rem;
}

#access-trigger.has-active::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid var(--bg-card);
}

.access-notification {
  position: fixed;
  top: 100px;
  right: 20px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 2px solid var(--accent-primary);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  font-weight: 600;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  transition: all 0.3s ease;
}

.access-notification.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Focus rings */
button:focus,
a:focus,
[tabindex]:focus {
  outline: 3px solid var(--accent-gold) !important;
  outline-offset: 2px !important;
}

/* Dropdown fixes for all modes */
html[data-access~="hc"] .dropdown-menu {
  background: #000000 !important;
  border: 2px solid #ffffff !important;
}

html[data-access~="hc"] .dropdown-menu button {
  color: #ffffff !important;
}

html[data-access~="hc"] .dropdown-menu button:hover,
html[data-access~="hc"] .dropdown-menu button.active {
  background: #FFD600 !important;
  color: #000000 !important;
}

html[data-access~="focus"] .dropdown-menu {
  background: #FAFAF0 !important;
  border: 2px solid #CCCCCC !important;
}

html[data-access~="focus"] .nav-controls button {
  border: 2px solid #CCCCCC !important;
  font-weight: 600 !important;
}


/* Focus mode hero text fix */
html[data-access~="focus"] .hero h1,
html[data-access~="focus"] .hero-text,
html[data-access~="focus"] .hero-inner h1,
html[data-access~="focus"] .hero-inner .hero-text {
  color: #2c3e50 !important;
  text-shadow: none !important;
}
