/*
  NGFIT snippet (migrated from WPCode)
  id: 118
  title: NGFIT — Member Dashboard Mobile Tight Fit
  code_type: css
  location: site_wide_header
  auto_insert: 1
  insert_number: 1
  priority: 10
  tags: []
  note: 
  modified: 2026-05-28 03:48:43
*/
/* NGFIT — Mobile Tight Fit v2 (Member + Staff Dashboards)
   Defensive lock against the page shifting side-to-side on phones.
   Strategy: clamp every container to viewport width, clip overflow,
   and block horizontal touch gestures entirely. */

@media (max-width: 900px) {
  /* === HARD LOCK: html + body cannot move horizontally === */
  html {
    overflow-x: clip !important;
    max-width: 100vw !important;
    width: 100% !important;
    position: relative !important;
  }
  html, body {
    overflow-x: clip !important;
    max-width: 100vw !important;
    width: 100% !important;
  }
  body {
    position: relative !important;
    margin: 0 auto !important;
    /* Block horizontal touch gestures so the page can only scroll vertically */
    touch-action: pan-y !important;
    overscroll-behavior: contain !important;
    overscroll-behavior-x: none !important;
    -webkit-overflow-scrolling: touch;
    -webkit-text-size-adjust: 100%;
  }

  /* === Constrain every dashboard container to viewport === */
  .ngfit-page,
  main.ngfit-dash-content,
  .ngfit-dash-content,
  .ngfit-shell,
  .ngm-shell,
  .ngfit-staff-shell,
  article.page,
  .entry-content,
  .site-content,
  .ast-container,
  #page,
  #content,
  .site,
  header,
  footer,
  .ngfit-panel,
  .ngfit-panel > *,
  .ngm-direct {
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: clip !important;
  }

  /* Tighten outer padding so content reaches edge-to-edge */
  main.ngfit-dash-content {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .ngfit-panel { padding-left: 10px !important; padding-right: 10px !important; }

  /* === Force ALL content to respect viewport width === */
  .ngfit-page *,
  .ngm-shell *,
  .ngfit-shell *,
  .ngfit-staff-shell * {
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* Media + tables wrap inside containers */
  .ngfit-page img,
  .ngfit-page video,
  .ngfit-page iframe,
  .ngfit-page table,
  .ngfit-page pre,
  .ngfit-page svg {
    max-width: 100% !important;
    height: auto;
  }

  /* === The ONLY allowed horizontal scroller: the tab strip === */
  /* Contained so its scroll doesn't bleed to the page */
  nav.ngfit-dash-tabs,
  .ngm-staff-toggle-wrap,
  .nuh-subtabs {
    overscroll-behavior-x: contain !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100% !important;
    touch-action: pan-x pan-y !important;
  }
}

@media (max-width: 480px) {
  main.ngfit-dash-content {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  .ngfit-panel { padding-left: 6px !important; padding-right: 6px !important; }
}

