/* Bug-A-Pest accessibility layer (A11Y:v1). Loaded last on every page. */

/* Orange buttons keep the brand orange with dark green text (5.0:1). Chosen by David, Oct 19 2026. */
:root {
  --a11y-btn-bg: #e67300;
  --a11y-btn-bg-hover: #f29433;
  --a11y-btn-fg: #0F2A22;
  --a11y-orange-text: #a85300;
}

/* Skip link: hidden until a keyboard user tabs to it */
.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 100001;
  background: #0F2A22; color: #fff; padding: 12px 18px; border-radius: 8px;
  font-weight: 700; font-size: 16px; text-decoration: none;
}
.skip-link:focus { top: 12px; outline: 3px solid #e67300; outline-offset: 2px; }
main:focus { outline: none; }

/* Visible keyboard focus everywhere (mouse clicks don't show it) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #e67300 !important; outline-offset: 2px;
}
html #bap-chat-input:focus-visible { outline: 3px solid #e67300 !important; outline-offset: 1px; }

/* Orange buttons: readable text */
.btn--primary, .mobile-cta .m-request, .step-num,
html #bap-cookie-accept, html #bap-chat-bubble, html .bap-msg.user, html #bap-chat-send {
  background-color: var(--a11y-btn-bg) !important;
  border-color: var(--a11y-btn-bg) !important;
  color: var(--a11y-btn-fg) !important;
}
.btn--primary:hover, html #bap-cookie-accept:hover, html #bap-chat-send:hover {
  background-color: var(--a11y-btn-bg-hover) !important; border-color: var(--a11y-btn-bg-hover) !important;
}
html #bap-chat-bubble .bap-label, html #bap-chat-bubble .bap-close-icon { color: var(--a11y-btn-fg) !important; }
html #bap-chat-send svg { fill: var(--a11y-btn-fg) !important; }

/* Orange text on light backgrounds when hovered (static colors are handled by a11y.js) */
.nav a:hover, .breadcrumb-bar a:hover, .sidebar-phone:hover { color: var(--a11y-orange-text) !important; }

/* Links inside paragraphs are underlined so they don't rely on color alone */
main p a:not(.btn), .sidebar-alert p a { text-decoration: underline; text-underline-offset: 2px; }

/* Chat footer text was light gray on white */
html #bap-chat-footer { color: #666 !important; }
html #bap-chat-footer a { color: var(--a11y-orange-text) !important; }

/* Respect "reduce motion" */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
