/* Cross-template accessibility contracts. Keep this layer late in the cascade. */
.playerscout-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body.playerscout-modal-focus-active {
  overflow: hidden;
}

.skip-link.screen-reader-text:focus {
  position: fixed !important;
  z-index: 100000;
  top: 12px;
  left: 12px;
  width: auto !important;
  height: auto !important;
  padding: 12px 16px !important;
  margin: 0 !important;
  clip: auto !important;
  overflow: visible !important;
  color: #111;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 0 0 3px var(--wp--preset--color--purple-bright, #8a49f5);
}

:where(a[href], button, input:not([type="hidden"]), select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 3px solid var(--wp--preset--color--purple-bright, #8a49f5) !important;
  outline-offset: 3px !important;
}

:where(.playerscout-article-header, .playerscout-cookie-consent, .playerscout-exit-popup, .playerscout-share-backdrop)
  :where(a[href], button, input, select, textarea, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline-color: #fff !important;
  box-shadow: 0 0 0 5px #282252;
}

/* The share sheet takes focus when it opens; it needs no ring of its own. */
.playerscout-share-sheet:focus {
  outline: none;
}

.playerscout-cookie-close,
.playerscout-exit-popup__close,
.playerscout-share-heading [data-share-close],
.playerscout-mobile-menu-toggle {
  min-width: 44px;
  min-height: 44px;
}

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

  .playerscout-cookie-modal,
  .playerscout-exit-popup,
  .playerscout-share-backdrop,
  .playerscout-share-sheet,
  .playerscout-mobile-menu,
  [data-yotako-faq] .yotako-faq-answer,
  [data-yotako-carousel] .yotako-carousel-item {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
