/* ChipAdvisor accessibility + motion baseline.
 * Loaded after tokens.css. Invisible to mouse users by default.
 */

/* Keyboard focus visible on every interactive element. !important is
 * deliberate: it overrides pre-existing element-level `outline: none`
 * declarations so keyboard focus is never silently suppressed.
 * :focus-visible only matches keyboard focus, so mouse interaction is
 * unchanged. */
:focus-visible {
  outline: 2px solid var(--amber-mid) !important;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Respect users who request reduced motion (OS-level preference).
 * Calms confetti, the trophy glow, map fly-tos, and CSS transitions. */
@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;
  }
}

/* Visually hide for sighted users but keep in the accessibility tree.
 * Use for screen-reader-only headings and labels. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
