/*! Nexx Livechat — chat.css (estilos do iframe embed) */
:root {
  --nx-lc-primary: #16a34a;
  --nx-lc-secondary: #0ea5e9;
  --nx-lc-bg: #ffffff;
  --nx-lc-bg-chat: #f8fafc;
  --nx-lc-text: #0f172a;
  --nx-lc-text-muted: #64748b;
  --nx-lc-border: #e2e8f0;
  --nx-lc-bubble-in: #ffffff;
  --nx-lc-bubble-out: var(--nx-lc-primary);
  /* Texto SOBRE as cores do cliente. O chat.js recalcula pelo brilho da cor
     escolhida (marca clara → texto escuro) — ver chat.js::aplicarContrastes e
     §A.317. Default branco = como era antes de 2026-08-13. */
  --nx-lc-on-primary: #ffffff;
  --nx-lc-on-bubble-out: #ffffff;
  --nx-lc-on-header: #ffffff;
  /* Contrato de personalização (site/painel sobrepõem via CSS var). Ver
     docs/omni/LIVECHAT.md §Personalização. --nx-lc-width é usado pelo LOADER
     (painel/bolha vivem na página do cliente) — aqui fica só de contrato. */
  --nx-lc-radius: 14px;
  --nx-lc-width: 380px;
  --nx-lc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  background: var(--nx-lc-bg);
  color: var(--nx-lc-text);
  font-family: var(--nx-lc-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
  font-size: 14px;
}

/* ───────── Janela TRANSLÚCIDA ─────────
   Ligada pelo parâmetro "Opacidade da janela" < 100 (chat.js põe a classe no
   <html> e calcula --nx-lc-bg-alpha). O fundo é pintado em 8 lugares aqui
   dentro; com alpha em todos eles as camadas EMPILHAM (cada sobreposição fica
   mais opaca e o painel sai manchado). Então: UMA camada com alpha (o app) e o
   resto transparente. Texto e bolhas continuam nítidos — quem afina é o fundo.
   O branco do iframe quem tira é o loader. David 2026-07-23. */
.nx-lc-translucido,
.nx-lc-translucido body { background: transparent; }
.nx-lc-translucido #nx-lc-app { background: var(--nx-lc-bg-alpha, var(--nx-lc-bg)); }
.nx-lc-translucido #nx-lc-messages,
.nx-lc-translucido #nx-lc-input-row,
.nx-lc-translucido #nx-lc-powered,
.nx-lc-translucido #nx-lc-recording,
.nx-lc-translucido #nx-lc-upload,
.nx-lc-translucido .nx-lc-encerramento { background: transparent; }

.hidden { display: none !important; }
.muted { color: var(--nx-lc-text-muted); font-size: 11px; }

#nx-lc-app {
  display: flex;
  flex-direction: column;
  /* 100% do iframe — quem dimensiona a janela é o loader (por top/bottom).
     Aqui dentro `100vh` seria a altura do PRÓPRIO iframe (não havia bug), mas
     `100%` é mais direto e imune se um dia o iframe deixar de ocupar a viewport
     inteira. A armadilha do 100vh é do loader, na página do cliente — §A.92. */
  height: 100%;
  background: var(--nx-lc-bg);
}

/* ───────── Header ───────── */
#nx-lc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--nx-lc-primary), var(--nx-lc-secondary));
  color: var(--nx-lc-on-header);
}
#nx-lc-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.4);
}
#nx-lc-title { font-weight: 600; font-size: 15px; line-height: 1.2; }
#nx-lc-subtitle { font-size: 11px; opacity: 0.88; }
/* ⋮ menu de opções do visitante (reiniciar/encerrar) — mesmo alvo de 44px do X. */
#nx-lc-menu-btn {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: var(--nx-lc-on-header);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  opacity: 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.25);
}
#nx-lc-menu-btn.hidden { display: none; }
#nx-lc-menu-btn:hover { opacity: 1; }
#nx-lc-menu-btn:active { background: rgba(255, 255, 255, 0.18); }
/* Quando o ⋮ está visível, ele empurra o grupo pra direita; o X vem colado. */
#nx-lc-menu-btn:not(.hidden) ~ #nx-lc-close { margin-left: 0; }
/* Popover do menu — card claro ancorado no topo direito. */
#nx-lc-menu {
  position: absolute;
  top: 56px;
  right: 12px;
  z-index: 20;
  background: var(--nx-lc-bg);
  color: var(--nx-lc-text);
  border: 1px solid var(--nx-lc-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  padding: 6px;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: nx-lc-menu-in 0.14s ease;
}
#nx-lc-menu.hidden { display: none; }
@keyframes nx-lc-menu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
#nx-lc-menu button {
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
#nx-lc-menu button:hover { background: var(--nx-lc-bg-chat); }
#nx-lc-menu-reiniciar { font-weight: 600; }
#nx-lc-menu .nx-lc-menu-aviso { padding: 8px 12px 4px; font-size: 12px; color: var(--nx-lc-text-muted); cursor: default; }
#nx-lc-menu .nx-lc-menu-aviso:hover { background: transparent; }
#nx-lc-menu .nx-lc-menu-danger { color: #dc2626; }

