/* Emoji reaction bar + floating pops (public/reactions.js). Keynote dark look from theme.css. */

.reaction-bar {
  position: fixed;
  left: 50%;
  bottom: calc(12px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 55;
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(28, 28, 30, 0.82);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.reaction-bar[hidden] { display: none; }

.reaction-btn {
  width: var(--tap);
  height: var(--tap);
  min-width: var(--tap);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease), background 0.2s var(--ease);
  touch-action: manipulation;
}
.reaction-btn:active { transform: scale(0.9); }
.reaction-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.reaction-btn:disabled { opacity: 0.45; cursor: default; }
.reaction-btn.pop { animation: reaction-btn-pop 0.35s var(--ease); opacity: 1; background: #3a3a3c; }

@keyframes reaction-btn-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Keep game content clear of the bar while it's showing. */
body.has-reactions { padding-bottom: calc(76px + var(--safe-bottom)); }

.reaction-pop {
  position: fixed;
  bottom: calc(72px + var(--safe-bottom));
  z-index: 54;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
  transform: translateX(-50%);
  animation: reaction-float 1.5s var(--ease) forwards;
}
.reaction-pop-emoji { font-size: 36px; line-height: 1; }
.reaction-pop-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes reaction-float {
  0% { opacity: 0; transform: translate(-50%, 20px) scale(0.6); }
  15% { opacity: 1; transform: translate(-50%, 0) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -38vh) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .reaction-btn.pop { animation: none; }
  .reaction-pop { animation: reaction-fade 1.5s linear forwards; }
  @keyframes reaction-fade { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }
}

@media (max-width: 340px) {
  .reaction-bar { gap: 4px; padding: 4px; }
}
