/* The screen after a plan switches on (public/welcome.js). Not a modal card:
   the whole page, like the landing. Left, what happened in the landing's
   Satoshi; right, the receipt of the payment feeding out of a slot, and the
   owner's stamp landing on it. Blue is the stamp's ink and the one action. */
.wl-lock, .wl-lock body { overflow: hidden; }
.wl {
  position: fixed; inset: 0; z-index: 1400; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); color: var(--text);
  animation: wl-fade .28s ease both;
}
/* One soft pool of light under the receipt, so the paper sits on something. */
.wl::before {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(42% 52% at 72% 54%, var(--panel) 0%, transparent 70%);
}
.wl:focus, .wl:focus-visible { outline: none; box-shadow: none; }
.wl.is-leaving { opacity: 0; transition: opacity .2s ease; }

.wl-close {
  position: absolute; top: var(--s4); right: var(--s4); z-index: 2; min-height: 36px; padding: 0 var(--s3);
  font: inherit; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer;
  background: transparent; border: 1px solid transparent; border-radius: var(--r);
}
.wl-close:hover { color: var(--text); border-color: var(--border); }

.wl-stage {
  position: relative; min-height: 100dvh; width: min(100%, 1080px); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center;
  gap: var(--s6); padding: var(--s7) var(--s6);
}

/* ---- left: what happened ---- */
.wl-kicker { margin: 0 0 var(--s3); font-size: 13px; font-weight: 500; color: var(--muted); animation: wl-up .5s ease .1s both; }
.wl-title {
  margin: 0; font-family: 'Satoshi', var(--font); font-weight: 600;
  font-size: clamp(40px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -.035em; text-wrap: balance;
}
.wl-word { display: inline-block; white-space: pre; animation: wl-word .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(.16s + var(--w) * .07s); }
.wl-sub { margin: var(--s3) 0 0; max-width: 34ch; font-size: 17px; line-height: 1.5; color: var(--text-2); text-wrap: pretty; animation: wl-up .6s ease .5s both; }

.wl-opens { margin-top: var(--s6); max-width: 520px; }
.wl-head { margin: 0 0 var(--s2); font-size: 13px; font-weight: 500; color: var(--muted); animation: wl-up .5s ease .62s both; }
.wl-perks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--s5); }
.wl-perks li { padding: 10px 0; border-top: 1px solid var(--border); font-size: 15px; line-height: 1.4; animation: wl-up .5s ease both; animation-delay: calc(.7s + var(--i) * .06s); }

