/* Emily store and package signup. Loaded after homepage.css and built on its tokens and
   components (card, pill, banner, btn, faq). Phone first. */
.store-page [hidden] { display: none !important; }
.store-page button.btn { cursor: pointer; }
.store-page button.btn:disabled { opacity: .55; cursor: not-allowed; }
.store-page select.input { font: inherit; }

/* A shorter hero than the homepage: the store is the point of this page. */
.product-hero.store-hero { padding-block: 28px 32px; }
.store-hero h1 { font-size: 30px; margin-top: 16px; }
.store-hero .lead { font-size: 16px; margin-top: 12px; }
.store-hero .hero-trust { display: none; margin-top: 20px; }
.store-flow { padding-top: 32px; }
.store-flow h2 { font-size: 1.5rem; margin-bottom: 8px; }
.store-flow h3 { font-size: 1.05rem; margin: 0 0 6px; }
.store-flow h2:focus, .store-flow h3:focus { outline: none; }
.store-step > p { margin-bottom: 0; }
.store-block { margin-top: 28px; }
#account-signed-out { margin-top: 20px; }
.store-flow { scroll-margin-top: 72px; }

/* Steps */
.store-steps { list-style: none; display: flex; gap: 8px; margin: 0 0 24px; padding: 0; scroll-margin-top: 96px; }
.store-steps li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 12px; border: 1px solid var(--gray-200); border-radius: 12px; background: var(--robson-bg); color: var(--gray-600); font-size: .875rem; font-weight: 600; }
.store-steps .n { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 26px; height: 26px; border: 1px solid var(--gray-300); border-radius: 50%; background: #fff; font-size: .8rem; }
.store-steps li.cur { flex: 1; border-color: #99d5d1; background: #f0fdfa; color: var(--robson-navy); }
.store-steps li.cur .n { border-color: var(--robson-teal-ink); background: var(--robson-teal-ink); color: #fff; }
.store-steps li.done .n { border-color: var(--robson-green); background: var(--robson-green); color: var(--robson-navy); }
.store-steps li:not(.cur) .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Layout: the order summary sits beside the steps on wide screens */
.store-layout { display: grid; gap: 24px; }
.store-main { min-width: 0; }

/* Packages */
.store-plans { display: grid; gap: 12px; margin-top: 20px; }
.store-plans + .store-plans { margin-top: 12px; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 2px solid var(--gray-200); border-radius: 16px; background: #fff; cursor: pointer; }
.plan-card input { position: absolute; top: 22px; right: 20px; width: 22px; height: 22px; margin: 0; opacity: 0; cursor: pointer; }
.plan-check { position: absolute; top: 20px; right: 20px; width: 24px; height: 24px; border: 2px solid var(--gray-300); border-radius: 50%; background: #fff; pointer-events: none; }
.plan-card.is-selected { border-color: var(--robson-teal); background: #f0fdfa; }
.plan-card.is-selected .plan-check { border-color: var(--robson-teal-ink); background: var(--robson-teal-ink); box-shadow: inset 0 0 0 4px #fff; }
.plan-card:has(input:focus-visible) { outline: 3px solid var(--robson-blue); outline-offset: 3px; }
.plan-card.is-off { cursor: default; background: var(--robson-bg); }
.plan-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-right: 36px; }
.plan-card.is-off .plan-head { padding-right: 0; }
.plan-name { color: var(--robson-navy); font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
.plan-price strong { color: var(--robson-navy); font-size: 2rem; font-weight: 750; letter-spacing: -.03em; line-height: 1.2; }
.plan-price small { color: var(--gray-600); font-size: .875rem; }
.plan-tokens { color: var(--robson-navy); font-size: .9rem; font-weight: 600; }
.plan-desc { color: var(--gray-600); font-size: .875rem; line-height: 1.5; }

/* Options: add-ons and the terms box */
.store-options { display: grid; gap: 10px; margin-top: 12px; }
.opt-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--gray-200); border-radius: 12px; background: #fff; cursor: pointer; }
.opt-row input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--robson-teal-ink); cursor: pointer; }
.opt-row.is-on { border-color: #99d5d1; background: #f0fdfa; }
.opt-row.is-off { background: var(--robson-bg); cursor: default; }
.opt-row.is-off input { cursor: not-allowed; }
.opt-body { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: .94rem; }
.opt-title { display: flex; justify-content: space-between; gap: 12px; color: var(--robson-navy); font-weight: 650; }
.opt-price { flex: none; font-variant-numeric: tabular-nums; }
#terms-choice { margin: 16px 0; }
#terms-choice .opt-body { display: block; }

/* Fields */
.store-inline { display: flex; flex-wrap: wrap; gap: 10px; }
.store-inline .input { flex: 1 1 200px; }
.input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--gray-300); border-radius: 10px; background: #fff; color: var(--robson-navy); font-size: 1rem; }
.input::placeholder { color: #6b7280; }
.hint { min-height: 1.4em; margin: 8px 0 0; color: var(--gray-600); font-size: .875rem; }
.hint.is-ok { color: #22543d; }
.hint.is-err { color: #9b2c2c; }
#later-block h3 { margin-bottom: 0; }

/* Messages */
.store-page .banner { margin: 0 0 20px; }
.store-page .store-step .banner { margin: 20px 0 0; }
.banner.info { border-color: #cbdce8; background: #eef5fa; color: var(--robson-navy); }
.banner.warn { border-color: #f6d9a8; background: #fffaf0; color: #744210; }
.banner.err { border-color: #f5c2c2; background: #fff5f5; color: #822727; }
.banner.ok { border-color: #b7e4c7; background: #f0fff4; color: #22543d; }
.banner a { color: inherit; font-weight: 650; }
.store-state { display: flex; align-items: center; gap: 12px; padding: 16px 0; color: var(--gray-600); }
.spinner { flex: none; width: 20px; height: 20px; border: 3px solid var(--gray-200); border-top-color: var(--robson-teal-ink); border-radius: 50%; animation: store-spin .8s linear infinite; }
@keyframes store-spin { to { transform: rotate(360deg); } }
#store-retry { margin-bottom: 20px; }

/* Actions */
.store-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.store-actions .btn { flex: 1 1 auto; }
.store-step .hint + .small, .store-step .store-actions + .hint { margin-top: 12px; }
#org-note { margin: 20px 0 0; }
.store-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.store-cta-total { display: grid; min-width: 0; line-height: 1.3; }
.store-cta-total strong { color: var(--robson-navy); font-size: 1rem; }

/* Order summary */
.white-section .card.store-summary { padding: 24px; border: 1px solid var(--gray-200); border-radius: 16px; background: var(--robson-bg); box-shadow: none; }
.store-summary .eyebrow { margin-bottom: 8px; }
.store-summary h3 { font-size: 1.25rem; margin-bottom: 12px; }
.sum-line { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--gray-200); font-size: .94rem; }
.sum-line span:last-child { flex: none; color: var(--robson-navy); font-weight: 600; font-variant-numeric: tabular-nums; }
.sum-line.is-discount span:last-child { color: #22543d; }
.sum-total { padding-top: 14px; border-bottom: 0; color: var(--robson-navy); font-size: 1.1rem; font-weight: 750; }
.store-summary #sum-note { margin: 4px 0 0; }
.sum-trust { display: grid; gap: 8px; list-style: none; margin: 18px 0 0; padding: 18px 0 0; border-top: 1px solid var(--gray-200); font-size: .875rem; }
.sum-trust li { display: flex; gap: 8px; }
.sum-trust li::before { content: '✓'; color: var(--robson-teal-ink); font-weight: 700; }
.store-summary .sum-foot { margin: 16px 0 0; }

/* Billing closed */
.store-closed { display: grid; gap: 20px; align-items: center; margin-bottom: 28px; padding: 24px; border-radius: 20px; background: var(--robson-navy); color: #e5e7eb; outline: 2px solid var(--robson-green); }
.store-closed h2 { margin: 16px 0 8px; color: #fff; font-size: 1.6rem; }
.store-closed p { max-width: 62ch; margin: 0; }
.store-closed :focus-visible { outline-color: #fff; }

/* The package step's action row is a fixed bar on small screens, so the total stays in view. */
@media (max-width: 1023px) {
  .store-cta { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; padding: 10px 16px max(10px, env(safe-area-inset-bottom)); border-top: 1px solid var(--gray-200); background: #fff; box-shadow: 0 -4px 20px rgb(26 54 93 / 8%); }
  .store-cta .btn { flex: none; min-height: 48px; padding: 12px 22px; }
  .has-store-bar { padding-bottom: 76px; }
  html:has(.has-store-bar) { scroll-padding-bottom: 92px; }
}
@media (max-width: 479px) {
  .store-actions .btn { flex: 1 1 100%; }
  .store-actions .btn-outline { order: 2; }
}
@media (min-width: 640px) {
  .product-hero.store-hero { padding-block: 56px 64px; }
  .store-hero h1 { font-size: 40px; margin-top: 24px; }
  .store-hero .lead { font-size: 18px; margin-top: 16px; }
  .store-hero .hero-trust { display: inline-flex; }
  .store-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-actions .btn { flex: 0 1 auto; }
  .store-steps li:not(.cur) .label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .store-steps li { flex: 1; }
}
@media (min-width: 768px) {
  .store-flow { padding-top: 40px; }
  .store-steps { scroll-margin-top: 104px; }
  .store-closed { grid-template-columns: 1fr auto; padding: 32px; }
}
@media (min-width: 1024px) {
  .store-hero h1 { font-size: 48px; }
  .store-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
  .store-layout.is-closed { grid-template-columns: minmax(0, 1fr); }
  .store-layout.is-closed .store-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .store-layout.is-closed .store-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .store-summary { position: sticky; top: 96px; }
  .store-cta { margin-top: 28px; }
  .store-cta-total { display: none; }
}
