/* ============================================================
   Chat + — Trust layer styles (Chrome OS / desktop edition)
   Confidence chip + low-confidence caveat, the "more" menu items
   for Explain / Challenge, the Challenge composer button, and the
   small trust dialog. Wellness Sage tokens (var(--ac) sage,
   var(--border), var(--ink), var(--muted)). Matches the phone's
   ConfidenceChip / ExplainSheet / ChallengeButton visuals.
   ============================================================ */

/* ---- confidence chip under an assistant bubble ---- */
.conf-wrap { display:flex; flex-direction:column; gap:5px; margin-top:6px; max-width:100%; }
.conf-chip {
  display:inline-flex; align-items:center; gap:7px; align-self:flex-start;
  background:#fff; border:1px solid var(--border); border-radius:999px;
  padding:3px 10px; font-size:11.5px; font-weight:600; color:var(--muted);
}
.conf-chip .conf-dot { width:8px; height:8px; border-radius:50%; background:var(--muted); flex:none; }
.conf-high  .conf-dot { background:#5c7c5c; }   /* sage / green  */
.conf-medium .conf-dot { background:#caa86a; }  /* gold / amber  */
.conf-low   .conf-dot { background:#c8907c; }   /* warm / red    */
.conf-unknown .conf-dot { background:var(--muted); }

.conf-caveat {
  align-self:flex-start; max-width:100%;
  background:rgba(200,144,124,.12); border:1px solid rgba(200,144,124,.4);
  border-radius:11px; padding:8px 11px; font-size:12px; line-height:1.5; color:var(--ink);
}

/* ---- assistant-bubble "more" menu (Explain / Challenge / etc.) ---- */
.msg .a-actions { display:flex; gap:4px; margin-top:4px; opacity:0; transition:opacity .15s ease; }
.msg.a:hover .a-actions, .msg .a-actions.open { opacity:1; }
.a-act {
  font-size:11px; font-weight:600; color:var(--muted);
  background:#f3ece1; border:1px solid var(--border); border-radius:999px;
  padding:3px 10px; cursor:pointer;
}
.a-act:hover { background:#ece3d4; color:var(--ink); }
.a-act[aria-disabled="true"] { opacity:.5; cursor:not-allowed; }

/* ---- Challenge composer button (Disagreement Engine) ---- */
.challenge-chip {
  display:inline-flex; align-items:center; gap:6px;
  background:rgba(168,124,175,.14); border:1px solid rgba(168,124,175,.4);
  border-radius:999px; padding:5px 12px; font-size:12px; font-weight:600; color:#7e5a86;
  cursor:pointer; margin:0 4px 6px;
}
.challenge-chip:hover:not([disabled]) { background:rgba(168,124,175,.2); }
.challenge-chip[disabled] { opacity:.45; cursor:not-allowed; }
.challenge-chip .ch-ico { font-size:13px; }

/* ---- trust dialog (Explain / Challenge results + no-model notes) ---- */
.trust-modal {
  position:fixed; inset:0; z-index:120; display:grid; place-items:center;
  background:rgba(61,47,36,.34); padding:20px;
}
.trust-card {
  width:min(440px, 100%); background:var(--card); border:1px solid var(--border);
  border-radius:16px; box-shadow:var(--shadow); overflow:hidden;
  display:flex; flex-direction:column; max-height:80vh;
}
.trust-card .trust-head {
  font-family:var(--serif); font-size:17px; font-weight:700; color:var(--ink);
  padding:16px 18px 8px;
}
.trust-card .trust-body {
  padding:0 18px 8px; font-size:13.5px; line-height:1.6; color:var(--ink);
  overflow-y:auto; white-space:pre-wrap; word-wrap:break-word;
}
.trust-card .trust-foot { padding:12px 18px 16px; display:flex; justify-content:flex-end; }
