/* FRPPR — shopper invites: the gift ticket, the /i/:code landing page, the welcome sheet
   and the account "Invite friends" panel. Tokens come from site.css. */

/* ─── The gift ticket: a strip of measuring tape you can hand to a friend ─── */
.inv-ticket {
  position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 18px;
  padding: 22px 28px 30px; border-radius: 22px; background: var(--tape); color: var(--ink); overflow: hidden; isolation: isolate;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 22px 44px -26px rgba(20, 17, 14, .55);
}
/* Punched notches on both edges. */
.inv-ticket::before, .inv-ticket::after {
  content: ''; position: absolute; top: 42%; width: 24px; height: 24px; border-radius: 50%;
  background: var(--inv-notch, var(--paper)); transform: translateY(-50%); z-index: 1;
}
.inv-ticket::before { inset-inline-start: -12px; }
.inv-ticket::after { inset-inline-end: -12px; }
/* Tape markings: a tick every 6px, a longer one every 30px. */
.inv-ticket-ticks {
  position: absolute; inset-inline: 0; bottom: 0; height: 14px; pointer-events: none; opacity: .55;
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px 30px) bottom / 100% 14px no-repeat,
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 6px) bottom / 100% 7px no-repeat;
}
.inv-ticket-months { grid-row: span 2; font-size: clamp(64px, 16vw, 88px); font-weight: 800; line-height: .82; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.inv-ticket-title { align-self: end; font-size: 20px; font-weight: 800; line-height: 1.15; }
.inv-ticket-sub { align-self: start; font-size: 14px; font-weight: 600; opacity: .78; }
.inv-ticket.is-small { padding: 16px 22px 24px; border-radius: 18px; }
.inv-ticket.is-small .inv-ticket-months { font-size: 54px; }
.inv-ticket.is-small .inv-ticket-title { font-size: 17px; }

/* ─── /i/:code ─── */
.invite-page { max-width: 560px; margin-inline: auto; padding-block: clamp(24px, 6vw, 56px) 72px; }
.invite-page .inv-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 28px 0 10px; padding: 6px 12px; border-radius: 999px; background: rgba(47, 122, 85, .12); color: var(--sage); font-size: 14px; font-weight: 700; }
.invite-page h1 { margin: 0 0 12px; font-size: clamp(30px, 7vw, 42px); line-height: 1.08; letter-spacing: -.02em; }
.invite-page .inv-lede { margin: 0 0 22px; color: var(--muted); font-size: 17px; line-height: 1.55; max-width: 52ch; }
.inv-perks { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 12px; }
.inv-perks li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; font-size: 16px; line-height: 1.45; }
.inv-perks svg { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--ink); color: var(--tape); fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.inv-perks strong { display: block; }
.inv-perks span { color: var(--muted); font-size: 14.5px; }
.inv-actions { display: grid; gap: 10px; }
.inv-fine { margin: 16px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; text-align: center; }
.inv-skeleton { height: 150px; border-radius: 22px; background: linear-gradient(90deg, var(--bone), #fffaf0, var(--bone)); background-size: 200% 100%; animation: inv-shimmer 1.4s var(--ease) infinite; }
@keyframes inv-shimmer { to { background-position: -200% 0; } }

/* ─── Welcome sheet after a claim ─── */
.inv-scrim { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: end center; padding: 16px; background: rgba(20, 17, 14, .46); animation: inv-fade .32s var(--ease); }
@media (min-width: 640px) { .inv-scrim { place-items: center; } }
.inv-sheet { --inv-notch: #fffdf8; position: relative; width: min(100%, 440px); padding: 26px 24px 22px; border-radius: 24px; background: #fffdf8; color: var(--ink); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .55); animation: inv-rise .5s var(--ease); text-align: center; }
.inv-sheet .inv-ticket { text-align: start; margin-bottom: 20px; }
.inv-sheet h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.2; }
.inv-sheet p { margin: 0 auto 18px; color: var(--muted); max-width: 36ch; line-height: 1.55; }
.inv-sheet .inv-actions { margin-top: 4px; }
.inv-close { position: absolute; top: 10px; inset-inline-end: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }
.inv-close:hover { background: var(--bone); color: var(--ink); }
/* A small burst of tape-yellow and green dots, once. */
.inv-burst { position: absolute; top: 46px; left: 50%; width: 0; height: 0; pointer-events: none; }
.inv-burst i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--tape); opacity: 0; animation: inv-dot .9s var(--ease) .15s forwards; }
.inv-burst i:nth-child(even) { background: var(--sage); width: 6px; height: 6px; }
@keyframes inv-dot { 0% { opacity: 1; transform: translate(0, 0) scale(.4); } 100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(1); } }
@keyframes inv-fade { from { opacity: 0; } }
@keyframes inv-rise { from { opacity: 0; transform: translateY(24px) scale(.98); } }

/* ─── Time left on an account's invite offer ─── */
.inv-timer { display: grid; justify-items: center; gap: 2px; margin: 0 0 16px; padding: 14px 16px; border-radius: 16px; background: var(--ink); color: var(--bone); text-align: center; }
.inv-timer span { font-size: 13.5px; opacity: .8; }
.inv-timer b { font-family: var(--mono); font-size: 32px; font-weight: 700; letter-spacing: .04em; color: var(--tape); font-variant-numeric: tabular-nums; direction: ltr; }
.inv-timer small { font-size: 12.5px; opacity: .7; }
.inv-sheet .inv-link { margin-top: 4px; }

/* ─── Account: Invite friends ─── */
.inv-panel .inv-ticket { margin: 4px 0 18px; }
.inv-link { display: flex; gap: 8px; align-items: stretch; margin-bottom: 12px; }
.inv-link .input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 15px; direction: ltr; text-align: left; }
.inv-share { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.inv-share .btn { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }
.inv-share svg { width: 18px; height: 18px; fill: currentColor; }
.inv-progress { margin: 0 0 6px; display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.inv-progress b { font-variant-numeric: tabular-nums; }
.inv-steps { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 6px; margin-bottom: 18px; }
.inv-steps i { height: 8px; border-radius: 999px; background: var(--line); }
.inv-steps i.is-on { background: var(--sage); }
.inv-steps i.is-wait { background: rgba(244, 196, 48, .7); }
.inv-friends { list-style: none; margin: 0 0 14px; padding: 0; border-top: 1px solid var(--line); }
.inv-friends li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.inv-friends small { display: block; color: var(--muted); font-size: 13px; }
.inv-claim { display: flex; gap: 8px; margin-top: 8px; }
.inv-claim .input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .12em; font-family: var(--mono); direction: ltr; }

/* ─── Sign-up banner on /shop ─── */
.inv-banner { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin: 0 0 16px; padding: 12px 14px; border-radius: 14px; background: rgba(244, 196, 48, .26); color: var(--ink); font-size: 14.5px; line-height: 1.4; }
.inv-banner b.inv-banner-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--tape); font-size: 22px; font-weight: 800; }
.inv-banner button { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; border-radius: 50%; }

@media (prefers-reduced-motion: reduce) {
  .inv-scrim, .inv-sheet, .inv-burst i, .inv-skeleton { animation: none; }
  .inv-burst { display: none; }
}
