/* ==========================================================================
   Social-proof toast tray + toasts
   Rides the Amnt dark theme (tokens from protrade.css).
   ========================================================================== */

/* fixed bottom-right tray, above the footer, below the sidebar drawer */
.sp-tray {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
  width: calc(100% - 44px);
  pointer-events: none; /* toasts don't trap clicks */
}

.sp-toast {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(17,28,48,.96), rgba(11,18,32,.96));
  border: 1px solid var(--pt-line, rgba(148,163,184,.14));
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.8);
  backdrop-filter: blur(10px);
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px) scale(.97);
  transition: opacity .45s ease, transform .45s cubic-bezier(.16,1,.3,1), border-color .3s;
  font-size: 13.5px;
  color: var(--pt-text-2, #a8bad9);
}
.sp-toast.is-in { opacity: 1; transform: translateY(0) scale(1); }
.sp-toast.is-out { opacity: 0; transform: translateY(10px) scale(.96); }

/* left accent rail per type */
.sp-toast::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
}
.sp-deposit::before  { background: var(--pt-cyan, #22d3ee); }
.sp-register::before { background: var(--pt-indigo, #6366f1); }
.sp-withdraw::before { background: var(--pt-gold, #fbbf24); }
.sp-faucet::before   { background: var(--pt-violet, #a855f7); }

.sp-toast__icon {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 17px;
}
.sp-deposit  .sp-toast__icon { background: rgba(34,211,238,.14);  color: #67e8f9; border: 1px solid rgba(34,211,238,.3); }
.sp-register .sp-toast__icon { background: rgba(99,102,241,.14);  color: #a5b4fc; border: 1px solid rgba(99,102,241,.3); }
.sp-withdraw .sp-toast__icon { background: rgba(251,191,36,.14);  color: #fde68a; border: 1px solid rgba(251,191,36,.3); }
.sp-faucet   .sp-toast__icon { background: rgba(168,85,247,.16);  color: #d8b4fe; border: 1px solid rgba(168,85,247,.34); }

.sp-toast__text { flex: 1; min-width: 0; line-height: 1.35; }
.sp-toast__text b { color: var(--pt-text, #e8eefb); font-weight: 700; }
.sp-toast__country { color: var(--pt-text-3, #6b7f9e); font-size: 12px; }
.sp-toast__verb { color: var(--pt-text-2, #a8bad9); }
.sp-toast__amount {
  color: var(--pt-success, #34d399);
  font-family: var(--pt-mono, "JetBrains Mono", monospace);
  font-weight: 700;
}
.sp-faucet .sp-toast__amount { color: #d8b4fe; }

.sp-toast__time {
  flex: none;
  font-size: 10.5px;
  color: var(--pt-text-3, #6b7f9e);
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
  text-transform: uppercase;
}

/* pulse on the faucet icon — the viral moment */
.sp-faucet .sp-toast__icon { animation: spPulse 2.2s ease-in-out infinite; }
@keyframes spPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(168,85,247,0); }
  50%     { box-shadow: 0 0 0 6px rgba(168,85,247,.18); }
}

/* responsive */
@media (max-width: 768px) {
  .sp-tray { right: 12px; bottom: 12px; max-width: calc(100% - 24px); }
  .sp-toast { font-size: 12.5px; padding: 11px 12px; }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .sp-toast { transition: none; opacity: 1; transform: none; }
  .sp-faucet .sp-toast__icon { animation: none; }
}
