/* Reactions bar: bottom row on phones, left-edge column on desktop. */

.reactions {
  position: absolute;
  left: 50%;
  bottom: calc(6px + var(--safe-b));
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(9, 11, 28, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  z-index: 4;
}
.reaction-btn {
  position: relative;
  width: 46px; height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.45rem;
  line-height: 1;
  transition: transform 0.1s ease, background 0.15s ease, opacity 0.2s ease;
}
.reaction-btn:hover { background: rgba(255, 255, 255, 0.14); }
.reaction-btn:active { transform: scale(0.86); }
.reaction-btn.is-fired .reaction-emoji { display: inline-block; animation: reaction-fly 0.5s ease-out; }
.reaction-btn.is-like { background: rgba(255, 0, 110, 0.22); box-shadow: 0 0 14px rgba(255, 0, 110, 0.5); }
.reactions.is-cooling .reaction-btn { opacity: 0.55; }
.reaction-key { position: absolute; right: -2px; bottom: -3px; min-width: 16px; padding: 0 3px; font-size: 0.54rem; background: #0a0b1c; }
.reactions.no-keys .reaction-key { display: none; }
@keyframes reaction-fly {
  0% { transform: none; }
  40% { transform: translateY(-26px) scale(1.5) rotate(-12deg); opacity: 0.9; }
  100% { transform: none; }
}

/* Small phones: six 46 px buttons + gaps must fit 320 px. */
@media (max-width: 350px) {
  .reaction-btn { width: 42px; height: 42px; font-size: 1.3rem; }
  .reactions { gap: 4px; }
}

@media (orientation: landscape) and (min-width: 700px) {
  .reactions {
    left: max(12px, var(--safe-l));
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: column;
    border-radius: 28px;
  }
}

/* Phone landscape: six buttons in one column do not fit 375 px beside the top bar; they start below it, smaller. */
@media (orientation: landscape) and (min-width: 700px) and (max-height: 500px) {
  .reactions {
    top: calc(var(--topbar-h) + var(--safe-t) + 4px);
    transform: none;
    gap: 3px;
    padding: 4px;
  }
  .reaction-btn { width: 38px; height: 38px; font-size: 1.15rem; }
}
