/* Store app: connection pill, "may be outdated" labels, blocked-checkout note. */

.lm-conn {
  position: fixed;
  inset-block-start: calc(env(safe-area-inset-top, 0px) + 10px);
  inset-inline: 0;
  margin-inline: auto;
  width: fit-content;
  max-width: calc(100% - 32px);
  z-index: 130;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #1f2937;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.22);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-12px) scale(0.96);
  transition:
    opacity var(--sf-dur-ui, 220ms) ease,
    transform var(--sf-dur-ui, 220ms) var(--sf-ease-spring, cubic-bezier(0.2, 0.9, 0.3, 1.2));
}
.lm-conn[hidden] { display: none; }
.lm-conn.is-in { opacity: 1; transform: none; }
.lm-conn.is-online { background: #047857; }
.lm-conn__dot { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; flex: none; }
.lm-conn.is-online .lm-conn__dot { background: #a7f3d0; }

/* Prices, availability and order totals shown from a saved copy. */
html.lm-offline :is(
  .sf-menu__item-price-block,
  .sf-product-price,
  .sf-retail-row__price-block,
  .sf-pdp-price-row,
  .sf-menu__pdp-price-row,
  .sf-menu__item-stock,
  .lm-order-totals,
  .sf-order-summary,
  .sf-cart-drawer-totals-card
)::after {
  content: var(--lm-outdated-label, "");
  display: block;
  flex-basis: 100%;
  margin-block-start: 2px;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  color: var(--sf-muted, var(--store-muted, #64748b));
  opacity: 0.85;
}

.lm-conn-note {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
}
.sf-checkout-form.is-offline-blocked [data-checkout-mobile-cta],
.sf-checkout-form.is-offline-blocked #sf-checkout-submit { opacity: 0.55; }

@media (prefers-reduced-motion: reduce) {
  .lm-conn { transition: opacity 80ms linear; transform: none; }
}
