/* Haupt-Container für das Widget */
#accessibility-widget {
  position: fixed; /* Bleibt beim Scrollen an der gleichen Stelle */
  top: 20px;
  right: 20px;
  z-index: 1000; /* Stellt sicher, dass es über anderen Inhalten liegt */
  text-align: right;
}

/* Der Button zum Öffnen/Schließen */
#accessibility-toggle {
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  display: flex;
  justify-content: center;
  align-items: center;
      position: absolute;
    right: 0;
}

#accessibility-toggle:hover {
  background-color: #0056b3;
}

/* Das Panel mit den Einstellungen */
#accessibility-panel {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  margin-top: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  width: 250px; /* Breite des Panels anpassen */
  text-align: left;
}

/* Hilfsklasse zum Verstecken von Elementen */
.hidden {
  display: none;
}

/* Styling für die Bedienelemente im Panel (können Sie anpassen) */
#accessibility-panel .barrierfree-controls h4 {
  margin-top: 0;
  border-bottom: 1px solid #ccc;
  padding-bottom: 10px;
}

#accessibility-panel .barrierfree-controls label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

#accessibility-panel .barrierfree-controls input[type="range"] {
  width: 100%;
}

#accessibility-panel .barrierfree-controls .font-buttons span,
#accessibility-panel .barrierfree-controls .mode-buttons span {
  cursor: pointer;
  padding: 8px;
  border: 1px solid #ccc;
  display: inline-block;
  min-width: 40px;
  text-align: center;
  margin-right: 5px;
  border-radius: 4px;
  background-color: #fff;
}
#accessibility-panel .barrierfree-controls .font-buttons span:hover,
#accessibility-panel .barrierfree-controls .mode-buttons span:hover {
  background-color: #e9ecef;
}

#accessibility-panel .barrierfree-controls button {
    cursor: pointer;
    margin-right: 5px;
    padding: 8px 12px;
    border: 1px solid #6c757d;
    background-color: #6c757d;
    color: white;
    border-radius: 4px;
}
#accessibility-panel .barrierfree-controls button:hover {
    background-color: #5a6268;
}

/* 1. Regel zum Anwenden der Schriftart */
/* Das !important ist hier oft notwendig, um spezifischere font-family-Regeln zu überschreiben. */
body.opendyslexic-font-active,
body.opendyslexic-font-active * {
  font-family: 'OpenDyslexic', sans-serif !important;
}

/* 2. Styling für aktive Modus-Buttons */
#accessibility-panel .mode-buttons span.active {
    background-color: #007bff; /* Beispiel: blaue Hervorhebung */
    color: white;
    border-color: #007bff;
}