/*
 * FoodCare Foodborne Guide v0.20.2
 * Mobile shell anchoring / viewport containment.
 *
 * Goal: the application must always start at the left edge of the mobile
 * viewport and must never create document-level horizontal scrolling.
 * Intentional horizontal scrollers (scientific tables, status strip, etc.)
 * remain local to their own components.
 */
@media (max-width:760px){
  html,
  body,
  body.fbp-guide-page{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
    overflow-x:hidden!important;
    overscroll-behavior-x:none!important;
  }

  /*
   * Hard reset of the desktop full-bleed centering rule
   *   left:50% + translateX(-50%)
   * which can leave Safari on a horizontally shifted document.
   * This rule is intentionally NOT dependent on body_class().
   */
  .fbp-app-shell{
    position:relative!important;
    left:0!important;
    right:auto!important;
    inset-inline-start:0!important;
    inset-inline-end:auto!important;
    transform:none!important;
    translate:none!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding-left:0!important;
    padding-right:0!important;
    box-sizing:border-box!important;
    overflow-x:hidden!important;
  }

  .fbp-app-shell > *,
  .fbp-workspace,
  .fbp-tool-view,
  .fbp-guide-main,
  .fbp-home-dashboard,
  .fbp-assessment-wide,
  .fbp-assessment-panel,
  .fbp-results-panel,
  .fbp-library-shell,
  .fbp-analysis-shell,
  .fbp-static-diagnostics,
  .fbp-app-main{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
    left:auto!important;
    right:auto!important;
    transform:none!important;
    translate:none!important;
    box-sizing:border-box!important;
  }

  /* WordPress / WPBakery wrappers must not keep a desktop offset on this page. */
  body.fbp-guide-page .vc_row,
  body.fbp-guide-page .wpb_row,
  body.fbp-guide-page .vc_row-fluid,
  body.fbp-guide-page .vc_column_container,
  body.fbp-guide-page .vc_column-inner,
  body.fbp-guide-page .wpb_wrapper,
  body.fbp-guide-page .wpb_content_element{
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
  body.fbp-guide-page .vc_row,
  body.fbp-guide-page .wpb_row,
  body.fbp-guide-page .vc_row-fluid{
    width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    left:auto!important;
    right:auto!important;
    transform:none!important;
    translate:none!important;
  }
  body.fbp-guide-page .vc_column_container,
  body.fbp-guide-page .vc_column-inner,
  body.fbp-guide-page .wpb_wrapper{
    width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
  }

  /* Keep normal panels vertically contained; horizontal motion belongs only to explicit scrollers. */
  .fbp-workspace,
  .fbp-tool-view,
  .fbp-guide-main,
  .fbp-home-dashboard,
  .fbp-assessment-wide,
  .fbp-assessment-panel,
  .fbp-results-panel,
  .fbp-library-shell,
  .fbp-analysis-shell,
  .fbp-static-diagnostics,
  .fbp-app-main{
    overflow-x:hidden!important;
  }

  /* Explicit local horizontal scrollers that are allowed to pan internally. */
  .fbp-table-wrap,
  .fbp-env-summary-table-wrap,
  .fbp-reg-table-wrap,
  .fbp-legal-table-wrap,
  .fbp-plan-table-wrap,
  .fbp-table-scroll-top,
  .fbp-system-at-glance,
  .fbp-home-bubbles,
  .fbp-tool-nav,
  .fbp-mode-tabs{
    max-width:100%!important;
    overscroll-behavior-inline:contain!important;
    -webkit-overflow-scrolling:touch!important;
  }

  /* Home cards must be sized by the viewport, never by a stale desktop grid width. */
  .fbp-home-menu-grid,
  .fbp-engine-grid,
  .fbp-home-insight-row{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  .fbp-home-menu-card,
  .fbp-engine-card,
  .fbp-home-insight{
    max-width:100%!important;
    min-width:0!important;
  }

  /* Avoid a child text run widening the document. */
  .fbp-app-shell h1,
  .fbp-app-shell h2,
  .fbp-app-shell h3,
  .fbp-app-shell h4,
  .fbp-app-shell p,
  .fbp-app-shell span,
  .fbp-app-shell strong,
  .fbp-app-shell small,
  .fbp-app-shell label{
    overflow-wrap:anywhere;
  }
}
