/* Reaction buttons (heart + bookmark). Self-contained, no external deps.
   Progressive enhancement: renders fine as static markup; reactions.js wires
   counts + toggle. Theme-neutral, inherits page font/colors where possible. */

.reactions {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin: 0;
  font: inherit;
}

.reactions .reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: border-color 0.15s ease, background-color 0.15s ease,
    color 0.15s ease, transform 0.08s ease;
}

.reactions .reaction-btn:hover {
  border-color: rgba(128, 128, 128, 0.7);
  background: rgba(128, 128, 128, 0.08);
}

.reactions .reaction-btn:active {
  transform: scale(0.94);
}

.reactions .reaction-btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.reactions .reaction-icon {
  font-size: 1rem;
  line-height: 1;
  filter: grayscale(1);
  opacity: 0.7;
  transition: filter 0.15s ease, opacity 0.15s ease;
}

.reactions .reaction-count {
  font-variant-numeric: tabular-nums;
  min-width: 1ch;
  text-align: left;
}

/* Active (this session has reacted) */
.reactions .reaction-btn[aria-pressed="true"] {
  border-color: transparent;
}

.reactions .reaction-btn[data-action="heart"][aria-pressed="true"] {
  color: #e0245e;
  background: rgba(224, 36, 94, 0.12);
}

.reactions .reaction-btn[data-action="bookmark"][aria-pressed="true"] {
  color: #1d9bf0;
  background: rgba(29, 155, 240, 0.12);
}

.reactions .reaction-btn[aria-pressed="true"] .reaction-icon {
  filter: none;
  opacity: 1;
}

/* In-flight: dim slightly, keep clickable state visually stable */
.reactions .reaction-btn[data-busy="true"] {
  opacity: 0.6;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .reactions .reaction-btn,
  .reactions .reaction-icon {
    transition: none;
  }
}
