/* Emoji Reaction System */

/* Floating emoji button in bottom left of content area */
.emoji-reaction-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: var(--content-max-width, 700px);
  width: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 0 24px;
  pointer-events: none;
}

.emoji-reaction-container > * {
  pointer-events: auto;
}

/* Main trigger button */
.emoji-trigger {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.emoji-trigger:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), 0 3px 8px rgba(0, 0, 0, 0.15);
}

.emoji-trigger:active {
  transform: scale(0.95);
}

.emoji-trigger.expanded {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Emoji picker panel */
.emoji-picker {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.emoji-picker.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* Individual emoji buttons */
.emoji-option {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.emoji-option:hover {
  background: rgba(102, 126, 234, 0.1);
  transform: scale(1.2);
}

.emoji-option:active {
  transform: scale(1.1);
}

/* Pulse animation for recent reactions */
.emoji-option.pulse {
  animation: emojiPulse 0.4s ease;
}

@keyframes emojiPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
}

/* Floating emoji animation (TikTok-style) */
.emoji-stream {
  position: fixed;
  pointer-events: none;
  z-index: 999;
  font-size: 40px;
  opacity: 0;
  will-change: transform, opacity;
}

@keyframes emojiFloat {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.5) rotate(0deg);
  }
  10% {
    opacity: 1;
    transform: translate(var(--drift-x), -50px) scale(1) rotate(var(--rotate));
  }
  50% {
    opacity: 0.9;
    transform: translate(calc(var(--drift-x) * 2), -250px) scale(1.1) rotate(calc(var(--rotate) * 2));
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--drift-x) * 2.5), -400px) scale(0.8) rotate(calc(var(--rotate) * 3));
  }
}

.emoji-stream.floating {
  animation: emojiFloat 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Reaction count badge */
.reaction-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  min-width: 18px;
  text-align: center;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  
  .emoji-trigger {
    width: 52px;
    height: 52px;
    font-size: 26px;
    padding-bottom: 2px;
  }
  
  .emoji-option {
    width: 44px;
    height: 44px;
    font-size: 28px;
  }
  
  .emoji-picker {
    gap: 6px;
    padding: 10px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .emoji-trigger,
  .emoji-picker,
  .emoji-option {
    transition: none;
  }
  
  .emoji-stream.floating {
    animation-duration: 1.5s;
  }
}
