/* Loaded after the legacy bundle; no frontend rebuild or palette change. */

/* Restore the browser's own indicator where legacy component styles remove it.
   Keep this stronger than Select2/Bootstrap's component-specific focus resets. */
body :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: auto !important;
  outline-width: 2px !important;
  outline-offset: 3px;
}

/* Long URLs and larger user-defined text spacing must not widen the page. */
.main a,
.footer a {
  overflow-wrap: anywhere;
}

body .btn,
body .button {
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
}

/* Allow grid/flex content to shrink instead of forcing horizontal scrolling. */
.main .row > [class*="col-"] {
  min-width: 0;
}

/* Headings/skip targets must remain below the fixed header when focused. */
.main [id],
.main:focus {
  scroll-margin-top: var(--medius-header-offset, 8rem);
}

@media (forced-colors: active) {
  body :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid CanvasText !important;
  }
}
