@import url('https://fonts.googleapis.com/css2?family=OpenDyslexic:wght@400;700&display=swap');

/* === Bubble === */
#accessibility-bubble {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #ff9800, #ffb74d);
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 9999;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}
#accessibility-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 0 18px rgba(255,152,0,0.8);
}
#accessibility-bubble svg {
  width: 32px;
  height: 32px;
  fill: white;
}

/* === Panel === */
#accessibility-panel {
  position: fixed;
  top: 0;
  right: -380px;
  width: 360px;
  height: 100vh;
  background: #f5f6f8;
  box-shadow: -6px 0 18px rgba(0,0,0,0.2);
  transition: right 0.35s ease, left 0.35s ease;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  color: #222;
}
#accessibility-panel.open { right: 0; }
#accessibility-panel.left { right: auto; left: -380px; }
#accessibility-panel.left.open { left: 0; }

#accessibility-panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  background: #ff9800;
  color: white;
  font-weight: 600;
  font-size: 1.15rem;
}
#accessibility-panel header button {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* === Inhalt === */
#accessibility-panel .content {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 20px;
}

/* === Button-Kacheln === */
#accessibility-panel .content button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border: none;
  border-radius: 12px;
  background: white;
  color: #222;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  transition: background 0.2s, transform 0.1s;
}
#accessibility-panel .content button:hover {
  background: #fff3e0;
  transform: translateY(-2px);
}
#accessibility-panel .content button.active {
  background: #ffe0b2;
  box-shadow: 0 0 0 2px #ff9800 inset;
}
#accessibility-panel .content button svg {
  width: 22px;
  height: 22px;
  fill: #ff9800;
}

/* === Toggle Switch (Positionsregler) === */
.switch {
  position: relative;
  width: 40px;
  height: 20px;
  background: #ccc;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s;
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: white;
  transition: transform 0.3s;
}
.switch.active {
  background: #ff9800;
}
.switch.active::after {
  transform: translateX(20px);
}

/* === Body-Klassen für Barrierefreiheit === */
body.high-contrast *:not(#accessibility-panel):not(#accessibility-bubble) {
  background-color: black !important;
  color: yellow !important;
}
body.high-contrast a { color: #00ffff !important; }

body.large-text { font-size: 1.25em !important; }
body.small-text { font-size: 0.9em !important; }

body.text-spacing * { letter-spacing: 0.06em !important; word-spacing: 0.15em !important; }
body.links-highlight a { background: rgba(255,230,0,0.2) !important; border-bottom: 2px solid #ffeb3b !important; }
body.no-animations * { animation: none !important; transition: none !important; }
body.no-images img { visibility: hidden !important; }
body.dyslexia * { font-family: 'OpenDyslexic', Arial, sans-serif !important; }
body.large-cursor { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32"><circle cx="10" cy="10" r="8" fill="orange"/></svg>') 4 4, auto !important; }
body.tooltips [title]:hover::after {
  content: attr(title);
  position: absolute;
  background: #333;
  color: #fff;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 0.75em;
  white-space: nowrap;
}
body.line-height * { line-height: 1.8 !important; }
body.text-align * { text-align: justify !important; }
