/* Riverview 3.2.37 -- global focus styling across Stencil storefront.
   Remove BLUE outlines and focus shadows after pointer activation while
   maintaining a GOLD outline for keyboard accessibility. */

/* Do not show the blue tap highlight for buttons and links on touchscreens. */
html body :is(a[href], button, input, select, textarea, summary,
  details, [role="button"], [role="link"], [tabindex]:not([tabindex="-1"]),
  [contenteditable="true"]) {
  -webkit-tap-highlight-color: transparent !important;
}

/* Mouse/touch activation should not create persistent focus rings. */
html body :is(a[href], button, input, select, textarea, summary,
  details, [role="button"], [role="link"], [tabindex]:not([tabindex="-1"]),
  [contenteditable="true"]):focus:not(:focus-visible),
html body :is(a[href], button, [role="button"], [role="link"],
  [tabindex]:not([tabindex="-1"])):active:not(:focus-visible) {
  outline: none !important;
  outline-color: transparent !important;
  -webkit-box-shadow: none !important;
  box-shadow: none !important;
}

/* Keyboard focus is still visible, with Riverview's gold accent. */
html body :is(a[href], button, input, select, textarea, summary,
  details, [role="button"], [role="link"], [tabindex]:not([tabindex="-1"]),
  [contenteditable="true"]):focus-visible {
  outline: 2px solid #ffbd16 !important;
  outline-offset: 3px !important;
  -webkit-box-shadow: none !important;
  box-shadow: none !important;
}

/* BigCommerce option labels can inherit blue outline from input:focus. */
html body input:focus:not(:focus-visible) + label,
html body input:focus:not(:focus-visible) + .form-label,
html body label:focus:not(:focus-visible) {
  outline: none !important;
  box-shadow: none !important;
}
html body input:focus-visible + label,
html body input:focus-visible + .form-label,
html body label:focus-visible {
  outline: 2px solid #ffbd16 !important;
  outline-offset: 3px !important;
  box-shadow: none !important;
}

/* High contrast mode: preserve the focus indicator rather than hiding it. */
@media (forced-colors: active) {
  html body :is(a[href], button, input, select, textarea, summary,
    details, [role="button"], [role="link"], [tabindex]:not([tabindex="-1"]),
    [contenteditable="true"]):focus-visible,
  html body input:focus-visible + label,
  html body input:focus-visible + .form-label,
  html body label:focus-visible {
    outline-color: Highlight !important;
  }
}
