/* ============================================================
   northaven-utils.v1.css
   Shared utility classes used across Northaven Trail pages.
   Load this stylesheet BEFORE any component-specific CSS
   (trail-captains.v1.css, adopt-garden.v1.css, etc.).

   Pages that use this file:
     northaventrail.org/trailmap
     northaventrail.org/report-trail-issue
     northaventrail.org/tails-2026
     northaventrail.org/trail-captains
     northaventrail.org/adoptgarden

   Add to Squarespace header injection or first Code Block:
     <link rel="stylesheet"
           href="https://assets.northaventrail.org/css/northaven-utils.v1.css">
   ============================================================ */

/* ---- Screen-reader only utility ---- */
/* Single authoritative implementation — do not duplicate in component CSS. */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---- Skip link ---- */
/* Use with NorthavenUtils.ensureSkipLink() for WCAG 2.4.1 bypass links. */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: #108452;
  color: #fff !important;
  padding: 12px 24px;
  z-index: 10000;
  text-decoration: none;
  font-weight: bold;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  outline: none;
}

/* Slide-in animation — suppressed for users who prefer reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .skip-link {
    transition: top 0.2s ease-in-out;
  }
}

/* :focus keeps the link visible for browsers lacking :focus-visible support. */
.skip-link:focus {
  top: 0;
}

.skip-link:focus-visible {
  top: 0;
  outline: 3px solid #ffba08;
  outline-offset: 2px;
}

/* ---- Shared CTA button ---- */
/* Used by trail-captains (.tc-header-bar) and adopt-garden (.ag-header-bar).   */
/* Component JS emits class="nt-cta-btn" — do not add component-prefixed        */
/* duplicates in component CSS files.                                           */
.nt-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgb(16, 132, 82);
  color: #fff;
  text-decoration: none;
  padding: 8px 18px;
  min-height: 44px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: normal;
  text-align: center;
  transition: background-color 0.15s ease-in-out;
  box-sizing: border-box;
}

.nt-cta-btn:hover {
  background: #0a6640;
  color: #fff;
}

.nt-cta-btn:focus-visible {
  background: #0a6640;
  color: #fff;
  outline: 2px solid rgb(16, 132, 82);
  outline-offset: 3px;
}

/* ---- Squarespace overflow fix (required for sticky table headers) ---- */
/* Applied globally here so every component gets it without duplication.  */
.sqs-block-content {
  overflow: visible !important;
}

/* ---- Mobile: full-width CTA button ---- */
@media (max-width: 767px) {
  .nt-cta-btn {
    display: block;
    width: 100%;
    text-align: center;
  }
}
