
/* CHONA ACCESSIBILITY TOOLBAR */

.accessibility-widget {
  position: relative;
  z-index: 99999;
}

.accessibility-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100000;

  background: #0645ad;
  color: white;

  border: 2px solid white;
  border-radius: 10px;

  padding: 14px 18px;
  min-height: 48px;

  font-size: 16px;
  font-weight: bold;

  cursor: pointer;
}

.accessibility-panel {
  position: fixed;
  right: 20px;
  bottom: 85px;

  z-index: 100000;

  width: min(360px, calc(100vw - 24px));
  max-height: 75vh;
  overflow-y: auto;

  padding: 18px;

  background: #ffffff;
  color: #111111;

  border: 2px solid #333333;
  border-radius: 12px;

  box-shadow: 0 4px 20px rgba(0,0,0,.25);
}

.accessibility-panel[hidden] {
  display: none;
}

.accessibility-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.accessibility-heading h2 {
  font-size: 20px;
  margin: 0 0 10px;
}

.accessibility-group {
  padding: 12px 0;
  border-bottom: 1px solid #cccccc;
}

.accessibility-group h3 {
  font-size: 17px;
}

.accessibility-panel button,
.accessibility-panel select {
  width: 100%;
  min-height: 44px;

  margin: 5px 0;
  padding: 10px;

  border: 1px solid #555;
  border-radius: 6px;

  background: #f2f2f2;
  color: #111;

  font-size: 15px;
  cursor: pointer;
}

.accessibility-panel button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.accessibility-panel button:focus-visible,
.accessibility-panel select:focus-visible,
.accessibility-toggle:focus-visible {
  outline: 3px solid #ff9900;
  outline-offset: 3px;
}

.accessibility-panel label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

.accessibility-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.accessibility-panel p {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.reset-accessibility {
  background: #fff0f0 !important;
  color: #8b0000 !important;
  font-weight: bold;
}

/* Skip navigation */

.skip-link {
  position: absolute;
  top: -100px;
  left: 10px;
  z-index: 100001;
  padding: 12px;
  background: #000;
  color: #fff;
}

.skip-link:focus {
  top: 10px;
}

/* Screen reader status */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* High contrast */

body.high-contrast {
  background: #000 !important;
  color: #fff !important;
}

body.high-contrast main,
body.high-contrast main * {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #ff0 !important;
}

body.high-contrast a {
  color: #ff0 !important;
  text-decoration: underline !important;
}

/* Reading mode */

body.reading-mode main {
  max-width: 900px;
  margin: auto;
  padding: 25px;
  background: #fffbea;
  color: #222;
  line-height: 1.9;
}

/* Reading-friendly font */

body.dyslexia-friendly main {
  font-family: Arial, Verdana, sans-serif !important;
  letter-spacing: .05em;
  word-spacing: .1em;
  line-height: 1.9;
}

/* Underline links */

body.underline-links main a {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
}

/* Reduce motion */

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

/* Responsive */

@media (max-width: 480px) {

  .accessibility-toggle {
    right: 12px;
    bottom: 12px;
  }

  .accessibility-panel {
    right: 8px;
    bottom: 75px;
    width: calc(100vw - 16px);
    max-height: 70vh;
  }

}
