/* Accessibility Toggle Button */
.a11y-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  border: none;
  cursor: pointer;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.4);
  transition: transform 0.2s, background-color 0.2s;
  padding: 0;
}

.a11y-toggle:hover {
  transform: scale(1.08);
  background: #1d4ed8;
}

.a11y-toggle svg {
  width: 26px;
  height: 26px;
  fill: #ffffff;
}

/* Accessibility Panel */
.a11y-panel {
  position: fixed;
  bottom: 80px;
  left: 20px;
  width: 260px;
  background: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 12px;
  padding: 1rem;
  z-index: 99999;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  display: none;
  direction: rtl;
}

.a11y-panel.open {
  display: block;
}

.a11y-panel-title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  text-align: center;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #333333;
}

.a11y-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.a11y-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.6rem 0.4rem;
  background: #262626;
  border: 1px solid #333333;
  border-radius: 8px;
  color: #cccccc;
  font-size: 0.7rem;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
  text-align: center;
  line-height: 1.3;
}

.a11y-btn:hover {
  background: #333333;
}

.a11y-btn.active {
  background: #2563eb;
  border-color: #3b82f6;
  color: #ffffff;
}

.a11y-btn-icon {
  font-size: 1.2rem;
}

.a11y-reset {
  grid-column: 1 / -1;
  margin-top: 0.25rem;
  background: #3a1a1a;
  border-color: #5a2a2a;
  color: #ff6b6b;
}

.a11y-reset:hover {
  background: #4a2020;
}

/* Accessibility Modes */
body.a11y-large-text {
  font-size: 120% !important;
}

body.a11y-large-text .headline {
  font-size: 2.1rem !important;
}

body.a11y-large-text .tagline,
body.a11y-large-text .social-text,
body.a11y-large-text .faq-question,
body.a11y-large-text .faq-answer p {
  font-size: 1.1rem !important;
}

body.a11y-high-contrast {
  background: #000000 !important;
  color: #ffffff !important;
}

body.a11y-high-contrast .faq-question,
body.a11y-high-contrast .faq-answer p,
body.a11y-high-contrast .social-text,
body.a11y-high-contrast .form-heading {
  color: #ffffff !important;
}

body.a11y-high-contrast .faq-list,
body.a11y-high-contrast .faq-item {
  border-color: #ffffff !important;
}

body.a11y-high-contrast .cta-button {
  background-color: #00cc00 !important;
  color: #000000 !important;
  font-weight: 900 !important;
}

body.a11y-grayscale {
  filter: grayscale(100%);
}

body.a11y-links a {
  text-decoration: underline !important;
  outline: 2px solid #ffff00 !important;
  outline-offset: 2px;
}

body.a11y-readable-font,
body.a11y-readable-font * {
  font-family: Arial, Helvetica, sans-serif !important;
  letter-spacing: 0.03em;
}

body.a11y-big-cursor,
body.a11y-big-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M5 1L5 27L12 20L20 20Z' fill='black' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E") 5 1, auto !important;
}

@media (max-width: 640px) {
  .a11y-toggle {
    width: 44px;
    height: 44px;
    bottom: 16px;
    left: 16px;
  }

  .a11y-toggle svg {
    width: 22px;
    height: 22px;
  }

  .a11y-panel {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: 70px;
  }
}