#nx-lc-close {
  margin-left: auto;   /* fica na direita quando o ⋮ está escondido; o ⋮ tira o auto quando aparece */
  background: transparent;
  border: 0;
  color: var(--nx-lc-on-header);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  opacity: 0.85;
  /* Alvo de toque de 44px (mínimo recomendado). Antes era ~24px com padding 0 6px
     e o visitante errava o X no celular. O -6px de margem devolve o alinhamento
     visual sem encolher a área clicável. */
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin-right: -6px;
  border-radius: 50%;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.25);
}
#nx-lc-close:active { background: rgba(255, 255, 255, 0.18); }
#nx-lc-close:hover { opacity: 1; }

/* ───────── Pré-cadastro ───────── */
#nx-lc-precadastro {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}
#nx-lc-precadastro h2 { margin: 0; font-size: 17px; }
#nx-lc-precadastro p { margin: 0 0 6px; color: var(--nx-lc-text-muted); }
#nx-lc-precadastro input {
  padding: 10px 12px;
  border: 1px solid var(--nx-lc-border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
#nx-lc-precadastro input:focus { border-color: var(--nx-lc-primary); }
#nx-lc-pc-submit {
  padding: 11px 14px;
  background: var(--nx-lc-primary);
  color: var(--nx-lc-on-primary);
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
}
#nx-lc-pc-submit:hover { filter: brightness(1.05); }
#nx-lc-pc-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.error { color: #ef4444; font-size: 12px; min-height: 14px; }

/* ───────── Chat ───────── */
#nx-lc-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#nx-lc-messages {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  background: var(--nx-lc-bg-chat);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nx-lc-msg {
  display: flex;
  max-width: 100%;
}
.nx-lc-msg .bubble {
  padding: 8px 12px;
  border-radius: var(--nx-lc-radius, 14px);
  font-size: 13.5px;
  line-height: 1.4;
  max-width: 78%;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.nx-lc-msg.agent .bubble {
  background: var(--nx-lc-bubble-in);
  color: var(--nx-lc-text);
  border: 1px solid var(--nx-lc-border);
  border-bottom-left-radius: 4px;
}
.nx-lc-msg.visitor {
  justify-content: flex-end;
}
.nx-lc-msg.visitor .bubble {
  background: var(--nx-lc-bubble-out);
  color: var(--nx-lc-on-bubble-out);
  border-bottom-right-radius: 4px;
}
.nx-lc-msg .bubble strong { font-weight: 700; }
.nx-lc-msg .bubble em { font-style: italic; }
.nx-lc-msg .bubble del { text-decoration: line-through; opacity: 0.85; }
.nx-lc-msg .bubble code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
  white-space: pre-wrap;
}
.nx-lc-msg.visitor .bubble code { background: rgba(255, 255, 255, 0.18); }
.nx-lc-msg .bubble a {
  color: inherit;
  text-decoration: underline;
  word-break: break-all;
}
.nx-lc-msg.agent .bubble a { color: var(--nx-lc-primary); }

/* ───────── Efeito "digitando" (typewriter) ─────────
   Pontinhos animados enquanto o agente "prepara" a resposta, depois o texto
   revela palavra a palavra com um cursor piscando. Puro visual (chat.js). */
