/* KBM Core 1.9.83 — Sitewide Mobile Public Viewport Freeze Authority
 * Scope is server-gated by body.kbm-public-viewport-freeze-1979 and mobile-only.
 * Home/Dashboard/1.9.78 submit forms remain excluded in PHP. Rental archive
 * and Rental single join this canonical viewport lock from 1.9.83 onward.
 */
@media (max-width:1024px){
  html.kbm-public-viewport-freeze-1979,
  body.kbm-public-viewport-freeze-1979{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    overflow-x:hidden!important;
    overscroll-behavior-x:none;
    -webkit-text-size-adjust:100%;
    text-size-adjust:100%;
  }

  body.kbm-public-viewport-freeze-1979 :where(
    #page,.site,.site-content,.content-area,.site-main,#primary,main,.entry-content,
    .wp-site-blocks,.wp-block-group,.wp-block-shortcode,
    .elementor,.elementor-section,.elementor-container,.e-con,.e-con-inner,.elementor-widget-shortcode,
    .kbm-theme-main,.kbm-theme-content,.kbm-theme-single,.kbm-theme-loop,.kbm-theme-404,.kbm-theme-empty,.kbm-shell,
    .kbm-ads-recode,.kbm-ads-recode-shell,.kbm-ad-single-recode,.kbm-ad-single-recode-shell
  ){
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }

  /* Canonical KBM public vertical shells discovered in the current Source. */
  body.kbm-public-viewport-freeze-1979 :where(
    .kbm-ads-recode,.kbm-ads-recode-shell,.kbm-ad-single-recode,.kbm-ad-single-recode-shell,
    .kbm-machine-sale-recode,.kbm-machine-sale-recode-shell,.kbm-machine-sale-recode-archive,.kbm-machine-sale-recode-single,
    .kbm-services-recode,.kbm-services-recode-shell,.kbm-services-recode-archive,
    .kbm-drivers-recode,.kbm-drivers-recode-shell,.kbm-drivers-recode-archive,.kbm-drivers-recode-single,
    .kbm-c112-archive,.kbm-c112-single,
    #kbm-vr-articles,.kbm-articles-recode,.kbm-articles-recode-shell,
    #kbm-vr-legal,.kbm-static-recode,.kbm-static-recode-shell,.kbm-static-template-takeover,
    .kbm-provider-archive,.kbm-p23-archive,.kbm-p20-archive,.kbm-p20p-archive,
    .kbm-tender-archive,.kbm-tenders-wrap,.kbm-p5-wrap,.kbm-p5-shell,
    .kbm-plans-wrap,.kbm-payment-wrap,.kbm-auth-recode,.kbm-auth-shell,
    .kbm-search-wrap,.kbm-search-results
  ){
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-inline:auto!important;
    box-sizing:border-box!important;
  }

  /* Nested grids/flex children must be allowed to shrink inside the device frame. */
  body.kbm-public-viewport-freeze-1979 :where(
    .kbm-ads-recode-layout,.kbm-ads-recode-results,.kbm-ads-recode-grid,
    .kbm-ad-single-recode-grid,.kbm-ad-single-recode-main,.kbm-ad-single-recode-side,
    .kbm-machine-sale-recode-layout,.kbm-machine-sale-recode-results,.kbm-machine-sale-recode-grid,
    .kbm-services-recode-layout,.kbm-services-recode-grid,
    .kbm-drivers-recode-layout,.kbm-drivers-recode-main,.kbm-drivers-recode-grid,
    .kbm-c112-layout,.kbm-c112-grid,
    .kbm-articles-recode-layout,.kbm-articles-recode-main,.kbm-articles-recode-grid,.kbm-articles-recode-single-layout,
    .kbm-static-recode-policy,.kbm-static-recode-policy-body,
    .kbm-theme-loop
  ){
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }

  /* 1.9.83 rental recovery: force the two routes that previously rendered with
   * the browser's desktop-layout viewport back into the physical device frame. */
  body.kbm-public-viewport-freeze-1979.kbm-rmsar2130-archive :where(
    #page,.site,.site-content,#primary,.site-main,main,.kbm-ads-recode,.kbm-ads-recode-shell,
    .kbm-ads-recode-layout,.kbm-ads-recode-results,.kbm-ads-recode-grid
  ),
  body.kbm-public-viewport-freeze-1979.kbm-rmsar2130-single :where(
    #page,.site,.site-content,#primary,.site-main,main,.kbm-ad-single-recode,.kbm-ad-single-recode-shell,
    .kbm-ad-single-recode-grid,.kbm-ad-single-recode-main,.kbm-ad-single-recode-side
  ){
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-inline:auto!important;
    box-sizing:border-box!important;
  }

  body.kbm-public-viewport-freeze-1979 :where(img,video,canvas,svg,iframe){
    max-width:100%!important;
  }

  /* Prevent focus-zoom on mobile form/filter/contact controls while preserving
   * checkbox/radio geometry. */
  body.kbm-public-viewport-freeze-1979 :where(
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea
  ){
    max-width:100%!important;
    min-width:0!important;
    font-size:max(16px,1em)!important;
    box-sizing:border-box!important;
  }

  /* Preserve intentional data/table horizontal scrolling inside the fixed page. */
  body.kbm-public-viewport-freeze-1979 :where(
    .kbm-table-wrap,.kbm-scroll-x,.kbm-c112-table-wrap,.table-responsive,.wp-block-table
  ){
    max-width:100%!important;
    overflow-x:auto!important;
    overscroll-behavior-inline:contain;
    -webkit-overflow-scrolling:touch;
  }

  body.kbm-public-viewport-freeze-1979 :where(table){max-width:100%;}
}
