/* The thank-you receipt (public/js/receipt.js). A shop changes its look with these colours only. */
.rc {
  --rc-backdrop: rgb(10 10 12 / .5); --rc-card: #f2f2f5; --rc-printer: #1c1c1f; --rc-printer-ink: #f5f5f7; --rc-slot: #050506;
  --rc-paper: #fff; --rc-ink: #1d1d1f; --rc-sub: #6e6e73; --rc-rule: #d9d9de; --rc-accent: #30d158; --rc-btn: #1d1d1f; --rc-btn-ink: #fff;
  --rc-font: inherit; --rc-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: var(--rc-backdrop);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-family: var(--rc-font); color: var(--rc-ink);
  animation: rc-in 220ms ease-out both;
}
.rc.rc-out { animation: rc-fade 200ms ease-in both; }
@keyframes rc-in { from { opacity: 0; } }
@keyframes rc-fade { to { opacity: 0; } }
:root.rc-lock, :root.rc-lock body { overflow: hidden; }
.rc-card { position: relative; width: min(380px, 100%); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; scrollbar-width: none;
  background: var(--rc-card); border-radius: 28px; padding: 18px 18px 16px; box-shadow: 0 30px 80px rgb(0 0 0 / .28);
  animation: rc-pop 320ms cubic-bezier(.23, 1, .32, 1) both; }
.rc-card::-webkit-scrollbar { display: none; }
@keyframes rc-pop { from { transform: translateY(14px) scale(.97); opacity: 0; } }
.rc-x { position: absolute; inset-block-start: 10px; inset-inline-start: 10px; z-index: 3; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: transparent; color: var(--rc-sub); font-size: 22px; line-height: 1; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity 200ms; }
.rc-done .rc-x { opacity: 1; pointer-events: auto; }

/* the printer: a dark block with a status line and the slot the paper comes out of */
.rc-printer { position: relative; z-index: 2; margin-top: 26px; background: var(--rc-printer); color: var(--rc-printer-ink); border-radius: 18px;
  padding: 14px 18px 22px; box-shadow: inset 0 1px 0 rgb(255 255 255 / .08), 0 8px 18px rgb(0 0 0 / .18); }
.rc-status { display: flex; align-items: center; gap: 10px; min-height: 22px; }
.rc-title { margin: 0; font: inherit; font-size: 14px; font-weight: 600; }
.rc-light { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #ff9f0a; box-shadow: 0 0 10px #ff9f0a; animation: rc-blink 700ms steps(2, jump-none) infinite; }
.rc-done .rc-light { background: var(--rc-accent); box-shadow: 0 0 10px var(--rc-accent); animation: none; }
@keyframes rc-blink { 50% { opacity: .35; } }
.rc-slot { position: absolute; inset-inline: 7%; bottom: 8px; height: 6px; border-radius: 6px; background: var(--rc-slot); box-shadow: inset 0 2px 3px rgb(0 0 0 / .8); }

/* the paper: hidden inside the printer, fed out by receipt.js; a torn zigzag edge at the bottom */
.rc-feed { position: relative; z-index: 1; margin: -11px 10% 0; overflow: hidden; padding-bottom: 2px; }
.rc-paper { transform: translateY(-100%); background: var(--rc-paper); color: var(--rc-ink); padding: 22px 16px 22px; font-size: 13px; line-height: 1.5;
  font-variant-numeric: tabular-nums; box-shadow: inset 0 10px 10px -8px rgb(0 0 0 / .25);
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 7px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 12px 7px repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - 7px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 12px 7px repeat-x; }
.rc-done .rc-paper { transform: none; }
.rc-head { display: grid; gap: 2px; text-align: center; padding-bottom: 12px; border-bottom: 1px dashed var(--rc-rule); }
.rc-shop { font-size: 16px; }
.rc-head small, .rc-name small { color: var(--rc-sub); font-size: 11.5px; }
.rc-items { display: grid; gap: 9px; padding: 12px 0; border-bottom: 1px dashed var(--rc-rule); }
.rc-item { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.rc-name { display: grid; min-width: 0; overflow-wrap: anywhere; }
.rc-sum { white-space: nowrap; }
.rc-totals { display: grid; gap: 4px; padding-top: 10px; }
.rc-row { display: flex; justify-content: space-between; gap: 12px; color: var(--rc-sub); }
.rc-row.rc-off { color: var(--rc-ink); }
.rc-row.rc-total { color: var(--rc-ink); font-weight: 700; font-size: 15px; margin-top: 4px; }
.rc-foot { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--rc-sub); }
.rc-bar { display: grid; justify-items: center; gap: 4px; margin-top: 12px; }
.rc-bar svg { width: 72%; height: 34px; fill: var(--rc-ink); }
.rc-ltr { direction: ltr; unicode-bidi: isolate; }
.rc-code { font-family: var(--rc-mono); letter-spacing: .06em; }
.rc-bar > span { font-size: 11px; color: var(--rc-sub); }

/* what to do next: shows once the paper is out */
.rc-actions { display: grid; gap: 8px; margin-top: 16px; opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity 260ms ease-out, transform 260ms cubic-bezier(.23, 1, .32, 1); }
.rc-done .rc-actions { opacity: 1; transform: none; pointer-events: auto; }
.rc-btn { height: 48px; border: 0; border-radius: 14px; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; background: rgb(120 120 128 / .14); color: var(--rc-ink);
  transition: transform 140ms ease-out; }
.rc-btn:active { transform: scale(.97); }
.rc-btn.rc-primary { background: var(--rc-btn); color: var(--rc-btn-ink); }
.rc-btn:focus-visible, .rc-x:focus-visible { outline: 2px solid var(--rc-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .rc, .rc-card, .rc-light { animation: none; } .rc-actions { transition: none; } }
@media print { .rc { position: static; background: none; backdrop-filter: none; } .rc-printer, .rc-actions, .rc-x { display: none; } .rc-card { box-shadow: none; background: none; } }
