/* Talk: the quiet Signal button at the bottom right of the main panel, and the conversation it
   opens beside the work. Same tokens as the rest of the app; nothing here uses the accent, which
   only ever means "waiting on you". */

.talk-ball { --lv: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--fg); display: grid; place-items: center; flex: none; }
.talk-ball svg { width: 12px; height: 12px; color: var(--bg); stroke-width: 1.6; }
.talk-ball.sm { width: 15px; height: 15px; } .talk-ball.sm svg { width: 10px; height: 10px; }
.talk-ball.live { box-shadow: 0 0 0 calc(1.5px + var(--lv) * 5px) color-mix(in srgb, var(--fg) 24%, transparent); }

.talk-fab { position: absolute; right: 7px; bottom: 3px; z-index: 6; height: 24px; padding: 0 10px 0 4px; border-radius: 12px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--pop); border: 1px solid var(--pop-line); color: var(--fg-2); font-size: 12px; font-weight: 510; white-space: nowrap; -webkit-app-region: no-drag; }
.talk-fab:hover { color: var(--fg); border-color: var(--line-2); background: color-mix(in srgb, var(--pop) 88%, var(--fg)); }
.talk-fab.live { padding-left: 8px; gap: 9px; color: var(--fg); }
/* The button sits over the corner of the panel: the bars that live there keep clear of it. */
.main:has(> .talk-fab) .answers { padding-right: 96px; }

.talk { position: absolute; top: 0; right: 0; bottom: 0; width: 380px; max-width: 100%; z-index: 8; display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-left: 1px solid var(--line); box-shadow: var(--shadow); -webkit-app-region: no-drag; }
/* On a desktop the work moves over instead of being covered. */
@media (min-width: 1180px) { .main:has(> .talk) { padding-right: 380px; } .talk { box-shadow: none; } .main:has(> .talk) .split { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); } }
/* A smaller window: a slimmer panel, and the work beside it takes the compact shape it has on a narrow screen. */
@media (min-width: 1024px) and (max-width: 1179px) {
  .talk { width: 340px; box-shadow: none; } .main:has(> .talk) { padding-right: 340px; }
  .main:has(> .talk) .irow .labs, .main:has(> .talk) .irow .hide-s { display: none; }
  .main:has(> .talk) .issue { grid-template-columns: minmax(0, 1fr); overflow-y: auto; } .main:has(> .talk) .issue-main { overflow: visible; padding: 18px 16px 24px; } .main:has(> .talk) .props { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  .main:has(> .talk) .split { grid-template-columns: minmax(0, 1fr); } .main:has(> .talk) .split > .col.detail { display: none; } .main:has(> .talk) .split.has > .col.list { display: none; } .main:has(> .talk) .split.has > .col.detail { display: flex; border-left: 0; }
  .main:has(> .talk) .strip { overflow-x: auto; scrollbar-width: none; } .main:has(> .talk) .strip .pill { flex-shrink: 0; }
}
.talk-h { height: 44px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 14px; border-bottom: 1px solid var(--line); min-width: 0; }
.talk-h b { font-weight: 510; } .talk-h .mut { font-size: 12px; }
.talk-b { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 16px 14px 10px; display: flex; flex-direction: column; gap: 12px; }
.talk-empty { margin: auto; display: grid; gap: 12px; justify-items: center; text-align: center; color: var(--mut); line-height: 1.55; padding: 0 22px 24px; max-width: 300px; }
.talk-empty .talk-ball { width: 30px; height: 30px; } .talk-empty .talk-ball svg { width: 18px; height: 18px; }
.tl { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.tl.user { align-self: flex-end; max-width: 88%; background: var(--pill); color: var(--fg); border-radius: 13px 13px 4px 13px; padding: 7px 11px; white-space: pre-wrap; line-height: 1.5; }
.tl.agent { display: grid; gap: 8px; justify-items: start; } .tl.agent .md { color: var(--fg-2); font-size: 13.5px; line-height: 1.58; min-width: 0; max-width: 100%; }
.tl.tool { display: flex; align-items: center; gap: 7px; color: var(--mut); font-size: 12px; } .tl.tool svg.i { flex: none; }
.tl.err { color: var(--bad); line-height: 1.5; }
.talk-f { flex: none; padding: 6px 12px 12px; }
.talk-box { display: flex; align-items: flex-end; gap: 2px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel-2); padding: 3px 4px 3px 12px; }
.talk-box:focus-within { border-color: color-mix(in srgb, var(--fg) 30%, var(--line-2)); }
.talk-box textarea { flex: 1; min-width: 0; background: none; border: 0; resize: none; padding: 6px 0; margin: 0; line-height: 1.45; font-size: 13.5px; max-height: 132px; display: block; }
.talk-box textarea::placeholder { color: var(--dim); }
.talk-send { border-radius: 50%; } .talk-send:disabled { opacity: .35; cursor: default; background: none; } .talk-send.on { background: var(--fg); color: var(--bg); } .talk-send.on:hover { background: var(--fg-2); color: var(--bg); }
.talk-stop, .talk-hold { background: var(--active); color: var(--fg); } .talk-hold { touch-action: none; }

@media (max-width: 860px) {
  .talk { position: fixed; inset: 0; width: auto; z-index: 45; border-left: 0; box-shadow: none; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
  .talk-box textarea { font-size: 16px; }   /* a smaller size makes a phone zoom the page on focus */
  .talk-fab { position: fixed; right: calc(12px + env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); height: 36px; border-radius: 18px; padding: 0 13px 0 9px; box-shadow: var(--shadow); }
  .main:has(> .talk-fab) > .body { padding-bottom: 56px; }
  .main:has(> .talk-fab) .answers { padding-right: 14px; padding-bottom: 58px; }
}
