/* .rx-btn och .rx-spin flyttade till pulse-hovercard.css 2026-07-26
   (kortet beror pa dem och maste kunna laddas ensamt). */
/* ==========================================================================
   FORRE.NU — Pulse Wall Reactions (pulse-reactions.js)
   Facebook-liknande reaktioner för väggen: väljare på hover, reaktions-ansikten,
   "vilka reagerade"-modal och kontaktkort på hover. Bygger på tokens i
   forre_pulse.css (--card/--ink/--line/--accent/--dim/--r) → funkar ljust + mörkt.
   ========================================================================== */

/* ---- Vald reaktion på Gilla-knappen (bild 3) ---------------------------- */
.act .act-emo { font-size: 16px; line-height: 1; display: inline-block; }
.act.on[data-reaction] { color: var(--react-color, var(--accent)) !important; }
.act.on[data-reaction] svg { fill: var(--react-color, var(--accent)); stroke: var(--react-color, var(--accent)); }

/* ---- Reaktions-ansikten vid antalet (bild "1") -------------------------- */
.pc-l[data-reactors] { cursor: pointer; }
.pc-l[data-reactors]:hover [data-lc] { text-decoration: underline; }
.pc-faces { display: inline-flex; align-items: center; }
.pc-face {
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-grid; place-items: center; font-size: 11px; line-height: 1;
  background: var(--card); box-shadow: 0 0 0 1.5px var(--card); margin-left: -4px;
}
.pc-face:first-child { margin-left: 0; }

/* ---- Reaktionsväljare på hover (bild 2) --------------------------------- */
.rx-picker {
  position: absolute; z-index: 100040; display: none; gap: 2px;
  padding: 6px 8px; background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
}
.rx-picker.open { display: flex; }
.rx-opt {
  width: 46px; height: 46px; border: 0; background: transparent; cursor: pointer;
  border-radius: 50%; display: grid; place-items: center; padding: 0;
  transition: transform .12s ease;
}
.rx-opt-emo { font-size: 27px; line-height: 1; transition: transform .12s ease; transform-origin: bottom center; }
.rx-opt:hover { transform: translateY(-8px); }
.rx-opt:hover .rx-opt-emo { transform: scale(1.4); }

/* ---- "Vilka reagerade"-modal (bild 4) ----------------------------------- */
.rx-modal { position: fixed; inset: 0; z-index: 100048; display: flex; align-items: center; justify-content: center; padding: 20px; }
.rx-modal[hidden] { display: none !important; }
.rx-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.rx-dialog {
  position: relative; width: 100%; max-width: 460px; max-height: min(560px, 82vh);
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35); overflow: hidden;
}
.rx-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px 0 14px; border-bottom: 1px solid var(--line); }
.rx-tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.rx-tabs::-webkit-scrollbar { display: none; }
.rx-tab {
  border: 0; background: transparent; color: var(--dim); font-weight: 700; font-size: 13px;
  padding: 10px 10px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
}
.rx-tab:hover { color: var(--ink); }
.rx-tab.is-on { color: var(--accent); border-bottom-color: var(--accent); }
.rx-tab-emo { font-size: 15px; }
.rx-x { margin-bottom: 4px; width: 34px; height: 34px; border: 0; background: var(--inset); color: var(--ink2); border-radius: 50%; cursor: pointer; display: grid; place-items: center; flex: 0 0 auto; }
.rx-x:hover { color: var(--ink); }
.rx-list { overflow-y: auto; padding: 6px; }
.rx-row { display: flex; align-items: center; gap: 10px; padding: 8px; }
.rx-av {
  position: relative; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  background: var(--inset) center/cover no-repeat; border: 1px solid var(--line); cursor: pointer;
}
.rx-badge {
  position: absolute; right: -2px; bottom: -2px; width: 19px; height: 19px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; line-height: 1; background: var(--card);
  box-shadow: 0 0 0 1.5px var(--card);
}
.rx-meta { flex: 1; min-width: 0; }
.rx-name { font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
a.rx-name:hover { text-decoration: underline; }
.rx-acts { display: flex; gap: 6px; flex: 0 0 auto; }


.rx-empty { padding: 28px 12px; text-align: center; color: var(--dim); font-size: 13px; }
@keyframes rx-spin { to { transform: rotate(360deg); } }

/* Kontaktkortet (.rx-hc*) bor i pulse-hovercard.css sedan 2026-07-26 —
   det ska laddas pa ALLA sidor, inte bara dar reaktionsmarkupen finns. */

/* ---- Responsivt --------------------------------------------------------- */
@media (max-width: 520px) {
  .rx-row { flex-wrap: wrap; }
  .rx-acts { width: 100%; padding-left: 50px; }
  .rx-acts }
