/*
 * Cottaz Conversation Layout 3.0.11
 * ÚNICA fonte de verdade para o layout após a primeira interação.
 * Nenhum outro CSS deve definir geometria por is-started/has-nia-results.
 */
:root{
  --cottaz-conversation-max:900px;
  --cottaz-conversation-gutter:24px;
  --cottaz-back-border:#c7ced8;
  --cottaz-back-icon:#344054;
  --cottaz-input-border:#d0d5dd;
  --cottaz-input-focus:#17191d;
}

/* Navegação só existe depois que a conversa começa. */
html body .cottaz-nia-app:not(.is-started) > .cottaz-nia-result-nav,
html body .cottaz-agent-hero:not(.is-started) .cottaz-nia-result-nav--hero{
  display:none!important;
}

/* ===== COTTAZ AI: após primeira interação ===== */
html body .cottaz-assistant-page.has-nia-chat .cottaz-assistant-page__hero,
html body .cottaz-assistant-page.is-nia-searching .cottaz-assistant-page__hero,
html body .cottaz-assistant-page.has-nia-conversation-results .cottaz-assistant-page__hero{
  height:calc(var(--cottaz-viewport-height,100dvh) - var(--cottaz-header-offset,0px))!important;
  min-height:520px!important;
  padding:0!important;
  overflow:hidden!important;
}

html body .cottaz-assistant-page.has-nia-chat .cottaz-assistant-page__hero-content,
html body .cottaz-assistant-page.is-nia-searching .cottaz-assistant-page__hero-content,
html body .cottaz-assistant-page.has-nia-conversation-results .cottaz-assistant-page__hero-content{
  box-sizing:border-box!important;
  display:block!important;
  width:100%!important;
  max-width:none!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:18px var(--cottaz-conversation-gutter) 12px!important;
  text-align:left!important;
}

/* Hero visual nunca reaparece dentro da conversa, inclusive nos resultados. */
html body .cottaz-assistant-page.has-nia-chat .cottaz-assistant-page__hero-content > .cottaz-orb,
html body .cottaz-assistant-page.has-nia-chat .cottaz-assistant-page__hero-content > h1,
html body .cottaz-assistant-page.has-nia-chat .cottaz-unified-result-heading,
html body .cottaz-assistant-page.is-nia-searching .cottaz-assistant-page__hero-content > .cottaz-orb,
html body .cottaz-assistant-page.is-nia-searching .cottaz-assistant-page__hero-content > h1,
html body .cottaz-assistant-page.is-nia-searching .cottaz-unified-result-heading,
html body .cottaz-assistant-page.has-nia-conversation-results .cottaz-assistant-page__hero-content > .cottaz-orb,
html body .cottaz-assistant-page.has-nia-conversation-results .cottaz-assistant-page__hero-content > h1,
html body .cottaz-assistant-page.has-nia-conversation-results .cottaz-unified-result-heading,
html body .cottaz-assistant-page.has-nia-chat .cottaz-nia-results-stage,
html body .cottaz-assistant-page.is-nia-searching .cottaz-nia-results-stage,
html body .cottaz-assistant-page.has-nia-conversation-results .cottaz-nia-results-stage{
  display:none!important;
}

/* ===== AGENT HERO: após primeira interação ===== */
html body .cottaz-agent-hero.is-started .cottaz-agent-hero__copy,
html body .cottaz-agent-hero.is-started .cottaz-agent-hero__identity,
html body .cottaz-agent-hero.is-started .cottaz-agent-hero__started-heading,
html body .cottaz-agent-hero.is-started .cottaz-agent-hero__choices,
html body .cottaz-agent-hero.is-started .cottaz-agent-hero__result-actions,
html body .cottaz-agent-hero.is-started .cottaz-agent-hero__voice-hint,
html body .cottaz-agent-hero.is-started .cottaz-orb,
html body .cottaz-agent-hero.is-started .cottaz-nia-results-stage{
  display:none!important;
}

html body .cottaz-agent-hero.is-started .cottaz-agent-hero__layout{
  box-sizing:border-box!important;
  display:block!important;
  width:100%!important;
  max-width:none!important;
  height:var(--cottaz-hero-height,100dvh)!important;
  min-height:520px!important;
  margin:0!important;
  padding:18px var(--cottaz-conversation-gutter) 12px!important;
}

