/* #74 gold prepaid card, its one-off cut-scene, and tap feedback.
   Motion uses transform and opacity only so low-end phones stay smooth. */
:root {
  --gold-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --gold-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --gold-face: linear-gradient(135deg, #f7e7b0 0%, #e2c072 34%, #f5dfa0 52%, #c99a45 100%);
  --gold-ink: #2e1e0c;
  --gold-edge: #b0853a;
}

/* Gold card: static (no endless shimmer, which drains batteries). Text stays dark brown for contrast. */
.coffee-card.is-gold {
  background: var(--gold-face);
  border: 1px solid var(--gold-edge);
  color: var(--gold-ink);
  box-shadow: 0 10px 24px -12px rgba(120, 80, 20, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.coffee-card.is-gold > .eyebrow { color: var(--gold-ink); font-weight: 700; letter-spacing: 1.6px; }
.coffee-card.is-gold .show-card { border-top-color: rgba(46, 30, 12, 0.45); color: var(--gold-ink); }

/* Cut-scene: ~2.3s total, tap anywhere or Skip to end it. */
.gold-scene {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 24px; border: 0; background: rgba(28, 18, 8, 0.94); color: #fff7e2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  overflow: hidden; cursor: pointer;
  animation: gold-fade-in 180ms var(--gold-ease-out) both;
}
.gold-scene::backdrop { background: transparent; }
.gold-scene.leaving { animation: gold-fade-out 200ms var(--gold-ease-out) both; }
.gold-skip {
  position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px;
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 247, 226, 0.4);
  background: transparent; color: #fff7e2; font: 600 0.875rem var(--cc-font-body); cursor: pointer;
}
.gold-skip:focus-visible { outline: 3px solid #fbe3a0; outline-offset: 2px; }

@keyframes gold-fade-in { from { opacity: 0; } }
@keyframes gold-fade-out { to { opacity: 0; } }
@keyframes gold-caption-in { from { transform: translateY(8px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .gold-scene, .gold-scene.leaving { animation-duration: 1ms !important; }
}

/* Pressed state on every tappable control. Counter keeps no scale motion (fast repeated use). */
button,.btn,.provider-button,.show-card,.text-btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
body:not([data-role="staff"]) :is(.btn, .round-btn, .provider-button, .gold-skip, .show-card) {
  transition: transform 120ms var(--gold-ease-out), opacity 120ms ease;
}
body:not([data-role="staff"]) :is(.btn, .round-btn, .provider-button, .gold-skip, .show-card):active:not(:disabled) {
  transform: scale(0.97);
}
:is(button, .btn, .text-btn):active:not(:disabled) { opacity: 0.82; }
body[data-role="staff"] :is(.btn, .counter-option):active:not(:disabled) { opacity: 0.7; }
@media (prefers-reduced-motion: reduce) {
  body:not([data-role="staff"]) :is(.btn, .round-btn, .provider-button, .gold-skip, .show-card):active:not(:disabled) { transform: none; }
}

/* Loading state: the pressed control keeps its label and gains a spinner. */
.is-loading { cursor: progress !important; }
.is-loading:disabled { opacity: 1; }
.is-loading::after, .inline-spinner {
  content: ""; display: inline-block; flex: none;
  width: 1em; height: 1em; margin-left: 0.55em; vertical-align: -0.15em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: tap-spin 650ms linear infinite;
}
.wallet-button.is-loading { position: relative; }
.wallet-button.is-loading img { opacity: 0.55; }
.wallet-button.is-loading::after { position: absolute; right: 14px; top: 50%; margin: -0.5em 0 0; color: var(--cc-ink); }
.inline-spinner { margin: 0 10px 0 0; }
@keyframes tap-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .is-loading::after, .inline-spinner { animation: tap-pulse 1.2s ease-in-out infinite; border-right-color: currentColor; }
}
@keyframes tap-pulse { 50% { opacity: 0.35; } }

/* Wallet: the platform's wallet first, the other one tap away. */
.wallet-button[hidden] { display: none !important; }
.wallet-actions:has(.wallet-button[hidden]) { grid-template-columns: minmax(0, 1fr); }

/* Sign-in: a clear "check your email" moment. */
.email-sent {
  display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px; padding: 14px 16px;
  border-radius: var(--cc-radius-panel); background: #e4efd9; color: #24401c; border: 1px solid #b9d2a5;
  animation: gold-caption-in 220ms var(--gold-ease-out) both;
}
.email-sent strong { display: block; font-size: 1.0625rem; }
.email-sent p { margin: 2px 0 0; font-size: 0.875rem; line-height: 1.45; }
.sent-check { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #3f7a33; color: #fff; font-weight: 800; }
.signin-note.is-error { color: #a3271b; font-weight: 600; }

/* Checkout return: visible progress until the signed payment lands. */
.checkout-confirming { display: flex; align-items: center; margin-bottom: 14px; }

/* Toasts say what happened: success gets a tick, errors stay longer and read as errors. */
#toast[data-kind="success"]::before { content: "✓"; margin-right: 8px; font-weight: 800; color: #b9e3a5; }
#toast[data-kind="error"] { background: #7d2017; color: #fff; }
@media (prefers-reduced-motion: reduce) { .email-sent { animation: none; } }