.nx-lc-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 3px 1px;
}
.nx-lc-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nx-lc-text-muted);
  opacity: 0.5;
  animation: nx-lc-typing 1s infinite ease-in-out;
}
.nx-lc-typing i:nth-child(2) { animation-delay: 0.15s; }
.nx-lc-typing i:nth-child(3) { animation-delay: 0.3s; }
/* Verbinho girando ao lado dos pontinhos ("Pensando•••") */
.nx-lc-verbinho {
  font-size: 12.5px;
  color: var(--nx-lc-text-muted);
  margin-right: 6px;
  font-style: italic;
  animation: nx-lc-verbinho-in 0.25s ease;
}
@keyframes nx-lc-verbinho-in { from { opacity: 0.3; } to { opacity: 1; } }
@keyframes nx-lc-typing {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-3px); opacity: 1; }
}
.nx-lc-caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 1px;
  background: var(--nx-lc-primary);
  vertical-align: text-bottom;
  animation: nx-lc-caret 0.8s step-end infinite;
}
@keyframes nx-lc-caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .nx-lc-typing i, .nx-lc-caret { animation: none; }
}

/* ───────── Input ───────── */
#nx-lc-input-row {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  padding: 10px 12px;
  background: var(--nx-lc-bg);
  border-top: 1px solid var(--nx-lc-border);
}
#nx-lc-input {
  flex: 1;
  resize: none;
  border: 1px solid var(--nx-lc-border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  max-height: 120px;
}
#nx-lc-input:focus { border-color: var(--nx-lc-primary); }
.nx-lc-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  color: var(--nx-lc-text-muted);
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.nx-lc-icon-btn:hover {
  background: rgba(15, 23, 42, 0.06);
  color: var(--nx-lc-primary);
}
.nx-lc-icon-btn svg { display: block; }
#nx-lc-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--nx-lc-primary);
  color: var(--nx-lc-on-primary);
  border: 0;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
}
#nx-lc-send:hover { filter: brightness(1.08); }

/* ───────── Gravando áudio ───────── */
#nx-lc-recording {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--nx-lc-bg);
  border-top: 1px solid var(--nx-lc-border);
}
.nx-lc-rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  animation: nx-lc-pulse 1.2s infinite;
  flex-shrink: 0;
}
@keyframes nx-lc-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.18); }
}
.nx-lc-rec-time {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  color: var(--nx-lc-text);
  flex: 1;
}
.nx-lc-rec-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nx-lc-rec-cancel {
  background: rgba(15, 23, 42, 0.08);
  color: var(--nx-lc-text);
}
.nx-lc-rec-cancel:hover { background: rgba(15, 23, 42, 0.14); }
.nx-lc-rec-stop {
  background: var(--nx-lc-primary);
  color: var(--nx-lc-on-primary);
}
.nx-lc-rec-stop:hover { filter: brightness(1.08); }

/* ───────── Upload in-flight ───────── */
#nx-lc-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--nx-lc-bg);
  border-top: 1px solid var(--nx-lc-border);
  color: var(--nx-lc-text-muted);
  font-size: 13px;
}
.nx-lc-upload-spin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(15, 23, 42, 0.18);
  border-top-color: var(--nx-lc-primary);
  animation: nx-lc-spin 0.9s linear infinite;
  flex-shrink: 0;
}
@keyframes nx-lc-spin { to { transform: rotate(360deg); } }

/* ───────── Bolha com mídia ───────── */
.nx-lc-msg .bubble.bubble-media {
  padding: 4px;
  background: transparent;
  border: 0;
  box-shadow: none;
  max-width: 78%;
}
.nx-lc-msg.visitor .bubble.bubble-media { background: transparent; }
.nx-lc-att-img {
  display: block;
  max-width: 100%;
}
.nx-lc-att-img img {
  display: block;
  max-width: 100%;
  max-height: 260px;
  border-radius: 12px;
  object-fit: cover;
}
.nx-lc-att-audio {
  display: block;
  width: 240px;
  max-width: 100%;
  height: 36px;
}
.nx-lc-att-video {
  display: block;
  max-width: 100%;
  max-height: 260px;
  border-radius: 12px;
  background: #000;
}
.nx-lc-att-doc {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 12px;
  text-decoration: none;
  color: var(--nx-lc-text);
  font-size: 13px;
  max-width: 280px;
}
.nx-lc-msg.visitor .nx-lc-att-doc {
  background: rgba(255, 255, 255, 0.18);
  color: var(--nx-lc-on-bubble-out);
}
.nx-lc-att-doc:hover { filter: brightness(1.05); }
.nx-lc-att-doc-icon { font-size: 18px; flex-shrink: 0; }
.nx-lc-att-doc-meta { display: flex; flex-direction: column; min-width: 0; }
.nx-lc-att-doc-name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nx-lc-att-doc-size {
  font-size: 11px;
  opacity: 0.75;
}

