/* NOWI — versão 01 da segunda rodada aprovada. Nomes maiores, telefone e cor estável por número.
 * A cor é auxiliar: a identificação textual permanece. Balões continuam nativos.
 */
body :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-prefix,
body :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-empty-content,
body :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-header[hidden],
body :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-phone[hidden] { display: none !important; }
body :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-header {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  margin: 0;
  padding: 0;
  line-height: 1.4;
  font-family: NowiComposerManrope, Manrope, system-ui, sans-serif;
}
body :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-name {
  display: block;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
  color: var(--nowi-sender-color, #a22758);
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
body :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-phone {
  display: block;
  flex: 0 0 auto;
  margin-top: 0;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: #4f4b54;
}
body :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-prefix + p { margin-top: 8px; }
body :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-continuation .nowi-group-prefix + p { margin-top: 0; }
body :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-continuation .left-bubble { border-start-start-radius: 6px; }
body :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-header[data-color="0"] { --nowi-sender-color: #a22758; }
body :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-header[data-color="1"] { --nowi-sender-color: #166554; }
body :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-header[data-color="2"] { --nowi-sender-color: #65509c; }
body :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-header[data-color="3"] { --nowi-sender-color: #8a5b19; }
body :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-header[data-color="4"] { --nowi-sender-color: #365f94; }
body :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-header[data-color="5"] { --nowi-sender-color: #a04732; }
body :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-header[data-color="6"] { --nowi-sender-color: #586526; }
body :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-header[data-color="7"] { --nowi-sender-color: #86517a; }
body.dark :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-phone { color: #d2ced5; }
body.dark :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-header[data-color="0"] { --nowi-sender-color: #ff87ae; }
body.dark :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-header[data-color="1"] { --nowi-sender-color: #51d6b3; }
body.dark :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-header[data-color="2"] { --nowi-sender-color: #b792ff; }
body.dark :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-header[data-color="3"] { --nowi-sender-color: #f5bc54; }
body.dark :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-header[data-color="4"] { --nowi-sender-color: #70b8ff; }
body.dark :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-header[data-color="5"] { --nowi-sender-color: #ff9675; }
body.dark :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-header[data-color="6"] { --nowi-sender-color: #bbdb58; }
body.dark :is(.conversation-panel, .reply-editor, .conversation) .nowi-group-header[data-color="7"] { --nowi-sender-color: #e98ed1; }

/* Nome primeiro, telefone ao lado, sem separador. Citações têm identificação própria. */
body .conversation-panel .nowi-group-quote { -webkit-line-clamp: 3; }
body .conversation-panel .nowi-group-quote > p { margin-block: 0; }
body .conversation-panel .nowi-group-quote > .nowi-group-header { margin-bottom: 6px; }
body .reply-editor .nowi-group-composer-source { display: none !important; }
body .reply-editor .nowi-group-composer-preview { display: block; white-space: normal; }
body .reply-editor .nowi-group-reply-snippet {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin-top: 6px;
}
body .reply-editor:has(.nowi-group-composer-preview) { align-items: flex-start; padding-block: 10px; }
body .reply-editor .flex-grow:has(.nowi-group-composer-preview) { min-width: 0; white-space: normal; }
body .reply-editor .overflow-hidden:has(.nowi-group-composer-preview) { display: block; }

/* Prévia nativa da lista: mesma ordem, sem alterar clique, altura ou mensagens. */
body .conversation .nowi-group-composer-source { display: none !important; }
body .conversation .nowi-group-list-preview {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}
body .conversation .nowi-group-list-preview > .nowi-group-header { flex: 0 1 auto; }
body .conversation .nowi-group-list-preview > .nowi-group-reply-snippet {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
