:root {
  --a11y-focus: #f59e0b;
  --a11y-focus-contrast: #111827;
}

html {
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

.a11ySkipLink {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 10000;
  min-height: 44px;
  padding: 10px 16px;
  border: 3px solid #fff;
  border-radius: 10px;
  background: #111827;
  color: #fff !important;
  font-weight: 800;
  text-decoration: none !important;
  transform: translateY(-160%);
}

.a11ySkipLink:focus {
  transform: translateY(0);
}

:where(a, button, input, select, textarea, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 3px solid var(--a11y-focus) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 1px var(--a11y-focus-contrast) !important;
}

:where(button, input, select, textarea, .btn, .headerBtn, .headBtn, .actionBtn, .miniBtn, [role="button"]) {
  min-height: 44px;
}

input[type="checkbox"],
input[type="radio"] {
  min-width: 24px;
  min-height: 24px;
}

img,
video,
canvas,
svg {
  max-width: 100%;
}

.tableWrap,
[class*="tableWrap"] {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.tableWrap:focus-visible,
[class*="tableWrap"]:focus-visible {
  outline-offset: 1px !important;
}

.a11yLiveRegion {
  position: fixed;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

[aria-busy="true"] {
  cursor: progress;
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 84px;
  }

  input,
  select,
  textarea {
    max-width: 100%;
    font-size: 16px !important;
  }

  .actions,
  .modalActions,
  .inlineActions {
    flex-wrap: wrap;
  }

  .actions > :where(button, .btn),
  .modalActions > :where(button, .btn) {
    flex: 1 1 180px;
  }

  [role="dialog"] {
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }
}

@media (max-width: 360px) {
  .headerRightGroup,
  .headerActions,
  .headerBtns {
    gap: 6px !important;
  }

  .headerBtn,
  .headBtn {
    padding-inline: 10px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  :where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid Highlight !important;
  }
}
