/* ============================================================
   SOCIAL PROOF TOAST — Option C
   Compact white card, hairline border + 3px black left bar,
   pulsing GREEN "live" dot on the left, two-line body on the right.
   Promo toasts use the same shell with the dot hidden.
   ============================================================ */

.sp-toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.sp-toast {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-left: 3px solid #0a0a0a;
  border-radius: 4px;
  padding: 0.7rem 0.95rem 0.7rem 0.8rem;
  width: 290px;
  max-width: calc(100vw - 48px);
  pointer-events: auto;
  box-shadow:
    0 10px 28px -10px rgba(0, 0, 0, 0.14),
    0 2px 4px rgba(0, 0, 0, 0.04);

  /* Slide in from the left edge */
  opacity: 0;
  transform: translateX(calc(-100% - 32px));
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.3s ease-out;
  will-change: transform, opacity;
}

.sp-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.sp-toast:not(.is-visible) {
  opacity: 0;
  transform: translateX(calc(-100% - 32px));
  transition:
    transform 0.35s cubic-bezier(0.55, 0, 0.85, 0.25),
    opacity 0.2s ease-in;
}

/* Live-activity dot — green, with a soft pulsing halo radiating outward.
   Same canonical "live signal" pattern used by IG Live, Spaces, etc. */
.sp-toast__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: spLivePing 1.6s ease-out infinite;
}

@keyframes spLivePing {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .sp-toast__dot { animation: none; box-shadow: 0 0 0 3px rgba(34,197,94,0.18); }
}

.sp-toast__body {
  flex: 1;
  min-width: 0;
}

.sp-toast__line1 {
  font-size: 0.78rem;
  color: #525252;
  margin-bottom: 0.1rem;
  letter-spacing: -0.005em;
}

.sp-toast__line2 {
  font-size: 0.85rem;
  color: #0a0a0a;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.sp-toast__line2 strong {
  font-weight: 700;
}

/* Separator + time are wrapped in .sp-toast__meta so they wrap as one unit —
   no more "ago" stranded alone on its own line. */
.sp-toast__meta { white-space: nowrap; }

.sp-toast__sep {
  color: #a3a3a3;
  margin: 0 0.35rem;
}

.sp-toast__time {
  color: #a3a3a3;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

/* Promo variant — hides the live dot, uses italic line1 as a kicker */
.sp-toast--promo .sp-toast__dot { display: none; }
.sp-toast--promo .sp-toast__line1 {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: #0a0a0a;
  margin-bottom: 0.2rem;
}

/* Mobile */
@media (max-width: 480px) {
  .sp-toast-container {
    left: 8px;
    right: 8px;
    bottom: 16px;
  }
  .sp-toast {
    width: auto;
  }
}
