/* Product sharing, the compact mobile purchase bar and a quieter back-to-top dial. */

.shop-dialog-share { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin: 17px 72px 17px auto; padding: 0 17px 0 15px; color: var(--ink, #162b43); background: #fff; border: 1px solid var(--line, #dfe3e4); border-radius: 999px; font: inherit; font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap; cursor: pointer; transition: border-color .2s ease, color .2s ease, background .2s ease; }
.shop-dialog-share .shop-icon { flex: 0 0 18px; width: 18px; height: 18px; }
.shop-dialog-share:hover { color: #155caa; border-color: #9fb9d6; background: #f7f9fc; }
.shop-dialog-share:focus-visible { outline: 2px solid #155caa; outline-offset: 3px; }
.shop-dialog-toolbar .shop-product-return:has(+ .shop-dialog-share) { max-width: calc(100% - 230px); margin-right: 12px; }

.shop-buy-bar { display: none; }
/* The product name takes focus on arrival from a shared link; it is not a control, so no ring. */
#product-dialog-title:focus { outline: none; }

@media (max-width: 600px) {
  .shop-dialog-share { margin: 13px 70px 13px auto; }
  .shop-product-return + .shop-dialog-share { width: 44px; padding: 0; }
  .shop-product-return + .shop-dialog-share [data-share-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .shop-dialog-toolbar .shop-product-return:has(+ .shop-dialog-share) { max-width: calc(100% - 150px); }

  .shop-buy-bar { position: sticky; bottom: 0; z-index: 9; display: flex; align-items: center; gap: 14px; min-height: 74px; margin-top: -74px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgb(255 255 255 / 94%); border-top: 1px solid var(--line, #dfe3e4); box-shadow: 0 -12px 30px rgb(22 43 67 / 9%); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); opacity: 0; visibility: hidden; transform: translateY(100%); transition: transform .3s cubic-bezier(.22, 1, .36, 1), opacity .2s ease, visibility 0s linear .3s; }
  .shop-buy-bar.is-visible { opacity: 1; visibility: visible; transform: none; transition: transform .3s cubic-bezier(.22, 1, .36, 1), opacity .2s ease; }
  .shop-buy-bar-price { display: flex; flex: 1 1 auto; flex-direction: column; gap: 3px; min-width: 0; margin: 0; }
  .shop-buy-bar-price strong { color: var(--ink, #162b43); font-size: 18px; font-weight: 600; line-height: 1.15; }
  .shop-buy-bar-price span { overflow: hidden; color: var(--muted, #53616e); font-size: 12px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
  .shop-buy-bar-action { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; color: #fff; background: var(--ink, #162b43); border: 0; border-radius: 6px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
  .shop-buy-bar-action .shop-icon { width: 18px; height: 18px; }
  .shop-buy-bar-action:active { transform: scale(.97); }
  .shop-buy-bar-action:focus-visible { outline: 2px solid #155caa; outline-offset: 3px; }
}

/* The journey dial waits until the visitor has scrolled; at the top it would cover the hero controls. */
.scroll-journey { transition: opacity .3s ease, transform .35s cubic-bezier(.22, 1, .36, 1), visibility 0s; }
.scroll-journey.is-resting { opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, 14px) scale(.9); transition: opacity .2s ease, transform .3s ease, visibility 0s linear .3s; }

@media (prefers-reduced-motion: reduce) {
  .shop-dialog-share, .shop-buy-bar, .shop-buy-bar.is-visible, .scroll-journey, .scroll-journey.is-resting { transition: none; }
  .scroll-journey.is-resting { transform: translateX(-50%); }
  .shop-buy-bar-action:active { transform: none; }
}
