/* Comment reactions (JS/components/comment-reactions.js). Canonical tokens only, because mobile.html does not load the alt sheets;
   .a-react-chip copies .a-chip / .a-chip.on from CSS/alt/alt-components.css value for value. */
.a-comment-r:empty{ display:none; }
.a-comment-r{ min-width:0; margin-top:6px; }
.a-react-row{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; min-width:0; }

.a-react-chip{
  display:inline-flex; align-items:center; gap:5px; height:24px; padding:0 9px;
  border-radius:var(--a-r-pill); font:inherit; font-size:var(--a-fs-11); font-weight:600; white-space:nowrap;
  background:var(--panel-2); border:1px solid var(--border-soft); color:var(--text-dim);
  cursor:pointer; max-width:170px; overflow:hidden;
}
.a-react-chip:hover:not(:disabled){ border-color:var(--border-strong); color:var(--text); }
.a-react-chip.on{ background:var(--accent-soft); border-color:var(--accent); color:var(--accent-text); }
.a-react-chip:disabled{ cursor:default; }
.a-react-chip .g{ font-size:var(--a-fs-13); line-height:var(--a-lh-ctl); }
.a-react-chip .n{ font-variant-numeric:tabular-nums; opacity:.75; }
.a-react-chip:focus-visible,
.a-react-pick:focus-visible,
.a-react-who:focus-visible{ outline:2px solid var(--focus-ring); outline-offset:1px; }

/* The three choices stay out of the way until the card is hovered or a control inside the row has focus; touch shows them. */
.a-react-add{ display:inline-flex; align-items:center; gap:2px; opacity:0; transition:opacity var(--dur-micro) var(--ease-out); }
.a-comment:hover .a-react-add,
.okr-history-row:hover .a-react-add,
.mc-item:hover .a-react-add,
.mc-thread-convo:hover .a-react-add,
.a-comment-r:focus-within .a-react-add,
.a-react-add:focus-within{ opacity:1; }
.a-react-pick{
  display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; padding:0;
  border:1px solid transparent; border-radius:var(--a-r-pill); background:transparent; font-size:var(--a-fs-13); line-height:var(--a-lh-ctl); cursor:pointer;
}
.a-react-pick:hover{ background:var(--panel-2); border-color:var(--border-soft); }

.a-react-who{
  padding:0; border:0; background:transparent; font:inherit; font-size:var(--a-fs-11); color:var(--text-faint);
  cursor:pointer; text-align:left; min-width:0; overflow-wrap:anywhere;
}
.a-react-who:hover{ color:var(--text-dim); text-decoration:underline; }

.a-react-list{
  list-style:none; margin:6px 0 0; padding:6px 10px; max-height:11.5rem; overflow-y:auto; max-width:100%;
  background:var(--panel-2); border:1px solid var(--border-soft); border-radius:var(--radius-sm);
  font-size:var(--a-fs-12); color:var(--text-dim);
}
.a-react-list li{ padding:2px 0; overflow-wrap:anywhere; }

/* Picker-only slot (no reactions yet): takes no room until the host row is hovered or focused; touch keeps it open. */
@media (hover:hover) and (pointer:fine){
  .a-comment-r.is-idle, .cmt-thread .a-comment-r.is-idle{ margin-top:0; }
  .a-comment-r.is-idle .a-react-row{ max-height:0; overflow:hidden; }
  .a-comment:hover .a-comment-r.is-idle, .okr-history-row:hover .a-comment-r.is-idle,
  .mc-item:hover .a-comment-r.is-idle, .mc-thread-convo:hover .a-comment-r.is-idle,
  .a-comment-r.is-idle:focus-within{ margin-top:6px; }
  .a-comment:hover .a-comment-r.is-idle .a-react-row, .okr-history-row:hover .a-comment-r.is-idle .a-react-row,
  .mc-item:hover .a-comment-r.is-idle .a-react-row, .mc-thread-convo:hover .a-comment-r.is-idle .a-react-row,
  .a-comment-r.is-idle:focus-within .a-react-row{ max-height:40px; overflow:visible; }
}

@media (hover:none), (pointer:coarse){
  .a-react-add{ opacity:1; }
  .a-react-chip{ min-height:32px; min-width:32px; justify-content:center; }
  .a-react-pick{ min-width:32px; min-height:32px; }
  .a-react-who{ min-height:32px; display:inline-flex; align-items:center; }
}
@media (prefers-reduced-motion:reduce){ .a-react-add{ transition:none; } }
