/* Reactions modal — "who reacted" list. Matches the neon-pink dark theme. */

.reactions-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.reactions-modal[aria-hidden="false"] {
  pointer-events: auto;
}

.reactions-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 180ms ease;
}

.reactions-modal[aria-hidden="false"] .reactions-modal__backdrop {
  opacity: 1;
}

.reactions-modal__panel {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  max-height: min(640px, calc(100vh - 64px));
  background: #1a0d1f;
  border: 1px solid rgba(236, 72, 153, 0.35);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(236, 72, 153, 0.18), 0 0 0 1px rgba(236, 72, 153, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(8px) scale(0.985);
  opacity: 0;
  transition: transform 200ms ease, opacity 200ms ease;
}

.reactions-modal[aria-hidden="false"] .reactions-modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.reactions-modal__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(236, 72, 153, 0.18);
}

.reactions-modal__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ec4899;
  letter-spacing: 0.3px;
}

.reactions-modal__count {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  font-weight: 500;
  margin-left: 2px;
}

.reactions-modal__close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 120ms ease;
}

.reactions-modal__close:hover {
  color: #ec4899;
}

.reactions-modal__list {
  overflow-y: auto;
  flex: 1;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(236, 72, 153, 0.3) transparent;
}

.reactions-modal__list::-webkit-scrollbar {
  width: 6px;
}

.reactions-modal__list::-webkit-scrollbar-thumb {
  background: rgba(236, 72, 153, 0.3);
  border-radius: 3px;
}

.reactions-modal__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background-color 120ms ease;
}

.reactions-modal__row:hover {
  background: rgba(236, 72, 153, 0.1);
}

.reactions-modal__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(236, 72, 153, 0.6);
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
}

.reactions-modal__avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #ec4899;
  font-size: 1rem;
  background: rgba(236, 72, 153, 0.1);
}

.reactions-modal__row-text {
  flex: 1;
  min-width: 0;
}

.reactions-modal__row-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.reactions-modal__row-handle {
  color: rgba(236, 72, 153, 0.85);
  font-size: 0.78rem;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reactions-modal__hint {
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
}

.reactions-modal__badge {
  background: #ec4899;
  color: #000;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.4px;
}

.reactions-modal__sentinel {
  height: 1px;
  width: 100%;
}

.reactions-modal__loading {
  display: flex;
  justify-content: center;
  padding: 16px;
}

/* HTML `hidden` defaults to `display: none` but our explicit `display: flex`
   above overrides it, so the spinner kept spinning after the fetch finished.
   These [hidden] rules make the JS `el.hidden = true` actually hide them. */
.reactions-modal__loading[hidden],
.reactions-modal__empty[hidden] {
  display: none !important;
}

.reactions-modal__spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(236, 72, 153, 0.3);
  border-top-color: #ec4899;
  border-radius: 50%;
  animation: reactions-modal-spin 0.7s linear infinite;
}

@keyframes reactions-modal-spin {
  to { transform: rotate(360deg); }
}

.reactions-modal__empty {
  padding: 32px 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.reactions-modal__error {
  padding: 24px 16px;
  text-align: center;
  color: #ff7a7a;
  font-size: 0.9rem;
}

body.reactions-modal-open {
  overflow: hidden;
}

/* Tappable count cursor — applied via the trigger class below. */
.js-reactor-trigger {
  cursor: pointer;
  user-select: none;
}

.js-reactor-trigger:hover {
  color: #ec4899;
}
