/* Escape can activate native :focus-visible while the clicked action still
   has focus. Its recorded origin governs outlines regardless of component
   specificity, and the ring tokens also reach shadows drawn on child icons. */
:root [data-function-button-focus="pointer"]:focus {
  outline: none !important;
  --focus-ring: transparent;
  --field-focus-shadow: var(--field-shadow);
}

.focus-ring-on-parent:focus-visible {
  outline: none;
}

:has(> .focus-ring-on-parent:focus[data-function-button-focus="tab"]:not([aria-expanded="true"])) {
  outline: 3px solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset, 2px);
}
