/* CRAFT v1.8.66 — iOS Safari / mobile viewport width correction.
 * The checkout stylesheet's html scrollbar-gutter:stable and explicit scroll
 * bar caused a reserved right-side gutter on WebKit.  Do not suppress page
 * content to hide the gap: remove that reservation and contain real grids. */
@media (max-width: 900px) {
  html {
    scrollbar-gutter: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior-x: none;
  }
  body {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    overscroll-behavior-x: none;
  }
  /* Safari must not reserve a desktop-style scrollbar on a touch screen. */
  html::-webkit-scrollbar { width: 0 !important; height: 0 !important; }

  /* Full-bleed footer/newsletter backgrounds must reach both viewport edges.
     Their inner content still uses the theme's existing horizontal gutters. */
  .v39-newsletter,
  .v39-footer,
  .newsletter-pause {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .v39-newsletter > .container,
  .v39-footer > .container {
    box-sizing: border-box !important;
    min-width: 0 !important;
    max-width: calc(100% - 28px) !important;
    width: calc(100% - 28px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .v39-newsletter-grid,
  .v39-news-copy,
  .v39-news-form,
  .craft-newsletter-main-row,
  .v39-footer-top {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  .v39-newsletter-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Real layout constraints, rather than masking truncated prices with overflow. */
@media (max-width: 900px) {
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .checkout-topbar,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .checkout-shell {
    box-sizing: border-box !important;
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .container {
    box-sizing: border-box !important;
    width: calc(100% - 28px) !important;
    max-width: calc(100% - 28px) !important;
    min-width: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .checkout-grid,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .checkout-form,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .summary-col,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .summary-card,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .checkout-card {
    box-sizing: border-box !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .checkout-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
  }
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .form-grid,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .craft-billing-address-grid,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .native-shipping-fields .woocommerce-shipping-fields__field-wrapper {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout input,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout textarea,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout select,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .select2-container {
    box-sizing: border-box !important;
    max-width: 100% !important;
  }
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .summary-item,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .summary-totals .summary-line {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .summary-name,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .summary-meta {
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
  }
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .woocommerce-Price-amount,
  body.woocommerce-checkout:not(.woocommerce-order-received) main#checkout .woocommerce-Price-amount bdi {
    white-space: nowrap !important;
  }
}
