/* ================================================================
   Solo — Celebration / Submitted (Cream redesign, v2.0.0)
   Calm SubmittedView replaces confetti.
   First-bill celebration kept (calm version, no confetti).
   ================================================================ */

/* ── Claim splash (magic-link entry) ───────────────────────── */
/* Full-screen welcome moment when a customer arrives via a
   share-link claim token. Cream stage, animated mark dot
   "switching" from off to on, greeting, bill row, saving counter. */
.claim-splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  animation: claim-splash-fade-in 320ms ease-out forwards;
  font-family: 'Inter Tight', system-ui, sans-serif;
  color: var(--ink);
}
.claim-splash.dismissing {
  animation: claim-splash-fade-out 500ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.claim-splash-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 380px;
  width: 100%;
}

.claim-splash-mark {
  width: 88px;
  height: 88px;
  color: var(--ink);
  opacity: 0;
  transform: scale(0.85);
  animation: claim-splash-mark-in 620ms 200ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  /* GPU-promote so the animation stays smooth even on slower iPhones */
  will-change: transform, opacity;
}
.claim-splash-mark-dot {
  /* Animate transform (GPU-accelerated) instead of cx for smoothness */
  transform: translateX(0);
  animation: claim-splash-dot-toggle 900ms 1100ms cubic-bezier(0.45, 0, 0.55, 1) forwards;
  will-change: transform;
}

.claim-splash-greet {
  margin: 28px 0 6px;
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.012em;
  color: var(--ink);
  opacity: 0;
  transform: translateY(10px);
  animation: claim-splash-greet-in 520ms 600ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.claim-splash-greet em {
  font-style: italic;
  color: var(--accent);
}

.claim-splash-tag {
  margin: 0 0 36px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
  opacity: 0;
  animation: claim-splash-fade-in 400ms 980ms ease-out forwards;
}

.claim-splash-bill {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'Instrument Serif', serif;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.005em;
  color: var(--ink);
  opacity: 0;
  transform: translateY(8px);
  animation: claim-splash-bill-in 540ms 1200ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.claim-splash-bill-from { color: var(--ink-3); }
.claim-splash-bill-arrow {
  font-size: 20px;
  color: var(--accent);
  font-style: normal;
}
.claim-splash-bill-to { color: var(--ink); }

.claim-splash-save {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0;
  animation: claim-splash-fade-in 480ms 1700ms ease-out forwards;
}
.claim-splash-save-num {
  font-family: 'Instrument Serif', serif;
  font-size: 64px;
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.claim-splash-save-unit {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

@keyframes claim-splash-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes claim-splash-fade-out {
  /* Settle outward with a tiny scale — feels less like a hard cut */
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.985); }
}
@keyframes claim-splash-mark-in {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes claim-splash-dot-toggle {
  /* Toggle the mark's coral dot from "off" (cx=32.6) to "on" (cx=67.4)
     by translating 34.8 SVG units. transform is GPU-accelerated so this
     stays buttery on iPhones, where animating cx jitters. */
  from { transform: translateX(0); }
  to   { transform: translateX(34.8px); }
}
@keyframes claim-splash-greet-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes claim-splash-bill-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .claim-splash,
  .claim-splash-mark,
  .claim-splash-greet,
  .claim-splash-tag,
  .claim-splash-bill,
  .claim-splash-save {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .claim-splash-mark-dot {
    animation: none !important;
    transform: translateX(34.8px) !important;
  }
}


/* Keep confetti canvas selector so old code that references it is harmless */
.confetti-canvas {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 300;
  display: none; /* Disabled per new design */
}

/* ── Legacy celebration (kept as a quiet variant) ───────────── */
.celebration {
  text-align: center;
  padding: var(--space-10) var(--space-6) var(--space-8);
  animation: celebration-in 400ms var(--ease-sheet);
}
@keyframes celebration-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.celebration-check {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--good);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-6);
  animation: check-in 360ms var(--ease-sheet) 100ms both;
}
.celebration-check .sf-icon svg {
  width: 32px; height: 32px;
  color: white;
  stroke-width: 3;
}
@keyframes check-in {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.celebration-amount {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 54px;
  font-weight: 400;
  color: var(--good);
  letter-spacing: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  animation: count-reveal 360ms var(--ease-tap) 220ms both;
}
@keyframes count-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.celebration-label {
  font-size: 16px;
  color: var(--ink-2);
  margin-top: var(--space-2);
  animation: fade-up 360ms var(--ease-tap) 360ms both;
}

.celebration-timeline {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  margin-top: var(--space-8);
  text-align: left;
  animation: fade-up 360ms var(--ease-tap) 480ms both;
}
.celebration-timeline h4 {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.celebration-timeline p {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
}
.celebration-ref {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 8px;
  font-family: var(--font-mono);
}
.celebration-cta {
  margin-top: var(--space-6);
  animation: fade-up 360ms var(--ease-tap) 600ms both;
}

/* ── First Bill Celebration (calm) ─────────────────────────── */
.first-bill-celebration {
  text-align: center;
  padding: var(--space-10) var(--space-6) var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 300ms var(--ease-tap), transform 300ms var(--ease-tap);
}
.first-bill-celebration.visible {
  opacity: 1;
  transform: scale(1);
}
.first-bill-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--good);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-5);
  animation: check-in 360ms var(--ease-sheet) 100ms both;
}
.first-bill-icon .sf-icon svg {
  width: 32px; height: 32px;
  color: white;
  stroke-width: 3;
}
.first-bill-saving {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 54px;
  font-weight: 400;
  color: var(--good);
  letter-spacing: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--space-2);
  animation: count-reveal 360ms var(--ease-tap) 220ms both;
}
.first-bill-title {
  font-size: 17px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: var(--space-3);
  animation: fade-up 360ms var(--ease-tap) 400ms both;
}
.first-bill-sub {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 320px;
  margin: 0 auto;
  animation: fade-up 360ms var(--ease-tap) 400ms both;
}
.first-bill-actions {
  margin-top: var(--space-8);
  width: 100%;
  max-width: 300px;
  display: flex; flex-direction: column; gap: var(--space-3);
  animation: fade-up 360ms var(--ease-tap) 560ms both;
}

/* fade-up shared keyframe (used by onboarding too) */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
