/* The sample visit recording on the Online store page (art.mjs replayMock,
   js/replay.js). Drawn at 520 by 400 and sized in em off the box width, so
   1em is a tenth of the 520 wide design wherever it sits. */
.rp { width: 100%; max-width: 520px; margin: 0 auto; container-type: inline-size; }
.rp-in { font-size: 10px; font-size: calc(100cqw / 52); width: 52em; height: 40em; position: relative; display: flex; flex-direction: column; background: #fff; border-radius: 1.6em; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,0.06), 0 3em 6em -3em rgba(0,0,0,0.3); color: #1D1D1F; text-align: left; }

.rp-top { padding: 1.2em 1.6em; border-bottom: 1px solid #F3F4F6; }
.rp-top b { display: block; font-size: 1.3em; font-weight: 600; color: #111827; }
.rp-top span { display: block; margin-top: 0.2em; font-size: 1.05em; color: #9CA3AF; }

.rp-stage { flex: 1; min-height: 0; background: #F3F4F6; padding: 1.2em; }
.rp-page { position: relative; height: 100%; background: #fff; border-radius: 0.8em; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
/* A page change is a jump, as in a real recording: the old page goes at
   once and the new one fades in, so the two never blend. */
.rp-p { position: absolute; inset: 0; opacity: 0; }
.rp[data-page="1"] .rp-p1, .rp:not([data-page]) .rp-p1, .rp[data-page="2"] .rp-p2, .rp[data-page="3"] .rp-p3 { opacity: 1; transition: opacity 0.25s ease; }

.rp-head { display: flex; align-items: center; gap: 1.4em; padding: 0.9em 1.4em; border-bottom: 1px solid #F0F0F2; }
.rp-head b { font-size: 1.25em; letter-spacing: -0.02em; margin-right: auto; color: #1F513A; }
.rp-head span { font-size: 1em; color: #6E6E73; }
.rp-head .rp-cart { background: #1F513A; color: #fff; padding: 0.35em 0.8em; border-radius: 99px; font-weight: 600; }
.rp-count { font-style: normal; display: inline-block; }
.rp-count.bump { animation: rpBump 0.45s ease; }
@keyframes rpBump { 40% { transform: scale(1.6); } }

.rp-hero { margin: 0.8em 1.2em 0; height: 7.4em; border-radius: 0.9em; background-size: cover; background-position: center 40%; position: relative; overflow: hidden; display: flex; align-items: flex-end; }
.rp-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 30, 20, 0.82), rgba(10, 30, 20, 0.15)); }
.rp-hero > div { position: relative; padding: 1em 1.2em; color: #fff; max-width: 70%; }
.rp-hero strong { display: block; font-size: 1.35em; line-height: 1.12; letter-spacing: -0.03em; }
.rp-hero span { display: block; margin-top: 0.3em; font-size: 0.95em; opacity: 0.85; }

.rp-cats { display: flex; gap: 0.5em; padding: 0.8em 1.2em 0; }
.rp-cats span { padding: 0.35em 0.8em; border-radius: 99px; background: #F2F2F4; color: #6E6E73; font-size: 0.95em; font-weight: 500; transition: background 0.25s, color 0.25s; }
.rp-cats span.on, .rp[data-cat="snacks"] .rp-snk { background: #1F513A; color: #fff; }
.rp[data-cat="snacks"] .rp-pop { background: #F2F2F4; color: #6E6E73; }

.rp-grids { position: relative; height: 9.4em; margin: 0.8em 1.2em 0; }
.rp-grid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8em; transition: opacity 0.3s ease; }
.rp-g2, .rp[data-cat="snacks"] .rp-g1 { opacity: 0; }
.rp[data-cat="snacks"] .rp-g2 { opacity: 1; }
.rp-prod { position: relative; min-width: 0; }
.rp-prod .rp-art { height: 5.4em; border-radius: 0.7em; background: #F4F4F6; display: flex; align-items: center; justify-content: center; }
.rp-prod .rp-art .prod { height: 76%; width: auto; max-width: 84%; object-fit: contain; }
.rp-prod b { display: block; margin-top: 0.45em; font-size: 0.9em; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-prod span { font-size: 0.9em; color: #6E6E73; }
.rp-prod em { position: absolute; top: 5.1em; right: 0.5em; font-style: normal; font-size: 0.8em; font-weight: 700; color: #1F513A; background: #fff; padding: 0.3em 0.8em; border-radius: 99px; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.rp[data-added] .rp-target em { background: #1F513A; color: #fff; }

.rp-co { max-width: 30em; margin: 0 auto; padding: 1.3em 1.6em; }
.rp-co h4 { margin: 0 0 0.7em; font-size: 1.4em; font-weight: 700; letter-spacing: -0.02em; }
.rp-toggle { display: inline-flex; padding: 0.25em; border-radius: 99px; background: #F2F2F4; }
.rp-toggle span { padding: 0.35em 1.1em; border-radius: 99px; font-size: 0.95em; color: #6E6E73; }
.rp-toggle span.on { background: #fff; color: #1D1D1F; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.rp-line { display: flex; align-items: center; gap: 0.8em; margin-top: 1em; font-size: 1em; }
.rp-line .rp-art { width: 3.2em; height: 3.2em; flex: none; border-radius: 0.6em; background: #F4F4F6; display: flex; align-items: center; justify-content: center; }
.rp-line .rp-art .prod { height: 80%; width: auto; max-width: 80%; object-fit: contain; }
.rp-line > span:nth-child(2) { flex: 1; }
.rp-line small { display: block; font-size: 0.85em; color: #6E6E73; }
.rp-sum { display: flex; justify-content: space-between; margin-top: 1em; padding-top: 0.8em; border-top: 1px solid #F0F0F2; font-size: 0.95em; }
.rp-sum span { color: #6E6E73; }
.rp-pay { margin-top: 1em; padding: 0.75em; border-radius: 99px; background: #1F513A; color: #fff; text-align: center; font-size: 1.05em; font-weight: 700; }

.rp-done { display: flex; flex-direction: column; align-items: center; gap: 0.5em; padding-top: 4em; text-align: center; }
.rp-check { width: 3.6em; height: 3.6em; border-radius: 50%; background: #16A34A; display: flex; align-items: center; justify-content: center; }
.rp-check svg { width: 60%; height: 60%; }
.rp-done strong { font-size: 1.6em; letter-spacing: -0.02em; }
.rp-done span { font-size: 1em; color: #6E6E73; }

.rp-toast { position: absolute; top: 4.2em; right: 1.4em; padding: 0.45em 0.9em; border-radius: 0.6em; background: #1D1D1F; color: #fff; font-size: 0.95em; font-weight: 500; opacity: 0; transform: translateY(-0.4em); transition: opacity 0.25s, transform 0.25s; }
.rp[data-toast] .rp-toast { opacity: 1; transform: none; }

/* The player's own cursor: a purple dot that rings when it clicks. */
.rp-mouse { position: absolute; left: 47%; top: 45%; width: 1.4em; height: 1.4em; margin: -0.7em 0 0 -0.7em; border-radius: 50%; background: #9700E3; opacity: 0.8; box-shadow: 0 0 0 0.4em rgba(151, 0, 227, 0.25); transition: left var(--mv, 0.9s) cubic-bezier(0.45, 0.05, 0.25, 1), top var(--mv, 0.9s) cubic-bezier(0.45, 0.05, 0.25, 1), box-shadow 0.2s, opacity 0.4s; z-index: 2; }
.rp.rp-jump * { transition: none !important; }
.rp-mouse.click { box-shadow: 0 0 0 0.8em rgba(151, 0, 227, 0.35); }
.rp-mouse.gone { opacity: 0; }

.rp-bar { position: relative; display: flex; align-items: center; gap: 1em; padding: 1em 1.6em; border-top: 1px solid #F3F4F6; }
.rp-play { width: 3.2em; height: 3.2em; flex: none; border-radius: 50%; background: #660099; display: flex; align-items: center; justify-content: center; }
.rp-play svg { width: 45%; height: 45%; }
.rp-t, .rp-total { width: 3.4em; flex: none; font-size: 1.05em; font-variant-numeric: tabular-nums; }
.rp-t { color: #6B7280; text-align: right; }
.rp-total { color: #9CA3AF; }
.rp-track { position: relative; flex: 1; height: 0.55em; border-radius: 99px; background: #E5E7EB; }
.rp-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 13%); border-radius: 99px; background: #660099; }
.rp-fill::after { content: ''; position: absolute; right: -0.7em; top: 50%; width: 1.4em; height: 1.4em; margin-top: -0.7em; border-radius: 50%; background: #660099; }
.rp-speed { flex: none; padding: 0.25em 0.5em; border: 1px solid #E5E7EB; border-radius: 0.6em; font-size: 0.95em; font-weight: 600; color: #4B5563; }
.rp-skip { position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%); white-space: nowrap; padding: 0.35em 1em; border-radius: 99px; background: #1D1D1F; color: #fff; font-size: 1em; font-weight: 500; box-shadow: 0 0.4em 1em rgba(0,0,0,0.2); opacity: 0; transition: opacity 0.2s; }
.rp-skip b { font-weight: 500; margin-right: 0.2em; }
.rp[data-skip] .rp-skip { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .rp-p, .rp-p1, .rp-p2, .rp-p3, .rp-grid, .rp-mouse, .rp-toast, .rp-skip, .rp-cats span { transition: none !important; }
  .rp-count.bump { animation: none; }
}