/* ===== UM ÚNICO CONTAINER para AI, alias e Agent Hero ===== */
html body .cottaz-assistant-page .cottaz-nia-app.is-started,
html body .cottaz-nia-app--embedded.is-started:not(.cottaz-agent-hero),
html body .cottaz-agent-hero.is-started .cottaz-agent-hero__panel{
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr) auto!important;
  /* O Agent Hero nasce como flex com align-items:center. Ao virar grid,
     essa propriedade continuava válida e centralizava o histórico dentro
     da linha 1fr. Forçamos stretch para ficar idêntico ao [cottaz_ai]. */
  align-items:stretch!important;
  justify-items:stretch!important;
  width:min(var(--cottaz-conversation-max),100%)!important;
  max-width:var(--cottaz-conversation-max)!important;
  min-width:0!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  margin:0 auto!important;
  padding:0!important;
  position:relative!important;
  inset:auto!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  transform:none!important;
}

/* O welcome é estritamente inicial. */
html body .cottaz-nia-app.is-started .cottaz-nia-welcome{display:none!important}

/* Nav / histórico / resultado / input compartilham exatamente o mesmo eixo. */
html body .cottaz-nia-app.is-started > .cottaz-nia-result-nav,
html body .cottaz-nia-app.is-started .cottaz-nia-shell,
html body .cottaz-nia-app.is-started .cottaz-nia-conversation,
html body .cottaz-nia-app.is-started .cottaz-nia-messages,
html body .cottaz-nia-app.is-started .cottaz-nia-advisor-result-block,
html body .cottaz-nia-app.is-started .cottaz-nia-advisor-result-content,
html body .cottaz-nia-app.is-started .cottaz-nia-results,
html body .cottaz-nia-app.is-started .cottaz-nia-composer-wrap,
html body .cottaz-nia-app.is-started .cottaz-nia-composer,
html body .cottaz-agent-hero.is-started .cottaz-nia-result-nav--hero,
html body .cottaz-agent-hero.is-started .cottaz-nia-shell,
html body .cottaz-agent-hero.is-started .cottaz-nia-conversation,
html body .cottaz-agent-hero.is-started .cottaz-nia-messages,
html body .cottaz-agent-hero.is-started .cottaz-nia-advisor-result-block,
html body .cottaz-agent-hero.is-started .cottaz-nia-advisor-result-content,
html body .cottaz-agent-hero.is-started .cottaz-nia-results,
html body .cottaz-agent-hero.is-started .cottaz-nia-composer-wrap,
html body .cottaz-agent-hero.is-started .cottaz-nia-composer{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
  left:auto!important;
  right:auto!important;
  transform:none!important;
}

html body .cottaz-nia-app.is-started > .cottaz-nia-result-nav,
html body .cottaz-agent-hero.is-started .cottaz-nia-result-nav--hero{
  position:relative!important;
  inset:auto!important;
  display:flex!important;
  min-height:44px!important;
  flex:0 0 auto!important;
  align-items:center!important;
  justify-content:flex-start!important;
  margin:0 0 14px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}

html body .cottaz-nia-app.is-started .cottaz-nia-shell,
html body .cottaz-agent-hero.is-started .cottaz-nia-shell{
  display:block!important;
  min-height:0!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  scrollbar-width:none!important;
  scroll-behavior:auto!important;
  background:transparent!important;
  padding:0 0 12px!important;
}
html body .cottaz-nia-app.is-started .cottaz-nia-shell::-webkit-scrollbar,
html body .cottaz-agent-hero.is-started .cottaz-nia-shell::-webkit-scrollbar{display:none!important}

html body .cottaz-nia-app.is-started .cottaz-nia-conversation,
html body .cottaz-agent-hero.is-started .cottaz-nia-conversation{
  display:block!important;
  min-height:0!important;
  height:auto!important;
  padding:0!important;
  overflow:visible!important;
}

html body .cottaz-nia-app.is-started .cottaz-nia-messages,
html body .cottaz-agent-hero.is-started .cottaz-nia-messages{
  display:flex!important;
  min-height:0!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  gap:16px!important;
  padding:0!important;
}

html body .cottaz-nia-app.is-started .cottaz-nia-composer-wrap,
html body .cottaz-agent-hero.is-started .cottaz-nia-composer-wrap{
  flex:0 0 auto!important;
  margin:0!important;
  padding:10px 0 0!important;
  border:0!important;
  background:transparent!important;
}