#nx-lc-powered {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: var(--nx-lc-bg);
  border-top: 1px solid var(--nx-lc-border);
  text-decoration: none;
  opacity: 0.72;
  transition: opacity 0.15s ease;
}
#nx-lc-powered:hover { opacity: 1; }
#nx-lc-powered img {
  height: 14px;
  width: auto;
  display: block;
}

/* ───────── Erro ───────── */
#nx-lc-error {
  padding: 40px 20px;
  text-align: center;
  color: var(--nx-lc-text-muted);
}

/* ───────── Mensagem de sistema (encerramento, etc.) ───────── */
.nx-lc-msg-sistema {
  align-self: center;
  background: rgba(15, 23, 42, 0.06);
  color: var(--nx-lc-text-muted);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  margin: 6px 0;
  text-align: center;
  max-width: 90%;
  line-height: 1.35;
}

/* Mensagens "passadas" ficam desbotadas após encerramento (modo mesma_sessao) */
.nx-lc-msg.faded { opacity: 0.55; }
.nx-lc-msg.faded .bubble { box-shadow: none; }

/* ───────── Banner de encerramento ───────── */
.nx-lc-encerramento {
  background: var(--nx-lc-bg);
  border-top: 1px solid var(--nx-lc-border);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nx-lc-enc-msg {
  font-size: 13px;
  color: var(--nx-lc-text);
  text-align: center;
  font-weight: 500;
}
.nx-lc-enc-hint {
  font-size: 11px;
  color: var(--nx-lc-text-muted);
  text-align: center;
}
.nx-lc-recomecar {
  padding: 11px 14px;
  background: var(--nx-lc-primary);
  color: var(--nx-lc-on-primary);
  border: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.nx-lc-recomecar:hover { filter: brightness(1.06); }
.nx-lc-recomecar:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: none;
}

/* ───────── CSAT ───────── */
.nx-lc-csat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: var(--nx-lc-bg-chat);
  border: 1px solid var(--nx-lc-border);
  border-radius: 10px;
}
.nx-lc-csat-label {
  font-size: 13px;
  color: var(--nx-lc-text);
  text-align: center;
  font-weight: 500;
}
.nx-lc-csat-stars {
  display: flex;
  justify-content: center;
  gap: 4px;
}
.nx-lc-star {
  background: transparent;
  border: 0;
  font-size: 28px;
  color: #cbd5e1;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  transition: color 0.12s ease, transform 0.12s ease;
  font-family: inherit;
}
.nx-lc-star:hover { transform: scale(1.1); }
.nx-lc-star.on { color: #f59e0b; }
.nx-lc-csat-coment {
  resize: vertical;
  border: 1px solid var(--nx-lc-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  min-height: 40px;
  outline: none;
}
.nx-lc-csat-coment:focus { border-color: var(--nx-lc-primary); }
.nx-lc-csat-submit {
  align-self: flex-end;
  padding: 7px 12px;
  background: var(--nx-lc-primary);
  color: var(--nx-lc-on-primary);
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.nx-lc-csat-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Input desabilitado quando atendimento encerrado */
#nx-lc-input:disabled {
  background: rgba(15, 23, 42, 0.04);
  color: var(--nx-lc-text-muted);
  cursor: not-allowed;
}
#nx-lc-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
}

/* ══════════════════════════════════════════════════════════════════════════
   ESTILOS DE APARÊNCIA (2026-07-24) — presets que o admin escolhe no
   parametrizador. Classes no <html> (chat.js::aplicarEstilos), pra a PRÉVIA do
   painel usar EXATAMENTE este mesmo CSS (a prévia é o chat real em modo
   preview — zero duplicação). Doc: docs/omni/LIVECHAT.md §7.5.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Header ── */
.nx-lc-hd-solido #nx-lc-header { background: var(--nx-lc-primary); color: var(--nx-lc-on-primary); }
.nx-lc-hd-escuro #nx-lc-header { background: #0f172a; }
.nx-lc-hd-claro #nx-lc-header {
  background: var(--nx-lc-bg);
  color: var(--nx-lc-text);
  border-bottom: 1px solid var(--nx-lc-border);
}
.nx-lc-hd-claro #nx-lc-close,
.nx-lc-hd-claro #nx-lc-menu-btn { color: var(--nx-lc-text); }
.nx-lc-hd-claro #nx-lc-avatar { border-color: var(--nx-lc-border); }
.nx-lc-hd-minimalista #nx-lc-header {
  background: transparent;
  color: var(--nx-lc-text);
  border-bottom: 1px solid var(--nx-lc-border);
  padding: 12px 16px;
}
.nx-lc-hd-minimalista #nx-lc-close,
.nx-lc-hd-minimalista #nx-lc-menu-btn { color: var(--nx-lc-text); }
.nx-lc-hd-minimalista #nx-lc-avatar { width: 28px; height: 28px; border: 0; }
.nx-lc-hd-minimalista #nx-lc-subtitle { display: none; }
/* Centralizado: avatar maior, textos no meio */
.nx-lc-hd-centralizado #nx-lc-header {
  flex-direction: column;
  text-align: center;
  gap: 6px;
  padding: 18px 16px 14px;
  position: relative;
}
.nx-lc-hd-centralizado #nx-lc-avatar { width: 52px; height: 52px; }
.nx-lc-hd-centralizado #nx-lc-close { position: absolute; top: 6px; right: 8px; margin: 0; }
.nx-lc-hd-centralizado #nx-lc-menu-btn { position: absolute; top: 6px; right: 50px; margin: 0; }

