/*
 * Task #1393334 — Social Proof Ticker Bar
 * Fills gap between header and trust bar on high-intent pages.
 * Two-zone layout: stats strip (top) + activity ticker (bottom).
 * White background, emerald accents — Fortune 500 feel.
 */

/* ── Container ─────────────────────────────────────────────────────────── */
.spt-wrap {
  background: #FFFFFF;
  border-top: 1px solid #F1F3F5;
  border-bottom: 1px solid #E5E7EB;
}

/* ── Zone 1: Stats Strip ────────────────────────────────────────────────── */
.spt-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  padding: 10px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid #F3F4F6;
  background: #FAFBFC;
}

.spt-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 20px;
  position: relative;
}

.spt-stat + .spt-stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 18px;
  width: 1px;
  background: #E5E7EB;
}

.spt-stat-emoji {
  font-size: 0.95rem;
  line-height: 1;
  flex-shrink: 0;
}

.spt-stat-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.spt-stat-num {
  font-size: 1rem;
  font-weight: 800;
  color: #00875A; /* emerald */
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.spt-stat-label {
  font-size: 0.68rem;
  font-weight: 500;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ── Zone 2: Activity Ticker ────────────────────────────────────────────── */
.spt-ticker-zone {
  display: flex;
  align-items: center;
  padding: 0 clamp(12px, 3vw, 40px);
  height: 36px;
  overflow: hidden;
  position: relative;
}

/* Left fade overlay */
.spt-ticker-zone::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 60px;
  background: linear-gradient(to right, #FFFFFF, transparent);
  z-index: 2;
  pointer-events: none;
}

/* Right fade overlay */
.spt-ticker-zone::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 60px;
  background: linear-gradient(to left, #FFFFFF, transparent);
  z-index: 2;
  pointer-events: none;
}

.spt-ticker-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #9CA3AF;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 14px;
  position: relative;
  z-index: 3;
  padding-left: 4px;
}

/* Animated live dot */
.spt-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22C55E;
  flex-shrink: 0;
  animation: spt-pulse 2s ease-in-out infinite;
}

@keyframes spt-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0); }
}

/* Scrolling track */
.spt-ticker-outer {
  overflow: hidden;
  flex: 1;
  position: relative;
}

.spt-ticker-track {
  display: flex;
  gap: 0;
  animation: spt-scroll 35s linear infinite;
  width: max-content;
  will-change: transform;
}

.spt-ticker-track:hover {
  animation-play-state: paused;
}

@keyframes spt-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Individual ticker item */
.spt-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 24px 0 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: #374151;
  white-space: nowrap;
  line-height: 36px;
}

.spt-item::after {
  content: '·';
  color: #D1D5DB;
  margin-left: 24px;
  font-size: 1rem;
}

.spt-item-emoji {
  font-size: 0.85rem;
}

.spt-item-name {
  font-weight: 700;
  color: #111827;
}

.spt-item-amount {
  font-weight: 700;
  color: #00875A;
}

.spt-item-time {
  font-size: 0.72rem;
  color: #9CA3AF;
  font-weight: 400;
  margin-left: 2px;
}

/* ── Mobile adjustments ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .spt-stats {
    gap: 0;
    padding: 8px 16px;
    justify-content: space-around;
  }

  .spt-stat {
    padding: 4px 10px;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
  }

  .spt-stat + .spt-stat::before {
    display: none;
  }

  .spt-stat-emoji {
    display: none;
  }

  .spt-stat-num {
    font-size: 0.9rem;
  }

  .spt-stat-label {
    font-size: 0.6rem;
  }

  .spt-ticker-label {
    display: none;
  }

  .spt-ticker-zone::before {
    width: 24px;
  }

  .spt-ticker-zone::after {
    width: 24px;
  }

  .spt-item {
    font-size: 0.76rem;
    padding-right: 20px;
  }
}

/* ── Fade-in entrance ───────────────────────────────────────────────────── */
.spt-wrap {
  animation: spt-fadein 0.4s ease both;
}

@keyframes spt-fadein {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
