/*
 * CPQ Standalone Account Fix v59
 * Fixes iPhone/iPad Home Screen mode freezing or showing a blank profile body.
 * Scope: frontend account/profile pages only.
 */
@media (max-width: 991.98px) {
  html,
  body {
    height: auto !important;
    min-height: 100% !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.cpq-is-standalone {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    min-height: calc(var(--cpq-app-vh, 1vh) * 100) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    touch-action: pan-y pinch-zoom !important;
    overscroll-behavior-y: auto !important;
  }

  body.cpq-is-standalone.cpq-account-route,
  body.cpq-account-route {
    background: #f5f7fb !important;
  }

  body.cpq-is-standalone.cpq-account-route .wish-list-body,
  body.cpq-is-standalone.cpq-account-route .wish-list-body.message,
  body.cpq-account-route .cpq-account-profile-page {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    min-height: calc((var(--cpq-app-vh, 1vh) * 100) - 150px) !important;
    height: auto !important;
    margin: 0 !important;
    padding: 16px 0 calc(var(--cpq-app-bottom-height, 68px) + var(--cpq-app-safe-bottom, 0px) + 28px) !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .cpq-account-profile-page > .container,
  .cpq-account-profile-page > .container > .row,
  .cpq-profile-content-column,
  .cpq-profile-content-column > *,
  .cpq-profile-content-column .profile,
  .cpq-profile-content-column .profile-ful-body,
  .cpq-profile-content-column .profile-input-section,
  .cpq-profile-content-column form {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 1px !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    -webkit-animation: none !important;
  }

  .cpq-account-profile-page > .container {
    padding-right: 14px !important;
    padding-left: 14px !important;
  }

  .cpq-account-profile-page > .container > .row {
    display: block !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  .cpq-profile-menu-column {
    display: none !important;
  }

  .cpq-profile-content-column {
    display: block !important;
    float: none !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  .cpq-account-profile-page .profile-ful-body {
    display: block !important;
    margin: 0 0 24px !important;
    padding: 16px !important;
    border: 1px solid #e1e8f0 !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 8px 25px rgba(11, 42, 82, .06) !important;
  }

  .cpq-account-profile-page .profile-parrent {
    display: flex !important;
  }

  .cpq-account-profile-page .profile-input-section {
    display: block !important;
    margin-top: 16px !important;
  }

  .cpq-account-profile-page .profile-input-section .row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-right: -6px !important;
    margin-left: -6px !important;
  }

  .cpq-account-profile-page .profile-input-section .row > [class*="col-"] {
    display: block !important;
    padding-right: 6px !important;
    padding-left: 6px !important;
  }

  /* A stale Bootstrap backdrop is removed by JS; this prevents it from trapping touches meanwhile. */
  body:not(.cpq-drawer-open) > .offcanvas-backdrop,
  body:not(.modal-open) > .modal-backdrop {
    pointer-events: none !important;
  }
}