/* Input com largura idêntica ao resultado; preto apenas no focus. */
html body .cottaz-nia-app.is-started .cottaz-nia-composer,
html body .cottaz-agent-hero.is-started .cottaz-nia-composer{
  min-height:64px!important;
  padding:6px 7px 6px 20px!important;
  border:1px solid var(--cottaz-input-border)!important;
  border-radius:999px!important;
  background:#fff!important;
  box-shadow:0 8px 24px rgba(16,24,40,.04)!important;
  transition:border-color .16s ease,box-shadow .16s ease!important;
}
html body .cottaz-nia-app.is-started .cottaz-nia-composer:hover,
html body .cottaz-agent-hero.is-started .cottaz-nia-composer:hover{border-color:#b8c0cc!important}
html body .cottaz-nia-app.is-started .cottaz-nia-composer:focus-within,
html body .cottaz-agent-hero.is-started .cottaz-nia-composer:focus-within{
  border-color:var(--cottaz-input-focus)!important;
  box-shadow:0 0 0 2px rgba(23,25,29,.06),0 8px 24px rgba(16,24,40,.04)!important;
}

/* Resultado é só mais uma mensagem: nunca cria um segundo layout. */
html body .cottaz-nia-advisor-result-block{align-items:flex-start!important}
html body .cottaz-nia-advisor-result-content{flex:1 1 0!important;min-width:0!important}
html body .cottaz-nia-advisor-results--editorial{width:100%!important;max-width:100%!important}

/* Só o Voltar; oculto antes da primeira interação. */
html body .cottaz-nia-result-nav__all{display:none!important}
html body button.cottaz-nia-result-nav__back{
  appearance:none!important;
  -webkit-appearance:none!important;
  display:grid!important;
  place-items:center!important;
  width:42px!important;
  min-width:42px!important;
  max-width:42px!important;
  height:42px!important;
  min-height:42px!important;
  max-height:42px!important;
  padding:0!important;
  margin:0!important;
  border:1px solid var(--cottaz-back-border)!important;
  border-radius:999px!important;
  background:#fff!important;
  color:var(--cottaz-back-icon)!important;
  box-shadow:0 4px 14px rgba(16,24,40,.045)!important;
  cursor:pointer!important;
  opacity:1!important;
  transition:background-color .16s ease,border-color .16s ease,color .16s ease!important;
}
html body button.cottaz-nia-result-nav__back svg{
  display:block!important;width:18px!important;height:18px!important;margin:0!important;
  fill:none!important;stroke:currentColor!important;stroke-width:2!important;
  stroke-linecap:round!important;stroke-linejoin:round!important;transform:none!important;
}
html body button.cottaz-nia-result-nav__back:hover,
html body button.cottaz-nia-result-nav__back:focus-visible{
  border-color:#17191d!important;background:#17191d!important;color:#fff!important;outline:none!important;
}
html body .cottaz-nia-result-nav__sr{
  position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;
  overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;
}

@media(max-width:760px){
  :root{--cottaz-conversation-gutter:14px}
  html body .cottaz-assistant-page.has-nia-chat .cottaz-assistant-page__hero,
  html body .cottaz-assistant-page.is-nia-searching .cottaz-assistant-page__hero,
  html body .cottaz-assistant-page.has-nia-conversation-results .cottaz-assistant-page__hero{
    height:calc(var(--cottaz-mobile-viewport-height,100svh) - var(--cottaz-header-offset,0px))!important;
    min-height:440px!important;
  }
  html body .cottaz-agent-hero.is-started .cottaz-agent-hero__layout{
    height:var(--cottaz-hero-height,100svh)!important;
    min-height:440px!important;
  }
  html body button.cottaz-nia-result-nav__back{
    width:40px!important;min-width:40px!important;max-width:40px!important;
    height:40px!important;min-height:40px!important;max-height:40px!important;
  }
  html body .cottaz-nia-app.is-started .cottaz-nia-composer,
  html body .cottaz-agent-hero.is-started .cottaz-nia-composer{
    min-height:60px!important;padding-left:16px!important;
  }
}


/* ==========================================================
 * 3.0.2 — botão Voltar somente durante a conversa
 *
 * Estado inicial:
 * - nenhuma seta / nenhum controle de voltar dentro da hero.
 *
 * Após a primeira interação (`is-started`):
 * - botão circular Voltar aparece no topo da conversa.
 * ========================================================== */

/* Esconde completamente a navegação no estado inicial. */
html body .cottaz-agent-hero:not(.is-started) .cottaz-nia-result-nav--hero,
html body .cottaz-assistant-page .cottaz-nia-app:not(.is-started) > .cottaz-nia-result-nav--page,
html body .cottaz-nia-app--embedded:not(.is-started) > .cottaz-nia-result-nav{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}

/* A navegação passa a existir visualmente só depois do primeiro turno. */
html body .cottaz-agent-hero.is-started .cottaz-nia-result-nav--hero,
html body .cottaz-assistant-page .cottaz-nia-app.is-started > .cottaz-nia-result-nav--page,
html body .cottaz-nia-app--embedded.is-started > .cottaz-nia-result-nav{
  display:flex!important;
  visibility:visible!important;
  pointer-events:auto!important;
}

/* Mantém somente a seta; nenhum link/CTA secundário na barra. */
html body .cottaz-nia-result-nav__all{
  display:none!important;
}


/* ==========================================================
 * 3.0.4 — AGENT HERO FULL-BLEED + CONVERSA CENTRAL
 * Correção específica para páginas Elementor/tema com container
 * central e background escuro.
 * ========================================================== */

/*
 * O Agent Hero é uma experiência clara da BR, independentemente
 * da paleta do tema. Não herda o modo dark do embedded.
 */
html body .cottaz-agent-hero{
  --cottaz-bg:#fff6e3!important;
  --cottaz-surface:#ffffff!important;
  /* Mesmos tokens cromáticos da página [cottaz_ai]. */
  --cottaz-soft:color-mix(in srgb,var(--cottaz-secondary) 11%,#fff)!important;
  --cottaz-ink:#17202a!important;
  --cottaz-muted:#667085!important;
  --cottaz-line:color-mix(in srgb,var(--cottaz-secondary) 22%,#dfe5ec)!important;
  color-scheme:light!important;

  position:relative!important;
  left:50%!important;
  right:auto!important;
  width:100vw!important;
  min-width:100vw!important;
  max-width:100vw!important;
  margin-left:-50vw!important;
  margin-right:0!important;
  padding:0!important;
  overflow:hidden!important;
  background:linear-gradient(
    180deg,
    #fff 0%,
    color-mix(in srgb,#fff6e3 22%,#fff) 20%,
    color-mix(in srgb,#fff6e3 58%,#fff) 48%,
    #fff6e3 76%,
    #fff6e3 100%
  )!important;
}

/* Libera somente clipping dos wrappers que contêm o shortcode. */
html body .elementor-element:has(.cottaz-agent-hero),
html body .elementor-widget-shortcode:has(.cottaz-agent-hero),
html body .elementor-widget-container:has(.cottaz-agent-hero),
html body .e-con:has(.cottaz-agent-hero),
html body .e-con-inner:has(.cottaz-agent-hero){
  overflow:visible!important;
  overflow-x:visible!important;
}

/* Estado de conversa: root full viewport; conteúdo útil central. */
html body .cottaz-agent-hero.is-started .cottaz-agent-hero__layout{
  box-sizing:border-box!important;
  display:block!important;
  width:100%!important;
  max-width:none!important;
  height:var(--cottaz-hero-height,100dvh)!important;
  min-height:520px!important;
  margin:0!important;
  padding:18px 24px 12px!important;
}

html body .cottaz-agent-hero.is-started .cottaz-agent-hero__panel{
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr) auto!important;
  align-items:stretch!important;
  justify-items:stretch!important;
  width:min(var(--cottaz-conversation-max),calc(100vw - 48px))!important;
  max-width:var(--cottaz-conversation-max)!important;
  min-width:0!important;
  height:100%!important;
  min-height:0!important;
  margin:0 auto!important;
  padding:0!important;
  overflow:hidden!important;
  background:transparent!important;
  color:#17202a!important;
  left:auto!important;
  right:auto!important;
  transform:none!important;
}

/* Todo o fluxo usa o mesmo eixo do panel — sem segundo container. */
html body .cottaz-agent-hero.is-started .cottaz-nia-result-nav--hero,
html body .cottaz-agent-hero.is-started .cottaz-nia-shell,
html body .cottaz-agent-hero.is-started .cottaz-nia-conversation,
html body .cottaz-agent-hero.is-started .cottaz-nia-messages,
html body .cottaz-agent-hero.is-started .cottaz-nia-advisor-result-block,
html body .cottaz-agent-hero.is-started .cottaz-nia-advisor-result-content,
html body .cottaz-agent-hero.is-started .cottaz-nia-results,
html body .cottaz-agent-hero.is-started .cottaz-nia-composer-wrap,
html body .cottaz-agent-hero.is-started .cottaz-nia-composer{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
  left:auto!important;
  right:auto!important;
  transform:none!important;
}

/* Fundo do histórico/composer continua claro mesmo em tema escuro. */
html body .cottaz-agent-hero.is-started .cottaz-nia-shell,
html body .cottaz-agent-hero.is-started .cottaz-nia-conversation,
html body .cottaz-agent-hero.is-started .cottaz-nia-messages{
  background:transparent!important;
}
html body .cottaz-agent-hero.is-started .cottaz-nia-shell{
  align-self:stretch!important;
}
html body .cottaz-agent-hero.is-started .cottaz-nia-composer-wrap{
  background:transparent!important;
}

@media(max-width:760px){
  html body .cottaz-agent-hero.is-started .cottaz-agent-hero__layout{
    padding-left:14px!important;
    padding-right:14px!important;
  }
  html body .cottaz-agent-hero.is-started .cottaz-agent-hero__panel{
    width:calc(100vw - 28px)!important;
    max-width:none!important;
  }
}


/* ==========================================================
 * 3.0.5 — CORREÇÃO DE HERANÇA DO AGENT HERO
 *
 * O root do [cottaz_agent_hero] também carrega a classe
 * .cottaz-nia-app--embedded. A regra genérica de embedded
 * estava transformando o próprio Hero em um container de
 * conversa transparente/limitado, expondo o fundo preto do tema.
 *
 * Agora: root = full-bleed claro; panel = conversa central 900px.
 * ========================================================== */
html body .cottaz-agent-hero.cottaz-nia-app--embedded.is-started{
  position:relative!important;
  left:50%!important;
  right:auto!important;
  width:100vw!important;
  min-width:100vw!important;
  max-width:100vw!important;
  min-height:var(--cottaz-hero-height,100dvh)!important;
  margin-left:-50vw!important;
  margin-right:0!important;
  padding:0!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:0!important;
  background:linear-gradient(
    180deg,
    #fff 0%,
    color-mix(in srgb,#fff6e3 22%,#fff) 20%,
    color-mix(in srgb,#fff6e3 58%,#fff) 48%,
    #fff6e3 76%,
    #fff6e3 100%
  )!important;
  color:#17202a!important;
  box-shadow:none!important;
  transform:none!important;
}

html body .cottaz-agent-hero.cottaz-nia-app--embedded.is-started .cottaz-agent-hero__panel{
  width:min(var(--cottaz-conversation-max),calc(100vw - 48px))!important;
  max-width:var(--cottaz-conversation-max)!important;
  margin-inline:auto!important;
  background:transparent!important;
}

@media(max-width:760px){
  html body .cottaz-agent-hero.cottaz-nia-app--embedded.is-started .cottaz-agent-hero__panel{
    width:calc(100vw - 28px)!important;
    max-width:none!important;
  }
}


/* ==========================================================
 * 3.0.6 — PARIDADE VISUAL DA CONVERSA
 *
 * [cottaz_ai] e [cottaz_agent_hero] passam a usar exatamente
 * os mesmos estilos depois da primeira interação.
 * O Agent Hero deixa de herdar tamanhos próprios de input,
 * microfone, enviar e tipografia do estado editorial.
 * ========================================================== */

/* A conversa usa a mesma tipografia nos dois shortcodes. */
html body .cottaz-assistant-page .cottaz-nia-app.is-started,
html body .cottaz-agent-hero.is-started .cottaz-agent-hero__panel{
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
}

/* Mesma estrutura de cada turno. */
html body .cottaz-assistant-page .cottaz-nia-app.is-started .cottaz-nia-msg,
html body .cottaz-agent-hero.is-started .cottaz-nia-msg{
  display:flex!important;
  align-items:flex-start!important;
  gap:10px!important;
}

html body .cottaz-assistant-page .cottaz-nia-app.is-started .cottaz-nia-msg.user,
html body .cottaz-agent-hero.is-started .cottaz-nia-msg.user{
  justify-content:flex-end!important;
}

/* Mesma geometria das bolhas. */
html body .cottaz-assistant-page .cottaz-nia-app.is-started .cottaz-nia-bubble,
html body .cottaz-agent-hero.is-started .cottaz-nia-bubble{
  padding:13px 15px!important;
  border:1px solid var(--cottaz-line)!important;
  border-radius:18px!important;
  font-size:14px!important;
  font-weight:400!important;
  line-height:1.58!important;
  white-space:pre-wrap!important;
}

html body .cottaz-assistant-page .cottaz-nia-app.is-started .cottaz-nia-msg.assistant .cottaz-nia-bubble,
html body .cottaz-agent-hero.is-started .cottaz-nia-msg.assistant .cottaz-nia-bubble{
  max-width:min(88%,680px)!important;
  background:var(--cottaz-soft)!important;
  color:var(--cottaz-ink)!important;
}

html body .cottaz-assistant-page .cottaz-nia-app.is-started .cottaz-nia-msg.user .cottaz-nia-bubble,
html body .cottaz-agent-hero.is-started .cottaz-nia-msg.user .cottaz-nia-bubble{
  max-width:min(82%,620px)!important;
  border-color:var(--cottaz-primary)!important;
  background:var(--cottaz-primary)!important;
  color:var(--cottaz-primary-text)!important;
}

/* Mesmos avatares/marks. */
html body .cottaz-assistant-page .cottaz-nia-app.is-started .cottaz-nia-mini-mark,
html body .cottaz-assistant-page .cottaz-nia-app.is-started .cottaz-nia-user-mark,
html body .cottaz-agent-hero.is-started .cottaz-nia-mini-mark,
html body .cottaz-agent-hero.is-started .cottaz-nia-user-mark{
  display:grid!important;
  width:30px!important;
  min-width:30px!important;
  height:30px!important;
  flex:0 0 30px!important;
  place-items:center!important;
  margin-top:2px!important;
  border:1px solid var(--cottaz-line)!important;
  border-radius:50%!important;
}

html body .cottaz-assistant-page .cottaz-nia-app.is-started .cottaz-nia-mini-mark,
html body .cottaz-agent-hero.is-started .cottaz-nia-mini-mark{
  background:var(--cottaz-surface)!important;
  color:var(--cottaz-ink)!important;
}

html body .cottaz-assistant-page .cottaz-nia-app.is-started .cottaz-nia-user-mark,
html body .cottaz-agent-hero.is-started .cottaz-nia-user-mark{
  border-color:var(--cottaz-primary)!important;
  background:var(--cottaz-primary)!important;
  color:var(--cottaz-primary-text)!important;
}

/* Input: mesmas dimensões e mesma tipografia. */
html body .cottaz-assistant-page .cottaz-nia-app.is-started .cottaz-nia-composer textarea,
html body .cottaz-agent-hero.is-started .cottaz-nia-composer textarea{
  display:block!important;
  height:24px!important;
  min-width:0!important;
  min-height:24px!important;
  max-height:120px!important;
  flex:1 1 auto!important;
  padding:0!important;
  margin:0!important;
  overflow:hidden!important;
  resize:none!important;
  border:0!important;
  outline:0!important;
  background:transparent!important;
  color:var(--cottaz-ink)!important;
  box-shadow:none!important;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  font-size:14px!important;
  line-height:24px!important;
}

html body .cottaz-assistant-page .cottaz-nia-app.is-started .cottaz-nia-actions,
html body .cottaz-agent-hero.is-started .cottaz-nia-actions{
  display:flex!important;
  flex:0 0 auto!important;
  align-items:center!important;
  gap:8px!important;
  margin-left:auto!important;
}

/* Agent Hero usava 52px; agora ambos usam 42px. */
html body .cottaz-assistant-page .cottaz-nia-app.is-started .cottaz-nia-actions .cottaz-nia-voice,
html body .cottaz-assistant-page .cottaz-nia-app.is-started .cottaz-nia-actions .cottaz-nia-send,
html body .cottaz-agent-hero.is-started .cottaz-nia-actions .cottaz-nia-voice,
html body .cottaz-agent-hero.is-started .cottaz-nia-actions .cottaz-nia-send{
  width:42px!important;
  min-width:42px!important;
  max-width:42px!important;
  height:42px!important;
  min-height:42px!important;
  max-height:42px!important;
  flex:0 0 42px!important;
  padding:0!important;
}

html body .cottaz-assistant-page .cottaz-nia-app.is-started .cottaz-nia-actions .cottaz-nia-voice svg,
html body .cottaz-assistant-page .cottaz-nia-app.is-started .cottaz-nia-actions .cottaz-nia-send svg,
html body .cottaz-agent-hero.is-started .cottaz-nia-actions .cottaz-nia-voice svg,
html body .cottaz-agent-hero.is-started .cottaz-nia-actions .cottaz-nia-send svg{
  width:18px!important;
  height:18px!important;
}

/* Disclaimer no mesmo eixo/tamanho. */
html body .cottaz-assistant-page .cottaz-nia-app.is-started .cottaz-nia-disclaimer,
html body .cottaz-agent-hero.is-started .cottaz-nia-disclaimer{
  width:100%!important;
  max-width:none!important;
  margin:8px 0 0!important;
  color:var(--cottaz-muted)!important;
  font-size:11px!important;
  line-height:1.45!important;
  text-align:center!important;
}

/* Os resultados já compartilham o componente; reforça a mesma largura. */
html body .cottaz-assistant-page .cottaz-nia-app.is-started .cottaz-nia-advisor-result-block,
html body .cottaz-agent-hero.is-started .cottaz-nia-advisor-result-block{
  width:100%!important;
  max-width:100%!important;
}

@media(max-width:600px){
  html body .cottaz-assistant-page .cottaz-nia-app.is-started .cottaz-nia-bubble,
  html body .cottaz-agent-hero.is-started .cottaz-nia-bubble{
    padding:12px 13px!important;
    font-size:13px!important;
  }

  html body .cottaz-assistant-page .cottaz-nia-app.is-started .cottaz-nia-msg.assistant .cottaz-nia-bubble,
  html body .cottaz-agent-hero.is-started .cottaz-nia-msg.assistant .cottaz-nia-bubble{
    max-width:calc(100% - 40px)!important;
  }

  html body .cottaz-assistant-page .cottaz-nia-app.is-started .cottaz-nia-msg.user .cottaz-nia-bubble,
  html body .cottaz-agent-hero.is-started .cottaz-nia-msg.user .cottaz-nia-bubble{
    max-width:88%!important;
  }
}


/* ==========================================================
 * 3.0.8 — PARIDADE DO AGENT HERO COM A COTTAZ AI
 * - resposta da IA usa o mesmo soft/line derivado da cor secundária;
 * - histórico ocupa o topo da linha de conversa, sem centralização vertical.
 * ========================================================== */


/* ==========================================================
 * 3.0.11 — MOBILE ONLY: teclado + cards responsivos
 * Nenhuma regra abaixo atua no desktop.
 * ========================================================== */
@media(max-width:760px){
  /* Agent Hero: quando o teclado abre, removemos apenas o min-height
     que impedia a grid de encolher até a altura real do VisualViewport. */
  html body .cottaz-agent-hero.has-mobile-keyboard.is-started{
    height:calc(var(--cottaz-mobile-viewport-height,100svh) - var(--cottaz-header-offset,0px))!important;
    min-height:0!important;
    overflow:hidden!important;
  }

  html body .cottaz-agent-hero.has-mobile-keyboard.is-started .cottaz-agent-hero__layout{
    height:100%!important;
    min-height:0!important;
    padding:12px 14px 8px!important;
  }

  html body .cottaz-agent-hero.has-mobile-keyboard.is-started .cottaz-agent-hero__panel{
    height:100%!important;
    min-height:0!important;
  }

  html body .cottaz-agent-hero.has-mobile-keyboard.is-started .cottaz-nia-result-nav--hero{
    margin-bottom:8px!important;
  }

  html body .cottaz-agent-hero.has-mobile-keyboard.is-started .cottaz-nia-shell{
    min-height:0!important;
    padding-bottom:6px!important;
  }

  html body .cottaz-agent-hero.has-mobile-keyboard.is-started .cottaz-nia-composer-wrap{
    position:relative!important;
    inset:auto!important;
    padding:6px 0 0!important;
    background:transparent!important;
  }
}

@media(max-width:600px){
  /* Cards de recomendação: nunca ultrapassam a largura interna disponível.
     Antes, 82vw podia ser maior que o conteúdo após avatar + paddings. */
  html body .cottaz-nia-advisor-results--editorial{
    scroll-padding-inline:0!important;
  }

  html body .cottaz-nia-advisor-card--editorial{
    width:100%!important;
    min-width:100%!important;
    max-width:100%!important;
    flex:0 0 100%!important;
  }
}
