/* v356 — Social reactions + sticky comment composer (override file).
   social-feed.css, social-feed323.js, social-feed.js, discover.js and theme-camo349.css stay byte-identical.
   Replaces the separate like / dislike (and comment heart) with one reaction button and a 4-emoji picker:
   🔥 love, 😂 laughing, 😐 neutral, 😠 angry. Counts sit in the existing side-column chips.
   Also pins the comment input to the bottom of the comments sheet so it is visible as soon as
   comments open, and lifts it with the on-screen keyboard. */

/* ---- hide the old separate like / dislike once the new button is in place ---- */
html.hs-open #homeSocial .tt-act.tt-like.rx-hidden,
html.hs-open #homeSocial .tt-act.tt-dislike.rx-hidden,
.dc-acts .dc-like.rx-hidden,
.dc-acts .dc-dislike.rx-hidden{display:none!important}

/* Keep the action column overflow visible so the picker can sit to the left of the buttons */
html.hs-open #homeSocial .hs-tt .tt-acts{overflow:visible}

/* ---- post side-column reaction button ---- */
html.hs-open #homeSocial .hs-tt .tt-act.tt-react{position:relative}
html.hs-open #homeSocial .hs-tt .tt-react .rx-emoji{font-size:22px;line-height:1;filter:drop-shadow(0 1px 1px rgba(0,0,0,.25));pointer-events:none;transform:translateZ(0)}
html.hs-open #homeSocial .hs-tt .tt-react .rx-face{width:23px;height:23px;fill:none;stroke:var(--tt-g,#1b7f00);stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round}
/* v356 merge fix: the white heart override for video posts was removed: on Light the video bubbles are white, so the heart was invisible. The heart now uses the same accent colour as the other side buttons (as the v355 like button did). */
html.hs-open #homeSocial .hs-tt .tt-react[data-rx][data-rx=""] .rx-emoji,
html.hs-open #homeSocial .hs-tt .tt-react:not([data-rx]) .rx-emoji{display:none}
html.hs-open #homeSocial .hs-tt .tt-react[data-rx]:not([data-rx=""]) .rx-face{display:none}

/* Chosen-state glow on the bubble (heart/love pink, fire orange, laugh gold, neutral soft, angry red) */
html.hs-open #homeSocial .hs-tt .tt-react[data-rx="\2764"] .tt-bub,
html.hs-open #homeSocial .hs-tt .tt-react[data-rx="\2764\FE0F"] .tt-bub{
  background:radial-gradient(circle at 35% 30%,#ffc2d4,#ff4d6d 58%,#e11d48);
  box-shadow:0 0 0 2px rgba(255,77,109,.5),0 4px 14px rgba(225,29,72,.45)}
html.hs-open #homeSocial .hs-tt .tt-react[data-rx="\1F525"] .tt-bub{
  background:radial-gradient(circle at 35% 30%,#ffd19a,#ff7a18 58%,#e2580e);
  box-shadow:0 0 0 2px rgba(255,122,24,.45),0 4px 14px rgba(226,88,14,.45)}
html.hs-open #homeSocial .hs-tt .tt-react[data-rx="\1F602"] .tt-bub{
  background:radial-gradient(circle at 35% 30%,#ffe9a3,#f5c400 60%,#e0a100);
  box-shadow:0 0 0 2px rgba(245,196,0,.45),0 4px 14px rgba(224,161,0,.4)}
html.hs-open #homeSocial .hs-tt .tt-react[data-rx="\1F610"] .tt-bub{
  background:radial-gradient(circle at 35% 30%,#e8eaee,#9aa1ab 62%,#7a818b);
  box-shadow:0 0 0 2px rgba(154,161,171,.4),0 4px 12px rgba(0,0,0,.22)}
html.hs-open #homeSocial .hs-tt .tt-react[data-rx="\1F620"] .tt-bub{
  background:radial-gradient(circle at 35% 30%,#ffb3b0,#e5484d 58%,#c42b32);
  box-shadow:0 0 0 2px rgba(229,72,77,.5),0 4px 14px rgba(196,43,50,.45)}
