/* Cross-browser hardening layer. Existing AOS, GSAP, Bootstrap and custom animations are intentionally untouched. */
:root { --astikan-touch-target: 44px; }

/* Elements that are visually closed must also leave pointer interaction and the accessibility tree. */
[hidden],
[inert] {
  pointer-events: none !important;
}

.modal[hidden],
.custom-offcanvas[hidden],
.mobile-filter-container[hidden],
.mobile-filter-overlay[hidden] {
  display: none !important;
}

/* Prevent media clipping and accidental page-level horizontal drift. */
img, video, canvas, svg { max-width: 100%; }
html, body { overflow-x: hidden; }

/* The audit's target-size failures were mobile/coarse-pointer failures. Scope the fix there so desktop spacing stays unchanged. */
@media (max-width: 991px), (pointer: coarse) {
  button,
  a.btn,
  [role="button"],
  .navbar-toggler,
  .menu-ellipsis,
  .mobile-filter-toggle,
  .mobile-filter-close,
  .mobile-filter-apply,
  .mobile-filter-reset,
  #analyzeSymptomsBtn,
  .compact-symptom-chip,
  .med-category-chip,
  .page-link {
    min-width: var(--astikan-touch-target);
    min-height: var(--astikan-touch-target);
  }

  .navbar-toggler,
  .menu-ellipsis,
  .mobile-filter-toggle,
  .mobile-filter-close {
    width: var(--astikan-touch-target) !important;
    height: var(--astikan-touch-target) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  #analyzeSymptomsBtn {
    width: auto !important;
    padding-inline: 1rem !important;
  }

  .form-check {
    min-height: var(--astikan-touch-target);
    display: flex;
    align-items: center;
  }

  .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
  }

  .form-check-label {
    min-height: var(--astikan-touch-target);
    display: inline-flex;
    align-items: center;
    padding-inline: .5rem;
    margin-bottom: 0;
  }

  .futrr a,
  footer a {
    min-height: var(--astikan-touch-target);
    display: inline-flex;
    align-items: center;
    padding-block: .45rem;
  }
}
