/**
 * @file
 * WCAG 2.4.7 / 1.4.11 keyboard focus ring.
 *
 * Loaded after main.min.css so it beats Bootstrap's translucent box-shadow
 * (Donate orange at 50%, nav and form controls at 25% purple).
 *
 * White band sits on the control (visible on orange and purple).
 * Deep purple band sits outside it (visible on white).
 */

:focus-visible {
  outline: 3px solid #3d1185 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 3px #fff !important;
}

/* UserWay's own rule is more specific (.uwy .uai:focus-within) and paints
   a blue ring on the blue button. The id beats that. */
#userwayAccessibilityIcon:focus-visible,
#userwayAccessibilityIcon:focus-within {
  outline: 3px solid #3d1185 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 3px #fff !important;
}

/* Filter groups used overflow:hidden, which sliced the ring off the left of the first checkbox. */
.program-listing__filter-group,
.resources-listing__filter-group,
.in-the-news-listing__filter-group,
.community-story-listing__filter-group,
.search-results__filter-group {
  overflow: visible;
}

[data-results-count]:focus,
[data-find-location-heading]:focus,
[data-search-results-count]:focus,
.job-listing__count:focus {
  scroll-margin-top: 1.5rem;
}

/* Admin toolbar keeps its own focus style. */
#toolbar-administration :focus-visible,
.toolbar :focus-visible {
  outline: revert !important;
  outline-offset: revert !important;
  box-shadow: none !important;
}
