/* Social proof activity popup (ProveSource-style) for the Creator Shout landing page.
   Mobile-first. Desktop positioning below. Owned by Builder 1 (popup design + animation).
   Round 2: true notification density (85-95px tall), tighter type, subtler brand accents. */

.sp-popup {
  --sp-violet: #58009d;
  --sp-violet-bright: #8b5cf6;
  --sp-navy: #0e0e28;
  --sp-border: #e6e1f5;

  position: fixed;
  z-index: 9990;
  left: 12px;
  right: 12px;
  bottom: 12px;

  display: flex;
  align-items: center;
  gap: 10px;

  background: #ffffff;
  color: var(--sp-navy);
  border-radius: 12px;
  border: 1px solid var(--sp-border);
  box-shadow: 0 10px 30px rgba(14, 14, 40, 0.18), 0 2px 6px rgba(14, 14, 40, 0.10);
  padding: 10px 34px 10px 10px;

  font-family: inherit;
  text-align: left;

  /* hidden state */
  transform: translateY(24px) scale(0.98);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.3s ease,
    visibility 0s linear 0.38s;
}

/* visible state: slides up and fades in */
.sp-popup.show {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.3s ease,
    visibility 0s;
}

/* Logo badge on the left. The logo art sits on black, so the badge is deep navy;
   the brand gradient lives here as a thin ring instead of a top strip. */
.sp-popup-logo {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  padding: 2px;
  background: linear-gradient(135deg, var(--sp-violet), var(--sp-violet-bright));
}

.sp-popup-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  background: var(--sp-navy);
}

.sp-popup-body {
  flex: 1 1 auto;
  min-width: 0;
}

.sp-popup-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  color: var(--sp-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-popup-msg {
  font-size: 12px;
  line-height: 1.35;
  color: rgba(14, 14, 40, 0.72);
  margin-top: 1px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sp-popup-time {
  font-size: 10px;
  line-height: 1.3;
  color: rgba(14, 14, 40, 0.48);
  margin-top: 3px;
}

/* Optional per-type accent tag in the timestamp row. Tiny, on-brand,
   hidden unless the caller passes opts.tag. */
.sp-popup-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 6px;
  color: var(--sp-violet-bright);
  white-space: nowrap;
}
.sp-popup-tag[hidden] {
  display: none;
}
.sp-popup-tag::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
  background: var(--sp-violet-bright);
  vertical-align: 1px;
}
.sp-popup-tag[data-kind="sale"] {
  color: #3f8a44;
}
.sp-popup-tag[data-kind="sale"]::before {
  background: #88b96f;
}
.sp-popup-tag[data-kind="order"] {
  color: #3f8a44;
}
.sp-popup-tag[data-kind="order"]::before {
  background: #88b96f;
}

.sp-popup-close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(14, 14, 40, 0.45);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.sp-popup-close:hover {
  color: var(--sp-violet);
  background: rgba(139, 92, 246, 0.12);
}

.sp-popup-close:focus-visible {
  outline: 2px solid var(--sp-violet-bright);
  outline-offset: 1px;
}

/* desktop: fixed bottom-left card, ~340px wide */
@media (min-width: 640px) {
  .sp-popup {
    left: 24px;
    right: auto;
    bottom: 24px;
    width: 340px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sp-popup {
    transition: opacity 0.15s ease, visibility 0s linear 0.15s;
    transform: none;
  }
  .sp-popup.show {
    transition: opacity 0.15s ease, visibility 0s;
    transform: none;
  }
}
