/* Social Feed — Spectator reactions + polls */

/* ── Container ── */
.social-container {
  padding: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.social-section {
  margin-bottom: 24px;
}

/* ── Headers ── */
.social-feed-header {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-feed-empty {
  color: #64748b;
  font-style: italic;
  text-align: center;
  padding: 16px;
}

/* ── Tab Button ── */
.social-tab-btn {
  position: relative;
}

.social-tab-btn::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  animation: socialPulse 2s infinite;
}

@keyframes socialPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── React Buttons ── */
.social-react-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.social-react-btn {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.social-react-btn:hover {
  background: #334155;
  transform: scale(1.2);
  border-color: #60a5fa;
}

.social-react-btn:active,
.social-react-btn-pulse {
  transform: scale(1.4);
  background: #3b82f6;
}

/* ── Reaction Counts ── */
.social-reaction-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.social-reaction-badge {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 14px;
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.social-reaction-badge strong {
  color: #60a5fa;
}

.social-no-reactions {
  color: #475569;
  font-size: 12px;
}

/* ── Reaction Toast ── */
.social-reaction-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b;
  border: 1px solid #3b82f6;
  border-radius: 12px;
  padding: 8px 20px;
  font-size: 18px;
  color: #e2e8f0;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.social-reaction-toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.social-reaction-toast-fade {
  opacity: 0;
  transform: translateX(-50%) translateY(-20px);
}

/* ── Recent Feed ── */
.social-feed-list {
  max-height: 300px;
  overflow-y: auto;
}

.social-feed-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid #1e293b;
  animation: socialSlideIn 0.3s ease;
}

@keyframes socialSlideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.social-feed-emoji {
  font-size: 20px;
  flex-shrink: 0;
}

.social-feed-agent {
  color: #60a5fa;
  font-weight: 600;
  flex: 1;
}

.social-feed-time {
  color: #64748b;
  font-size: 12px;
  flex-shrink: 0;
}

/* ── Polls ── */
.social-poll-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.social-poll-question {
  font-size: 15px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 4px 0;
}

.social-poll-timer {
  font-size: 12px;
  color: #64748b;
  display: block;
  margin-bottom: 12px;
}

.social-poll-option {
  position: relative;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 6px;
  overflow: hidden;
  transition: border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.social-poll-option:hover {
  border-color: #60a5fa;
}

.social-poll-option.social-poll-voted {
  border-color: #22c55e;
}

.social-poll-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(59, 130, 246, 0.15);
  transition: width 0.5s ease;
  border-radius: 8px 0 0 8px;
}

.social-poll-label {
  position: relative;
  z-index: 1;
  color: #e2e8f0;
  font-weight: 500;
}

.social-poll-pct {
  position: relative;
  z-index: 1;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
}

/* ── Stats Grid ── */
.social-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.social-stat-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}

.social-stat-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.social-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #f1f5f9;
}

.social-stat-label {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Agent React Cards ── */
.social-agent-react-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}

.social-agent-name {
  font-size: 15px;
  font-weight: 700;
  color: #60a5fa;
  margin-bottom: 6px;
}

/* ── Dark Mode ── */
[data-theme="light"] .social-react-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

[data-theme="light"] .social-react-btn:hover {
  background: #e2e8f0;
}

[data-theme="light"] .social-reaction-badge {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
}

[data-theme="light"] .social-poll-card,
[data-theme="light"] .social-agent-react-card,
[data-theme="light"] .social-stat-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

[data-theme="light"] .social-poll-option {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .social-feed-header {
  color: #1e293b;
}

[data-theme="light"] .social-poll-question {
  color: #0f172a;
}

[data-theme="light"] .social-reaction-toast {
  background: #ffffff;
  border-color: #3b82f6;
  color: #1e293b;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .social-container {
    padding: 8px;
  }

  .social-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .social-react-buttons {
    gap: 2px;
  }

  .social-react-btn {
    padding: 6px 10px;
    font-size: 20px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .social-feed-list {
    max-height: 200px;
  }

  .social-poll-option {
    padding: 12px;
    min-height: 44px;
  }
}
