/* ===============================================================
   ACCESSIBILITY LAYER (shared by every page)
   Loaded last, so it adds to the page styles without restyling them.
   Colours here are deliberately neutral: they work with the blue and green themes.
   =============================================================== */

/* Skip link: first thing a keyboard user reaches, visible only while focused */
.skip-link {
  position: absolute;
  inset-inline-start: 8px;
  top: -120px;
  z-index: 10001;
  padding: 10px 16px;
  background: #fff;
  color: #1b1b1f;
  border: 2px solid #1b1b1f;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 8px;
}

/* Text for screen readers only (e.g. the landing page's h1) */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Visible keyboard focus on the elements that became focusable */
#dropZone:focus-visible,
.tooltip-icon:focus-visible,
.tooltip-warning-icon:focus-visible,
.table-scroll:focus-visible {
  outline: 3px solid #0b57d0;
  outline-offset: 2px;
}

/* Help tooltips also open on keyboard focus, not only on mouse hover */
.tooltip-container:focus-within .tooltip-text {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(-4px);
}

/* Wide tables scroll inside their own box instead of widening the page */
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

/* Touch screens: every checkbox row is at least 44 px tall */
@media (pointer: coarse) {
  .form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding-left: 0;
  }
  .form-check .form-check-input {
    float: none;
    margin: 0;
    flex: none;
  }
}