html.hs-open #homeSocial .hs-tt .tt-k-video .tt-react[data-rx="\2764"] .tt-bub,
html.hs-open #homeSocial .hs-tt .tt-k-video .tt-react[data-rx="\2764\FE0F"] .tt-bub,
html.hs-open #homeSocial .hs-tt .tt-k-video .tt-react[data-rx="\1F525"] .tt-bub,
html.hs-open #homeSocial .hs-tt .tt-k-video .tt-react[data-rx="\1F602"] .tt-bub,
html.hs-open #homeSocial .hs-tt .tt-k-video .tt-react[data-rx="\1F610"] .tt-bub,
html.hs-open #homeSocial .hs-tt .tt-k-video .tt-react[data-rx="\1F620"] .tt-bub{background-blend-mode:normal}

/* Tiny top-emoji row between the bubble and the count chip; stays inside the 60px column */
html.hs-open #homeSocial .hs-tt .tt-react .rx-top{display:flex;justify-content:center;gap:1px;min-height:0;line-height:1;font-size:10px;pointer-events:none;letter-spacing:-.05em}
html.hs-open #homeSocial .hs-tt .tt-react .rx-top:empty{display:none}
html.hs-open #homeSocial .hs-tt .tt-react .rx-top i{font-style:normal;font-size:10px;line-height:1}