/* ── Bolhas ── */
.nx-lc-bb-quadrada .nx-lc-msg .bubble { border-radius: 4px; }
.nx-lc-bb-quadrada .nx-lc-msg.agent .bubble,
.nx-lc-bb-quadrada .nx-lc-msg.visitor .bubble { border-radius: 4px; }
/* Balão com "bico" (cauda) — o clássico de app de mensagem */
.nx-lc-bb-balao .nx-lc-msg .bubble { position: relative; }
.nx-lc-bb-balao .nx-lc-msg.agent .bubble { border-bottom-left-radius: 3px; }
.nx-lc-bb-balao .nx-lc-msg.visitor .bubble { border-bottom-right-radius: 3px; }
.nx-lc-bb-balao .nx-lc-msg.agent .bubble::after {
  content: ''; position: absolute; left: -6px; bottom: 0;
  border: 7px solid transparent;
  border-right-color: var(--nx-lc-bubble-in);
  border-bottom-color: var(--nx-lc-bubble-in);
}
.nx-lc-bb-balao .nx-lc-msg.visitor .bubble::after {
  content: ''; position: absolute; right: -6px; bottom: 0;
  border: 7px solid transparent;
  border-left-color: var(--nx-lc-bubble-out);
  border-bottom-color: var(--nx-lc-bubble-out);
}
/* Contorno: sem preenchimento, só borda (leve/minimal) */
.nx-lc-bb-contorno .nx-lc-msg.agent .bubble {
  background: transparent;
  border: 1px solid var(--nx-lc-border);
}
.nx-lc-bb-contorno .nx-lc-msg.visitor .bubble {
  background: transparent;
  border: 1px solid var(--nx-lc-bubble-out);
  color: var(--nx-lc-text);
}

/* ── Tamanho do texto ── */
.nx-lc-ts-pequeno .nx-lc-msg .bubble { font-size: 12.5px; }
.nx-lc-ts-grande .nx-lc-msg .bubble { font-size: 15px; }
.nx-lc-ts-grande #nx-lc-input { font-size: 15px; }

/* ── Avatar por preset (sem imagem): círculo com ícone/inicial na cor da marca ── */
#nx-lc-avatar-preset {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.4);
  font-size: 18px; line-height: 1; flex: 0 0 auto;
}
#nx-lc-avatar-preset.hidden { display: none; }
.nx-lc-hd-claro #nx-lc-avatar-preset,
.nx-lc-hd-minimalista #nx-lc-avatar-preset {
  background: var(--nx-lc-primary); color: var(--nx-lc-on-primary); border-color: var(--nx-lc-border);
}
.nx-lc-hd-centralizado #nx-lc-avatar-preset { width: 52px; height: 52px; font-size: 26px; }
.nx-lc-hd-minimalista #nx-lc-avatar-preset { width: 28px; height: 28px; font-size: 14px; border: 0; }
#nx-lc-avatar-preset.is-iniciais { font-size: 15px; font-weight: 700; }
