/* Emergency mobile auction bid-sheet hotfix.
   Scope this file to bidding only. Auction image sizing belongs exclusively to
   stephen-fry-gallery.css so late-loaded public CSS cannot make the proof photos
   disappear again. */

/* The auction is a transaction route: the generic mobile shortcut dock must never compete with bidding. */
.living-public-site.cg-route-updates-stephen-fry-auction .cg-content-shortcuts,
.living-public-site.cg-route-updates-signed-stephen-fry-book-for-common-ground .cg-content-shortcuts,
.living-public-site:has(.sf10-has-modal) .cg-content-shortcuts {
  display: none !important;
}

/* Ensure the auction modal owns the top stacking context on mobile. */
.living-public-site:has(.sf10-has-modal) .sf10-modal {
  z-index: 2147483646 !important;
}

@media (max-width: 640px) {
  /* Give the sheet a reliable viewport and enough bottom room on Android/iOS browsers. */
  .sf10 .sf10-sheet {
    max-height: calc(100dvh - 32px) !important;
    padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
    overscroll-behavior: contain;
    scroll-padding-bottom: 96px;
  }

  /* Keep the final bid action visible as the bidder reviews the last fields. */
  .sf10 .sf10-sheet form > .sf10-primary:last-of-type {
    position: sticky;
    bottom: 0;
    z-index: 8;
    margin: 14px -4px 0 !important;
    width: calc(100% + 8px);
    min-height: 60px !important;
    border-radius: 999px;
    box-shadow: 0 -12px 22px #fffaf2, 0 10px 28px rgba(159,46,31,.24) !important;
  }

  /* Avoid the page-level sticky bid bar appearing under/behind the modal. */
  .sf10-has-modal .sf10-mobile-bar {
    display: none !important;
  }
}
