/* Chat tools (2026-10-14): stop, copy / try again / edit, quick replies, card actions. Loaded last of the chat styles; only adds. */

/* ---- Stop: the send button becomes a stop button while Tharvik is writing ---- */
body.reply-busy.can-stop #sendBtn{ opacity:1; cursor:pointer; }
body.reply-busy.can-stop #sendBtn:hover{ filter:brightness(1.1); }
/* a bigger touch area around the send button (the visible size is the same) */
#sendBtn{ position:relative; }
#sendBtn::after{ content:""; position:absolute; inset:-5px; }
/* a message tapped while the last answer is still being finished: it goes by itself the moment the app is free */
body.reply-busy #sendBtn.queued{ opacity:.9; cursor:progress; animation:micPulse 1.2s infinite ease-in-out; }
@media (prefers-reduced-motion:reduce){ body.reply-busy #sendBtn.queued{ animation:none; } }

/* ---- copy / try again sit in front of the thumbs; "try again" only on the last reply that did nothing ---- */
.msg-feedback:not(.can-regen) .tc-again{ display:none; }
.fb-btn.tc-copy.on{ color:var(--gold); opacity:1; }
.fb-btn.tc-again svg, .fb-btn.tc-copy svg, .fb-btn.tc-edit svg{ width:15px; height:15px; }

/* ---- edit: a small pencil beside your last message, and a bar above the box while editing ---- */
.msg-row.user .tc-edit{ align-self:center; flex-shrink:0; }
.tc-editbar{
  display:none; align-items:center; justify-content:space-between; gap:10px;
  margin:0 24px 6px; padding:6px 8px 6px 14px; border-radius:var(--r-pill, 28px);
  background:var(--panel-2); border:1px solid var(--line); color:var(--text-dim);
  font:600 12.5px var(--font-ui, 'Manrope', sans-serif); position:relative; z-index:1;
}
.tc-editbar.show{ display:flex; }
.tc-eb-x{
  border:0; border-radius:var(--r-pill, 28px); padding:5px 11px; cursor:pointer;
  background:transparent; color:var(--text); font:inherit; border:1px solid var(--line);
}
.tc-eb-x:hover{ border-color:var(--line-strong, var(--gold)); }

/* ---- quick replies ---- */
.quick-replies{ display:flex; flex-wrap:wrap; gap:8px; margin:-4px 0 2px 38px; padding-right:12px; }
.qr-chip{
  min-height:38px; padding:8px 15px; border-radius:var(--r-pill, 28px); cursor:pointer;
  background:var(--panel); color:var(--text); border:1px solid var(--line-strong, var(--line));
  font:600 13.5px/1.2 var(--font-ui, 'Manrope', sans-serif); text-align:left;
  transition:border-color .15s, background-color .15s, transform .12s;
}
.qr-chip:hover{ border-color:var(--gold); background:var(--panel-2); }
.qr-chip:active{ transform:scale(.97); }
.qr-chip:focus-visible, .sa-btn:focus-visible, .meal-log-btn:focus-visible, .tc-eb-x:focus-visible{ outline:2px solid var(--gold); outline-offset:2px; }

/* ---- a reply that was stopped ---- */
.status-note.stopped{ color:var(--text-dim); }

/* ---- actions under a verified calendar update ---- */
.status-actions{ display:flex; flex-wrap:wrap; gap:8px; margin:-8px 0 2px 44px; padding-right:12px; }
.sa-btn{
  display:inline-flex; align-items:center; gap:7px; min-height:36px; padding:7px 14px; cursor:pointer;
  border-radius:var(--r-pill, 28px); border:1px solid var(--line-strong, var(--line)); background:transparent; color:var(--text);
  font:600 13px/1.2 var(--font-ui, 'Manrope', sans-serif);
}
.sa-btn svg{ width:15px; height:15px; flex-shrink:0; }
.sa-btn:hover{ border-color:var(--gold); }
.sa-btn.primary{ background:var(--gold); border-color:var(--gold); color:var(--ink); }
.sa-btn.primary:hover{ filter:brightness(1.08); }

/* ---- "log it" on a meal card ---- */
.meal-log-btn{
  display:inline-flex; align-items:center; gap:6px; margin-top:9px; min-height:34px; padding:6px 13px; cursor:pointer;
  border-radius:var(--r-pill, 28px); border:1px solid var(--line-strong, var(--line)); background:transparent; color:var(--text);
  font:600 12.5px/1.2 var(--font-ui, 'Manrope', sans-serif);
}
.meal-log-btn svg{ width:14px; height:14px; flex-shrink:0; }
.meal-log-btn:hover:not(:disabled){ border-color:var(--gold); }
.meal-log-btn.busy{ opacity:.7; cursor:progress; }
.meal-log-btn.done{ color:var(--gold); border-color:transparent; padding-left:2px; cursor:default; }
.meal-log-btn.bad{ color:var(--ember, #c0392b); border-color:var(--ember, #c0392b); }

@media (prefers-reduced-motion: reduce){ .qr-chip{ transition:none; } .qr-chip:active{ transform:none; } }
