/* defuss-shadcn - optional accessibility utilities.
 * Text meant for assistive technology only (.sr-only) and its inverse
 * (.not-sr-only). The clip pattern keeps content in the AT tree while
 * removing it visually - display:none would hide it from screen readers too.
 * Focusable elements re-reveal via :focus / :focus-within so keyboard users
 * never lose the control entirely (the Tailwind idiom, kept intact).
 */
@layer components, utilities;

@layer utilities {
  :where(.sr-only) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border-width: 0;
  }

  /* Undo .sr-only back to ordinary flow content. */
  :where(.not-sr-only) {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
  }
}
