/* Chat da Nise no formato do Chat do Higgsfield: barra lateral de conversas, saudação grande no centro,
   atalhos em pílula e a caixa de pedido presa embaixo, com anexar, motor e modo Manual/Automático. */
#aba-chat.ativa { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; height: calc(100dvh - var(--topo-h, 67px)); padding-top: 14px; padding-bottom: 14px; }
#aba-chat { --ch-caixa: var(--fundo-2); --ch-borda: var(--linha); }

.ch-lado { border: 1px solid var(--ch-borda); background: var(--ch-caixa); border-radius: 20px; padding: 12px; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.ch-lado > button, .ch-busca { display: flex; align-items: center; gap: 10px; border: 0; border-radius: 12px; padding: 10px 12px; font-weight: 700; font-size: 14px; color: var(--texto); background: none; cursor: pointer; text-align: left; }
.ch-lado > button.ch-novo { background: var(--fundo-3); }
.ch-lado .ch-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; border: 1px solid var(--ch-borda); font-size: 15px; flex: none; }
.ch-busca { padding: 4px 6px; }
.ch-busca input { flex: 1; min-width: 0; border: 0; background: none; color: var(--texto); font: inherit; font-size: 14px; outline: none; }
.ch-rotulo { font-size: 12px; color: var(--texto-2); padding: 12px 12px 4px; }
.ch-lista { overflow: auto; display: grid; gap: 2px; align-content: start; min-height: 0; flex: 1; }
.ch-lista button { border: 0; background: none; color: var(--texto-2); text-align: left; padding: 9px 12px; border-radius: 10px; cursor: pointer; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-lista button:hover, .ch-lista button.ativo { background: var(--fundo-3); color: var(--texto); }
.ch-sem { text-align: center; color: var(--texto-2); font-size: 13px; padding: 26px 8px; display: grid; gap: 4px; justify-items: center; }
.ch-sem b { color: var(--texto); font-size: 15px; }
.ch-sem i { font-style: normal; width: 64px; height: 56px; border-radius: 12px; background: var(--fundo-3); display: grid; place-items: center; font-size: 22px; margin-bottom: 6px; }

.ch-meio { display: flex; flex-direction: column; min-height: 0; position: relative; }
.ch-rolagem { flex: 1; overflow: auto; padding: 10px 6px 20px; display: flex; flex-direction: column; }
.ch-boas { margin: auto; text-align: center; display: grid; gap: 22px; justify-items: center; padding: 20px; }
.ch-boas h1 { margin: 0; font-family: "Archivo", var(--fonte, sans-serif); font-stretch: 72%; font-weight: 900; font-size: clamp(30px, 4.4vw, 48px); text-transform: uppercase; letter-spacing: -0.01em; line-height: 1; }
.ch-boas h1 span { color: var(--acento); }
.ch-sugestoes { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 720px; }
.ch-sugestoes button { border: 1px solid var(--ch-borda); background: var(--ch-caixa); color: var(--texto); border-radius: 999px; padding: 11px 18px; font-size: 14.5px; cursor: pointer; }
.ch-sugestoes button:hover { border-color: var(--acento); }

.ch-msgs { width: min(100%, 820px); margin: 0 auto; display: grid; gap: 16px; }
.ch-msg { display: grid; gap: 8px; max-width: 86%; }
.ch-msg.eu { justify-self: end; justify-items: end; }
.ch-msg.eu .ch-bolha { background: var(--acento); color: var(--acento-txt, #fff); border-bottom-right-radius: 6px; }
.ch-msg.nise .ch-bolha { background: var(--ch-caixa); border: 1px solid var(--ch-borda); border-bottom-left-radius: 6px; }
.ch-bolha { padding: 11px 15px; border-radius: 18px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; }
.ch-anexo { width: 140px; border-radius: 14px; display: block; }
.ch-motor { font-size: 11px; color: var(--texto-2); }
.ch-plano { border: 1px solid var(--ch-borda); background: var(--ch-caixa); border-radius: 18px; padding: 14px; display: grid; gap: 10px; min-width: min(460px, 80vw); }
.ch-plano h4 { margin: 0; font-size: 14px; display: flex; justify-content: space-between; gap: 10px; }
.ch-plano h4 small { color: var(--texto-2); font-weight: 600; }
.ch-passos { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ch-passos li { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; background: var(--fundo-3); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.ch-passos li i { font-style: normal; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--ch-caixa); font-size: 12px; }
.ch-passos li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-passos li small { color: var(--texto-2); }
.ch-plano-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.ch-btn { border: 0; cursor: pointer; border-radius: 12px; padding: 10px 14px; font-weight: 800; font-size: 14px; background: var(--acento); color: var(--acento-txt, #fff); }
.ch-btn.sec { background: var(--fundo-3); color: var(--texto); }
.ch-pensando { color: var(--texto-2); font-size: 14px; display: flex; gap: 6px; align-items: center; }
.ch-pensando i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: ch-pulso 1s infinite; }
.ch-pensando i:nth-child(2) { animation-delay: 0.15s; }
.ch-pensando i:nth-child(3) { animation-delay: 0.3s; }
@keyframes ch-pulso { 50% { opacity: 0.25; } }

.ch-caixa-pedido { width: min(100%, 860px); margin: 0 auto; border: 1px solid var(--ch-borda); background: var(--ch-caixa); border-radius: 22px; padding: 14px 14px 10px; display: grid; gap: 10px; }
.ch-caixa-pedido textarea { width: 100%; border: 0; background: none; color: var(--texto); font: inherit; font-size: 15.5px; resize: none; outline: none; min-height: 26px; max-height: 180px; padding: 4px 6px; }
.ch-previa-anexo { display: flex; gap: 8px; align-items: center; }
.ch-previa-anexo img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.ch-previa-anexo button { border: 0; background: var(--fundo-3); color: var(--texto); border-radius: 8px; padding: 4px 8px; cursor: pointer; }
.ch-barra { display: flex; align-items: center; gap: 6px; }
.ch-barra .ch-redondo { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--ch-borda); background: none; color: var(--texto); font-size: 18px; cursor: pointer; display: grid; place-items: center; }
.ch-barra select { border: 0; background: none; color: var(--texto); font: inherit; font-size: 13.5px; font-weight: 700; padding: 8px 6px; border-radius: 10px; cursor: pointer; }
.ch-barra select:hover { background: var(--fundo-3); }
.ch-barra select option { background: var(--fundo-2); }
.ch-enviar { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--acento); color: var(--acento-txt, #fff); font-size: 18px; font-weight: 900; cursor: pointer; }
.ch-enviar:disabled { opacity: 0.45; cursor: default; }
.ch-aviso { width: min(100%, 860px); margin: 6px auto 0; font-size: 12px; color: var(--texto-2); text-align: center; }

@media (max-width: 860px) {
  #aba-chat.ativa { grid-template-columns: 1fr; height: auto; min-height: calc(100vh - 110px); }
  .ch-lado { max-height: 180px; }
  .ch-msg { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .ch-pensando i { animation: none; } }