/* ---- picker (posts: to the left of the column; comments: above the button) ---- */
.rx-picker{position:fixed;z-index:80;display:flex;align-items:center;gap:6px;padding:6px 8px;border-radius:999px;
  background:var(--tt-card,var(--surface,#fff));color:var(--tt-ink,var(--text,#111));
  box-shadow:0 10px 30px rgba(0,0,0,.22),0 0 0 1px var(--tt-line,var(--line,rgba(0,0,0,.08)));
  animation:rxIn .16s var(--ease,ease)}
@keyframes rxIn{from{opacity:0;transform:scale(.86) translateY(4px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.rx-picker{animation:none}}
.rx-picker[hidden]{display:none!important}
.rx-picker[data-rx-side="left"],.rx-picker[data-rx-side="above"]{/* position is set in JS (fixed, on document.body) */}
.tt-react-slot{position:relative;display:flex;flex-direction:column;align-items:center;min-width:56px}
.dc-cacts .rx-cslot{position:relative;display:inline-flex;flex-direction:row;align-items:center}
.tt-react-slot > .rx-picker[data-rx-side="left"]{position:absolute;right:calc(100% + 8px);bottom:0;left:auto;top:auto}
.rx-cslot > .rx-picker[data-rx-side="above"]{position:absolute;left:0;bottom:calc(100% + 8px);right:auto;top:auto}
.rx-pick{width:44px;height:44px;min-width:44px;border:0;background:transparent;border-radius:50%;cursor:pointer;font-size:26px;line-height:1;
  display:grid;place-items:center;padding:0;-webkit-tap-highlight-color:transparent;transition:transform .12s var(--ease,ease),background .12s ease}
.rx-pick:hover,.rx-pick:focus-visible{transform:scale(1.08);background:rgba(0,0,0,.06);outline:none}
.rx-pick.is-on{background:rgba(0,0,0,.08);transform:scale(1.08);box-shadow:inset 0 0 0 2px rgba(0,0,0,.08)}
.rx-pick[data-rx="\2764"].is-on,.rx-pick[data-rx="\2764\FE0F"].is-on{background:rgba(255,77,109,.2);box-shadow:0 0 0 2px rgba(255,77,109,.5)}
.rx-pick[data-rx="\1F525"].is-on{background:rgba(255,122,24,.2);box-shadow:0 0 0 2px rgba(255,122,24,.45)}
.rx-pick[data-rx="\1F602"].is-on{background:rgba(245,196,0,.22);box-shadow:0 0 0 2px rgba(245,196,0,.45)}
.rx-pick[data-rx="\1F610"].is-on{background:rgba(154,161,171,.22);box-shadow:0 0 0 2px rgba(154,161,171,.45)}
.rx-pick[data-rx="\1F620"].is-on{background:rgba(229,72,77,.2);box-shadow:0 0 0 2px rgba(229,72,77,.45)}
html[data-theme=dark] .rx-pick:hover,html[data-theme=dark] .rx-pick:focus-visible{background:rgba(255,255,255,.1)}
html[data-theme=dark] .rx-pick.is-on{background:rgba(255,255,255,.12);box-shadow:inset 0 0 0 2px rgba(255,255,255,.12)}

/* On video cards the picker stays solid so emojis stay readable */
html.hs-open #homeSocial .hs-tt .tt-k-video .rx-picker{background:rgba(20,20,20,.94);color:#fff;box-shadow:0 10px 28px rgba(0,0,0,.45),0 0 0 1px rgba(255,255,255,.12)}

/* ---- comment row reaction button ---- */
.dc-cacts{position:relative;flex-wrap:wrap;align-items:center}
.dc-cacts .dc-creact.rx-cbtn{gap:6px}
.dc-cacts .dc-creact.rx-cbtn .rx-emoji{font-size:16px;line-height:1}
.dc-cacts .dc-creact.rx-cbtn .rx-face{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.dc-cacts .dc-creact.rx-cbtn[data-rx]:not([data-rx=""]) .rx-face{display:none}
.dc-cacts .dc-creact.rx-cbtn[data-rx=""] .rx-emoji,
.dc-cacts .dc-creact.rx-cbtn:not([data-rx]) .rx-emoji{display:none}
.dc-cacts .rx-cbtn[aria-pressed=true][data-rx="\2764"],
.dc-cacts .rx-cbtn[aria-pressed=true][data-rx="\2764\FE0F"]{color:#e11d48}
.dc-cacts .rx-cbtn[aria-pressed=true][data-rx="\1F525"]{color:#e2580e}
.dc-cacts .rx-cbtn[aria-pressed=true][data-rx="\1F602"]{color:#c79200}
.dc-cacts .rx-cbtn[aria-pressed=true][data-rx="\1F610"]{color:#6b7280}
.dc-cacts .rx-cbtn[aria-pressed=true][data-rx="\1F620"]{color:#e5484d}
html[data-theme=light] .dc-cacts .rx-cbtn[aria-pressed=true][data-rx="\2764"],
html[data-theme=light] .dc-cacts .rx-cbtn[aria-pressed=true][data-rx="\2764\FE0F"]{color:#be123c}
html[data-theme=light] .dc-cacts .rx-cbtn[aria-pressed=true][data-rx="\1F525"]{color:#c94a00}
html[data-theme=light] .dc-cacts .rx-cbtn[aria-pressed=true][data-rx="\1F602"]{color:#9a7300}
.dc-cacts .rx-top{display:inline-flex;gap:4px;align-items:center;margin-left:2px;font:600 12px/1 var(--body);color:var(--muted);font-variant-numeric:tabular-nums}
.dc-cacts .rx-top:empty{display:none}
.dc-cacts .rx-top b{font-weight:700;color:var(--text)}
.dc-cacts .rx-picker{z-index:90}

/* Card footer (non-TikTok post cards): one reaction button in place of like+dislike */
.dc-acts .dc-react.rx-pbtn{gap:6px}
.dc-acts .dc-react.rx-pbtn .rx-emoji{font-size:16px;line-height:1}
.dc-acts .dc-react.rx-pbtn .rx-face{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.dc-acts .dc-react.rx-pbtn[data-rx]:not([data-rx=""]) .rx-face{display:none}
.dc-acts .dc-react.rx-pbtn[data-rx=""] .rx-emoji,
.dc-acts .dc-react.rx-pbtn:not([data-rx]) .rx-emoji{display:none}
.dc-acts{position:relative;flex-wrap:wrap}
.dc-acts .rx-top{display:inline-flex;gap:4px;align-items:center;font:600 12px/1 var(--body);color:var(--muted)}
.dc-acts .rx-pbtn[aria-pressed=true][data-rx="\2764"],
.dc-acts .rx-pbtn[aria-pressed=true][data-rx="\2764\FE0F"]{color:#e11d48}
.dc-acts .rx-pbtn[aria-pressed=true][data-rx="\1F525"]{color:#e2580e}
.dc-acts .rx-pbtn[aria-pressed=true][data-rx="\1F602"]{color:#c79200}
.dc-acts .rx-pbtn[aria-pressed=true][data-rx="\1F610"]{color:#6b7280}
.dc-acts .rx-pbtn[aria-pressed=true][data-rx="\1F620"]{color:#e5484d}

/* ---- sticky comment composer in the Social comments sheet ----
   social-feed.css sets overflow-y:auto !important on .tt-sheet, so we override it on the comments sheet only
   and give the list its own scroller. The composer stays pinned at the bottom, above the keyboard inset. */
html.hs-open #homeSocial .tt-csheet .tt-sheet{
  display:flex;flex-direction:column;overflow:hidden!important;
  height:min(72vh, calc(100dvh - 10px - var(--tt-kb, 0px)));
  max-height:calc(100dvh - 10px - var(--tt-kb, 0px));
  bottom:var(--tt-kb, 0px);
  padding-bottom:calc(10px + env(safe-area-inset-bottom, 0px));
  box-sizing:border-box}
html.hs-open #homeSocial .tt-csheet .tt-grab,
html.hs-open #homeSocial .tt-csheet .tt-sheet-h,
html.hs-open #homeSocial .tt-csheet .tt-guestbar{flex:0 0 auto}
/* v356 merge fix: display:flex needs !important here, because gaps.css forces #homeSocial article.dc-post{display:block!important};
   without it the list never got its own scroller and older comments could not be scrolled to. */
html.hs-open #homeSocial .tt-csheet .tt-sheet-post{
  flex:1 1 auto;min-height:0;display:flex!important;flex-direction:column;overflow:hidden;margin:0!important}
html.hs-open #homeSocial .tt-csheet .tt-sheet-post .dc-thread{
  display:flex!important;flex-direction:column;flex:1 1 auto;min-height:0;overflow:hidden!important;
  margin:0!important;padding:0!important;border:0!important;width:auto}
html.hs-open #homeSocial .tt-csheet .dc-cscroll{
  flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:2px 0 8px}
html.hs-open #homeSocial .tt-csheet .dc-cnew{
  flex:0 0 auto;order:99;margin:0;max-height:46%;overflow:auto;
  position:relative;z-index:3;
  background:var(--tt-card,var(--surface,#fff));
  border:1px solid var(--tt-line,var(--line,#dfe2da));
  border-radius:16px;padding:10px;box-shadow:0 -8px 18px rgba(0,0,0,.06)}
html.hs-open #homeSocial .tt-csheet .dc-cnew textarea{min-height:52px;max-height:120px}
html.hs-open #homeSocial .tt-csheet .dc-cempty,
html.hs-open #homeSocial .tt-csheet .dc-cloading{margin:12px 0}

/* Camo: picker and composer sit on the dark panel, never on the camo photo itself */
html[data-camo].hs-open #homeSocial .tt-csheet .tt-sheet{background:#1b1e16;border:2px solid var(--camo-tan,#a39060);color:var(--text,#ece6c8)}
html[data-camo].hs-open #homeSocial .tt-csheet .dc-cnew,
html[data-camo] .rx-picker{background:var(--camo-panel2,#262b1d);border-color:var(--camo-tan,#a39060);color:var(--text,#ece6c8)}
html[data-camo] .rx-pick:hover,html[data-camo] .rx-pick:focus-visible{background:rgba(216,207,164,.12)}

/* Short phones: keep the 4 picker buttons tappable without overflowing the card */
@media (max-width:399px){
  .rx-pick{width:38px;height:38px;min-width:38px;font-size:22px}
  .rx-picker{gap:4px;padding:5px 6px}
  html.hs-open #homeSocial .hs-tt .tt-react .rx-emoji{font-size:18px}
}
@media (max-width:699px) and (max-height:700px){
  html.hs-open #homeSocial .hs-tt .tt-react .rx-emoji{font-size:18px}
  html.hs-open #homeSocial .hs-tt .tt-react .rx-top{font-size:9px}
}
@media (max-width:699px) and (max-height:650px){
  html.hs-open #homeSocial .hs-tt .tt-react .rx-emoji{font-size:16px}
  .rx-pick{width:40px;height:40px;min-width:40px;font-size:22px}
}

/* Desktop: picker still opens to the left of the side column; sheet composer stays pinned */
@media (min-width:700px){
  html.hs-open #homeSocial .hs-tt .rx-picker[data-rx-side="left"]{right:calc(100% + 10px)}
  html.hs-open #homeSocial .tt-csheet .tt-sheet{max-width:560px}
}
