/* AA report P0 accessibility fixes. */
/* Match the Main website keyboard focus treatment. */
body :is(a, button, input, select, textarea, summary, [role="button"], [tabindex]:not([tabindex="-1"])):focus-visible,
body button:focus,
.faq .faq-item .faq-q:focus-visible,
.cSection .cSectionTitle:focus-visible,
.bootstrap-select .dropdown-toggle:focus-visible,
.bootstrap-select .dropdown-menu > .inner:focus-visible,
.locator-filter-select-field .bootstrap-select .bs-donebutton :is(.btn, .locator-select-reset):focus-visible {
  outline: 3px solid #111111 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 3px #ffffff !important;
}

/* Keep the complete focus indicator inside clipped, rounded News cards. */
.card-wrapper.news > a {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.card-wrapper.news > a:focus-visible {
  outline-offset: -6px !important;
  box-shadow: inset 0 0 0 3px #ffffff !important;
}

/* W23: retain the live-site colours by default; use AA colours only on request. */
:root[data-theme="contrast"] {
  --text-base: #000000;
  --Secondary: #347000;
  --Tertiary: #bb2263;
  --Rice2: #87663b;
  --Rice3: #75573b;
  --light-p: #bb2263;
}

:root[data-theme="contrast"] .customer-tab a {
  color: var(--text-base);
}

/* Match Education: navigation text is black in contrast mode. */
:root[data-theme="contrast"] header .mainnav .navbar-light .navbar-nav .nav-link,
:root[data-theme="contrast"] header .mainnav .navbar-nav .dropdown-menu a,
:root[data-theme="contrast"] header :is(.navtop, .navfooter, .modal-header) :is(a, button) {
  color: #000000 !important;
}

:root[data-theme="contrast"] header .mainnav .navbar-light .navbar-nav .nav-link:is(:hover, :focus),
:root[data-theme="contrast"] header .mainnav .navbar-nav .dropdown-menu a:is(:hover, :focus),
:root[data-theme="contrast"] header :is(.navtop, .navfooter, .modal-header) :is(a, button):is(:hover, :focus),
:root[data-theme="contrast"] header :is(.navtop, .navfooter, .modal-header) button.toggleTheme.selected {
  color: var(--Tertiary) !important;
}

:root[data-theme="contrast"] .nav-link:hover {
  fill: var(--Secondary) !important;
}

:root[data-theme="contrast"] .sns.withBlue a {
  background: var(--Primary) !important;
}

:root[data-theme="contrast"] header .sns.withBlue a:is(:hover, :focus-visible) {
  background: var(--Rice3) !important;
}

:root[data-theme="contrast"] #loginForm a.btn-tertiary {
  background-color: #9c174d !important;
  border-color: #9c174d !important;
  color: #ffffff !important;
}

:root[data-theme="contrast"] #loginForm a.btn-tertiary:is(:hover, :focus) {
  background-color: #7d123d !important;
  border-color: #7d123d !important;
}

:root[data-theme="contrast"] .breadcrumb-item.active {
  color: #1d1d1d !important;
}

:root[data-theme="contrast"] .sns a {
  background-color: var(--Rice2) !important;
}

:root[data-theme="contrast"] .sns a:is(:hover, :focus-visible) {
  background-color: var(--Rice3) !important;
}

:root[data-theme="contrast"] footer .sns a {
  background: var(--Primary) !important;
}

:root[data-theme="contrast"] footer .sns a:is(:hover, :focus-visible) {
  background: var(--Rice3) !important;
}

:root[data-theme="contrast"] .calendar .days li .active {
  border: 1px solid #ffffff !important;
  background-color: var(--Rice2) !important;
}

:root[data-theme="contrast"] .calendar .days li .active:is(:hover, :focus) {
  border-color: #ffffff !important;
  background-color: var(--Rice3) !important;
}

#content {
  scroll-margin-top: 7rem;
}

.swiper-autoplay-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  margin: 0 4px 0 0;
  padding: 7px;
  border: 0;
  border-radius: 50%;
  color: var(--text-base);
  background: transparent;
  cursor: pointer;
  vertical-align: middle;
}

.swiper-pagination-with-autoplay {
  display: flex;
  align-items: center;
  justify-content: center;
}

.swiper-pagination-bullets-group {
  display: inline-flex;
  align-items: center;
}

.swiper-autoplay-toggle svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto !important;
  }

  .swiper-wrapper {
    transition-duration: 0.01ms !important;
  }
}

:root[data-theme="contrast"] .backToTop .scrollToTop {
  background: #285800;
  color: #ffffff;
}

/* Match the live utility-bar text colour on desktop and mobile. */
header .navtop button.toggleTheme,
header .modal-header button.toggleTheme {
  color: var(--text-base);
}

header .navtop button.toggleTheme:is(:hover, :focus-visible),
header .modal-header button.toggleTheme:is(:hover, :focus-visible) {
  color: var(--Tertiary);
}

header .navtop button.toggleTheme.selected,
header .modal-header button.toggleTheme.selected {
  color: var(--Tertiary);
}

:root[data-theme="contrast"] .backToTop .scrollToTop:is(:hover, :focus) {
  background: var(--Tertiary);
  color: #ffffff;
}

.backToTop .scrollToTop {
  border: 0;
  cursor: pointer;
  padding: 0;
}

.accessibility-statement a {
  text-decoration: underline;
}

@media (forced-colors: active) {
  body :is(a, button, input, select, textarea, summary, [role="button"], [tabindex]:not([tabindex="-1"])):focus-visible,
  body button:focus,
  .faq .faq-item .faq-q:focus-visible,
  .cSection .cSectionTitle:focus-visible,
  .bootstrap-select .dropdown-toggle:focus-visible,
  .bootstrap-select .dropdown-menu > .inner:focus-visible,
  .locator-filter-select-field .bootstrap-select .bs-donebutton :is(.btn, .locator-select-reset):focus-visible {
    outline-color: Highlight !important;
  }

  .backToTop .scrollToTop,
  #btnTogglePassword {
    border: 1px solid ButtonText;
  }
}
