/* «Розмови» (conversations.js) and operator bubbles in the test chat. */
.conv-badge{display:inline-block;min-width:18px;margin-left:6px;padding:0 6px;border-radius:999px;background:var(--soft,#e8e9f3);font-size:11px;line-height:18px;text-align:center}
.conv-badge-alert{background:#dc2626;color:#fff}
.conv-filters{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:12px}
.conv-filters select{max-width:100%}
.conv-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.conv-open{display:grid;gap:4px;width:100%;text-align:left;padding:10px 12px;border:1px solid var(--line,#e3e5ec);border-radius:12px;background:var(--card,#fff);color:inherit;font:inherit;cursor:pointer;min-width:0}
.conv-human .conv-open{border-left:4px solid var(--accent,#4f46e5)}
.conv-unread .conv-open{background:var(--soft,#f5f5ff)}
.conv-row-top,.conv-row-mid,.conv-head-top{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:baseline;min-width:0}
.conv-state{font-size:.85rem}
.conv-agent,.conv-presence{font-size:.8rem;color:var(--muted,#6b7280)}
.conv-last{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted,#4b5563)}
.conv-unread-count{justify-self:start;font-size:.75rem;font-weight:600;color:#dc2626}
.conv-head{display:grid;gap:8px}
.conv-holder{font-weight:600}
.conv-transcript{max-height:58vh;overflow:auto;display:grid;gap:8px;align-content:start}
.conv-msg{max-width:min(78%,640px);padding:8px 12px;border-radius:12px;border:1px solid var(--line,#e3e5ec);background:var(--card,#fff);min-width:0}
.conv-msg p{margin:4px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.conv-user{justify-self:start}
.conv-assistant,.conv-operator{justify-self:end}
.conv-operator{border-color:var(--accent,#4f46e5);border-left-width:4px}
.conv-system{justify-self:center;max-width:90%;background:transparent;border-style:dashed;font-size:.85rem}
.conv-internal{color:var(--muted,#6b7280);font-style:italic}
.conv-suppressed{opacity:.7;background:var(--soft,#f1f2f5);border-style:dashed}
.conv-meta{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}
.conv-meta small,.conv-note,.conv-delivery{font-size:.75rem;color:var(--muted,#6b7280)}
.conv-link{padding:0 6px;font-size:.75rem}
.conv-composer{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end}
.conv-composer textarea{width:100%;box-sizing:border-box;min-width:0}
.conv-settings{display:grid;gap:10px;max-width:640px}
.conv-settings input[type=number]{width:7rem}
/* Language bridge (docs/26). */
.conv-lang{display:inline-block;padding:0 6px;border-radius:6px;background:var(--soft,#eef0f6);font-size:.72rem;font-weight:600;letter-spacing:.02em}
.conv-language{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center;font-size:.85rem}
.conv-language select{width:auto;max-width:100%}
.conv-badge-muted{padding:0 8px;border-radius:999px;background:#fef3c7;color:#92400e;font-size:.75rem}
.conv-translated{display:block;margin-top:4px;font-size:.75rem;color:var(--muted,#6b7280)}
.conv-outgoing{display:grid;gap:6px;margin-top:6px;padding-top:6px;border-top:1px dashed var(--line,#e3e5ec);font-size:.85rem}
.conv-outgoing textarea{width:100%;box-sizing:border-box;min-width:0}
.conv-translated .conv-link{display:inline;width:auto;min-height:0;margin:0;padding:0 2px;border:0;background:none;color:var(--accent,#4f46e5);font-size:inherit;font-weight:600;text-decoration:underline;cursor:pointer}
.conv-hint{grid-column:1/-1;font-size:.75rem;color:var(--muted,#6b7280)}
#chat-messages article.operator{border-left:4px solid var(--accent,#4f46e5)}
#chat-messages article.system{opacity:.8;font-size:.9rem}
/* Phone is the baseline; larger screens add space, not another workflow. */
.conv-composer{grid-template-columns:minmax(0,1fr) auto;position:sticky;bottom:0;z-index:2;padding-bottom:max(12px,env(safe-area-inset-bottom));background:var(--card,#fff);min-width:0}
.conv-composer textarea{min-height:56px;max-height:120px;resize:vertical}
.conv-composer>button{min-height:44px;max-width:130px;overflow-wrap:anywhere}
.conv-voice-controls{grid-column:1/-1;display:grid;gap:4px;min-width:0}
.conv-voice-controls p{margin:0;font-size:.8rem}
.conv-voice-controls .button-row{display:flex;flex-wrap:wrap;gap:6px}
.conv-voice-controls button{min-height:44px;padding:8px 10px}
.conv-msg{max-width:92%}
.conv-conversation{min-width:0;max-width:100%;display:grid;gap:8px;grid-template-columns:minmax(0,1fr)}
.conv-conversation .conv-head{gap:6px;padding:10px}
.conv-conversation .conv-head p{margin:4px 0;font-size:.85rem}
.conv-conversation .conv-transcript{max-height:44vh;max-height:calc(var(--operator-viewport-height,100dvh)*.44);min-height:80px}
.conv-conversation .button-row{flex-wrap:wrap;gap:6px}
.conv-conversation button,.conv-filters select{min-height:44px}
.conv-filters{display:grid;grid-template-columns:minmax(0,1fr);width:100%}
@media (max-width:700px){
 .conv-conversation{height:calc(var(--operator-viewport-height,100dvh) - 170px);min-height:360px;grid-template-rows:minmax(70px,20%) minmax(60px,1fr) auto}
 .conv-conversation>.conv-head{overflow:auto;min-height:0}
 .conv-conversation>.conv-transcript{max-height:none;min-height:0}
 .conv-conversation .button-row{display:flex;flex-direction:row;flex-wrap:wrap}
 .conv-conversation .button-row>button{width:auto;flex:1 1 130px;margin:0}
}
@media (min-width:640px){.conv-filters{display:flex;width:auto}.conv-msg{max-width:min(78%,640px)}.conv-conversation .conv-transcript{max-height:52vh}.conv-voice-controls button{padding:8px 14px}}
