/* ==========================
   A11Y — UI + BEHAVIOR
   file: /css/a11y.css
========================== */

/* Floating button */
.a11y-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
}
.a11y-fab button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--accent, #ff6b35),
    #e55a2b
  ) !important;
  color: #fff !important;
  border: 3px solid #fff !important;
  font-size: 24px;
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.35);
  cursor: pointer;
  transition: 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.a11y-fab button:active {
  transform: scale(0.92);
}

/* Panel */
.a11y-panel {
  position: fixed;
  right: 90px;
  bottom: 20px;
  width: 350px;
  max-width: calc(100vw - 40px);
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid var(--accent, #ff6b35);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 18px 42px rgba(10, 10, 15, 0.12);
  z-index: 9998;
  display: none;
}
.a11y-panel.open {
  display: block;
}

.a11y-panel h3 {
  color: var(--accent, #ff6b35);
  font-size: 1.1rem;
  font-weight: 900;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid var(--accent, #ff6b35);
  padding-bottom: 12px;
}

/* Rows */
.a11y-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* Buttons/selects */
.a11y-row button,
.a11y-row select {
  border: 1px solid rgba(10, 10, 15, 0.16);
  background: rgba(255, 255, 255, 0.92);
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 14px;
  color: rgba(15, 15, 20, 0.92);
  cursor: pointer;
  transition: 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.a11y-row button:active,
.a11y-row select:active {
  transform: scale(0.96);
}

.a11y-row button[aria-pressed="true"] {
  background: var(--accent, #ff6b35) !important;
  color: #fff !important;
  border-color: var(--accent, #ff6b35) !important;
}

/* Mobile positioning */
@media (max-width: 576px) {
  .a11y-panel {
    right: 12px;
    left: 12px;
    bottom: 90px;
    width: auto;
    max-width: none;
    padding: 16px;
    border-radius: 18px;
  }
  .a11y-fab {
    right: 12px;
    bottom: 12px;
  }
}

/* ==========================
   A11Y — BEHAVIOR CLASSES
========================== */
body.a11y-on {
  font-family: Arial, Helvetica, sans-serif !important;
  line-height: 1.8 !important;
  letter-spacing: 0.3px !important;
  word-spacing: 0.1em !important;
}

/* Font sizes */
body.a11y-font-100 {
  font-size: 16px !important;
}
body.a11y-font-150 {
  font-size: 20px !important;
}
body.a11y-font-200 {
  font-size: 24px !important;
}

/* Spacing */
body.a11y-spacing * {
  line-height: 2.2 !important;
  letter-spacing: 0.08em !important;
  word-spacing: 0.15em !important;
}

/* No images */
body.a11y-noimg img {
  display: none !important;
}
body.a11y-noimg .hero {
  background-image: none !important;
}
body.a11y-noimg .hero::after {
  display: none !important;
}

/* A11Y themes (background/text) */
body.a11y-theme-bw {
  background: #fff !important;
  color: #000 !important;
}
body.a11y-theme-wb {
  background: #000 !important;
  color: #fff !important;
}
body.a11y-theme-blue {
  background: #0a3144 !important;
  color: #e6f3ff !important;
}
body.a11y-theme-brown {
  background: #3b2b22 !important;
  color: #ffecd9 !important;
}
body.a11y-theme-gray {
  background: #f0f0f0 !important;
  color: #222 !important;
}

/* Keep key surfaces readable while A11Y is on */
body.a11y-on .navbar,
body.a11y-on .card,
body.a11y-on form,
body.a11y-on .modal-content,
body.a11y-on .a11y-panel {
  background: rgba(255, 255, 255, 0.92) !important;
  color: rgba(15, 15, 20, 0.92) !important;
}

/* WB theme overrides */
body.a11y-theme-wb .navbar,
body.a11y-theme-wb .card,
body.a11y-theme-wb form,
body.a11y-theme-wb .modal-content,
body.a11y-theme-wb .a11y-panel {
  background: rgba(0, 0, 0, 0.92) !important;
  color: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}

/* Focus visible in A11Y */
body.a11y-on :focus-visible {
  outline: 3px solid #ffcc00 !important;
  outline-offset: 3px !important;
  box-shadow: none !important;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