.wl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); margin-top: var(--s6); animation: wl-up .5s ease 1s both; }
.wl-btn {
  display: inline-flex; align-items: center; gap: var(--s2); min-height: 48px; padding: 0 var(--s4) 0 var(--s5);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  color: var(--accent-fg); background: var(--accent-btn); border: 0; border-radius: var(--r);
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), filter .18s ease;
}
.wl-btn:hover { filter: brightness(1.08); }
.wl-btn:hover .wl-arrow { transform: translateX(3px); }
.wl-btn:active { transform: scale(.98); }
.wl-arrow { display: inline-block; transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.wl-link {
  min-height: 44px; padding: 0; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
  color: var(--text-2); background: none; border: 0; text-decoration: underline; text-decoration-color: var(--border-2); text-underline-offset: 4px;
}
.wl-link:hover { color: var(--text); text-decoration-color: currentColor; }

/* ---- right: the receipt ---- */
.wl-receipt { position: relative; margin: 0; justify-self: center; width: 344px; animation: wl-up .6s ease .2s both; }
/* the printer's mouth the paper comes out of */
.wl-slot {
  position: relative; z-index: 1; height: 14px; margin: 0 -10px; border-radius: var(--r-sm);
  background: var(--slot, #3A3D46); box-shadow: 0 1px 0 var(--border-2), 0 10px 24px -12px rgba(18, 22, 33, .5);
}
.wl-slot::after { content: ""; position: absolute; left: 14px; right: 14px; top: 6px; height: 2px; border-radius: 1px; background: rgba(0, 0, 0, .55); }
.wl-feed { position: relative; margin: -7px 6px 0; padding-bottom: 24px; overflow: hidden;
  filter: drop-shadow(0 0 1px rgba(18, 22, 33, .22)) drop-shadow(0 14px 18px rgba(18, 22, 33, .12)); }
.wl-paper {
  --paper: #FFFFFF; --ink: #1A1A19; --ink-2: #575752; --stamp: #2E4BDB;
  position: relative; padding: 26px 22px 30px; background: var(--paper); color: var(--ink);
  font-family: var(--mono); font-size: 13px; line-height: 22px;
  /* a torn, serrated bottom edge */
  -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 / 14px 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 / 14px 7px repeat-x;
}
.wl-paper p { margin: 0; }
.wl-paper.is-waiting { transform: translateY(-101%); }
.wl-thanks { color: var(--ink-2); margin-top: 2px !important; }
.wl-shop { text-align: center; font-family: 'Satoshi', var(--font); font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.wl-meta { text-align: center; color: var(--ink-2); }
.wl-rule { overflow: hidden; white-space: nowrap; color: #A9A9A3; margin: 8px 0 !important; line-height: 12px; }
.wl-row { display: flex; justify-content: space-between; gap: var(--s3); }
.wl-row > span:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wl-row.is-quiet { color: var(--ink-2); }
.wl-row.is-total { margin-top: 4px; font-weight: 600; font-size: 13px; }
.wl-ref { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.wl-bars { display: flex; justify-content: flex-start; gap: 1px; height: 34px; margin: 24px 0 10px; }
.wl-bars span.is-ink { background: var(--ink); }

/* the owner's stamp: ink on paper, so it keeps the light theme's blue */
.wl-stamp {
  position: absolute; right: 16px; bottom: 64px; display: grid; justify-items: center; gap: 1px;
  padding: 7px 14px 6px; color: var(--stamp); border: 2px solid var(--stamp); border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--stamp);
  transform: rotate(-7deg); opacity: 0; mix-blend-mode: multiply; pointer-events: none;
}
.wl-stamp-word { font-family: 'Satoshi', var(--font); font-weight: 800; font-size: 18px; line-height: 1; letter-spacing: .01em; }
.wl-stamp-date { font-size: 10px; line-height: 12px; letter-spacing: .04em; }
.is-stamped .wl-stamp { opacity: .92; animation: wl-stamp .9s linear(0, 0.04, 0.135, 0.261, 0.399, 0.536, 0.662, 0.772, 0.863, 0.934, 0.988, 1.025, 1.049, 1.062, 1.066, 1.064, 1.059, 1.05, 1.041, 1.032, 1.024, 1.016, 1.01, 1.005, 1.001, 0.999, 0.997, 0.996, 0.996, 0.996, 0.996, 0.997, 0.997, 0.998, 0.998, 0.999, 1) both; }
.is-stamped .wl-paper { animation: wl-thud .32s ease-out .1s; }

:root[data-theme="dark"] .wl-paper { --paper: #ECECE7; }
:root[data-theme="dark"] .wl-slot { --slot: #2B2E36; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wl-paper { --paper: #ECECE7; }
  :root:not([data-theme="light"]) .wl-slot { --slot: #2B2E36; }
}

@keyframes wl-fade { from { opacity: 0; } }
@keyframes wl-up { from { opacity: 0; transform: translateY(10px); } }
@keyframes wl-word { from { opacity: 0; transform: translateY(.35em); filter: blur(8px); } }
@keyframes wl-stamp { from { opacity: 0; transform: rotate(-7deg) scale(1.9); } to { opacity: .92; transform: rotate(-7deg) scale(1); } }
@keyframes wl-thud { 40% { transform: translateY(3px); } }

@media (max-width: 860px) {
  .wl-stage { grid-template-columns: minmax(0, 1fr); gap: 0; align-content: start; padding: 64px var(--s4) 132px; }
  .wl-perks { grid-template-columns: 1fr; }
  .wl-copy { display: contents; }
  .wl-kicker { order: 1; } .wl-title { order: 2; } .wl-sub { order: 3; }
  .wl-receipt { order: 4; margin-top: var(--s6); }
  .wl-opens { order: 5; }
  .wl-title { font-size: clamp(36px, 10vw, 48px); }
  .wl-sub { font-size: 16px; }
  .wl-receipt { width: min(100% - 20px, 320px); }
  .wl-paper { font-size: 12px; line-height: 20px; }
  .wl-opens { margin-top: var(--s5); max-width: none; }
  .wl-actions {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; margin: 0; gap: var(--s3);
    padding: var(--s5) var(--s5) calc(var(--s3) + env(safe-area-inset-bottom));
    background: linear-gradient(transparent, var(--bg) 28%);
  }
  .wl-btn { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .wl, .wl-kicker, .wl-word, .wl-sub, .wl-head, .wl-perks li, .wl-actions, .wl-receipt,
  .is-stamped .wl-stamp, .is-stamped .wl-paper { animation: none; }
  .wl-word { filter: none; }
}
