/* ============================================================
   SOCIAL PROOF TOAST — Dark glass terminal aesthetic
   ============================================================ */

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

.sp-toast {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 14px;
  padding: 16px 18px;
  max-width: min(340px, calc(100vw - 48px));
  pointer-events: auto;
  position: relative;
  overflow: hidden;

  /* Entry state */
  opacity: 0;
  transform: translateY(16px) translateX(-8px) scale(0.96);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);

  /* Subtle outer glow */
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(59, 130, 246, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

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

/* Blue accent line on left edge */
.sp-toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, #3b82f6, #8b5cf6);
  border-radius: 2px;
  opacity: 0;
  animation: accentReveal 0.4s ease 0.3s forwards;
}

@keyframes accentReveal {
  to { opacity: 1; }
}

/* Progress bar — counts down at the bottom */
.sp-toast::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 0 0 14px 14px;
  width: 100%;
  transform-origin: left;
  animation: progressCountdown 5s linear forwards;
  opacity: 0.7;
}

@keyframes progressCountdown {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* Icon */
.sp-toast__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.sp-toast__icon--listing {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.sp-toast__icon--stat {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.sp-toast__icon--free {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.15);
}

/* Content */
.sp-toast__content {
  flex: 1;
  min-width: 0;
}

.sp-toast__title {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.3;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-toast__text {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}

.sp-toast__time {
  font-size: 10px;
  color: #475569;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Pulsing dot before time */
.sp-toast__time::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #3b82f6;
  animation: timeDot 2s ease-in-out infinite;
}

@keyframes timeDot {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; box-shadow: 0 0 4px rgba(59, 130, 246, 0.4); }
}


/* Exit animation */
.sp-toast:not(.is-visible) {
  opacity: 0;
  transform: translateY(8px) translateX(-12px) scale(0.94);
  transition: all 0.35s cubic-bezier(0.4, 0, 1, 1);
}

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

  .sp-toast {
    max-width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    gap: 8px;
  }

  .sp-toast__icon {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }

  .sp-toast__text-name {
    font-size: 0.75rem;
  }

  .sp-toast__text-detail {
    font-size: 0.65rem;
  }

  .sp-toast__time {
    font-size: 0.55rem;
  }
}
