/* 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-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; } }

/* Caixa de pedido no formato do Marketing Studio do Higgsfield: texto e opções à esquerda,
   espaços fixos de Avatar e Produto e o botão Criar à direita. Vidro fosco, sem bordas pesadas. */
.ch-caixa-pedido { position: relative; width: min(100%, 940px); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding: 8px; border-radius: 26px; background: var(--vidro-fundo); -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%); border: 1px solid var(--vidro-borda); box-shadow: var(--vidro-sombra); }
.ch-principal { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px 4px 2px 10px; }
.ch-caixa-pedido textarea { flex: 1; width: 100%; border: 0 !important; background: none !important; box-shadow: none !important; color: var(--texto); font: inherit; font-size: 15.5px; line-height: 1.45; resize: none; outline: none; min-height: 48px; max-height: 180px; padding: 2px 4px !important; }
.ch-caixa-pedido textarea::placeholder { color: var(--texto-2); }
.ch-previa-anexo { display: flex; gap: 8px; align-items: center; }
.ch-previa-anexo img { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; }
.ch-previa-anexo button { border: 0; background: var(--vidro-item); color: var(--texto); border-radius: 8px; padding: 4px 9px; cursor: pointer; font-size: 12.5px; }
.ch-barra { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ch-barra .ch-redondo { width: 36px; height: 36px; border-radius: 12px; border: 0; background: var(--vidro-item); color: var(--texto); cursor: pointer; display: grid; place-items: center; }
.ch-barra .ch-redondo .ic { width: 17px; height: 17px; }
.ch-barra select { border: 0 !important; background-color: var(--vidro-item) !important; color: var(--texto); font: inherit; font-size: 13.5px; font-weight: 600; padding: 9px 30px 9px 12px !important; border-radius: 12px !important; cursor: pointer; }
.ch-barra select:hover { background-color: rgb(255 255 255 / 12%) !important; }
:root[data-theme="light"] .ch-barra select:hover { background-color: rgb(0 0 0 / 8%) !important; }
.ch-barra .ch-redondo:hover { background: rgb(255 255 255 / 12%); }

.ch-slots { display: flex; gap: 8px; }
.ch-slot { position: relative; width: 96px; min-height: 112px; height: 100%; border: 1px solid var(--vidro-borda); border-radius: 18px; background: var(--vidro-item) center / cover no-repeat; color: var(--texto); cursor: pointer; padding: 0; overflow: hidden; transition: transform .15s, border-color .15s; }
.ch-slot:hover { transform: translateY(-2px); border-color: rgb(164 107 255 / 45%); }
.ch-slot.aberto { border-color: var(--neon); box-shadow: 0 0 0 3px var(--acento-suave); }
.ch-slot > i { position: absolute; top: 9px; left: 9px; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid currentColor; opacity: .75; display: grid; place-items: center; }
.ch-slot > i .ic { width: 14px; height: 14px; }
.ch-slot-nome { position: absolute; left: 10px; bottom: 9px; font: 800 11.5px/1 Inter, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.ch-slot.cheio::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgb(0 0 0 / 70%)); pointer-events: none; }
.ch-slot.cheio .ch-slot-nome { z-index: 1; color: #fff; }
.ch-slot-x { position: absolute; z-index: 2; top: 7px; right: 7px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgb(0 0 0 / 55%); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ch-slot-x .ic { width: 12px; height: 12px; }

.ch-enviar { width: 116px; min-height: 112px; border: 0; border-radius: 18px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(160deg, #b48bff, var(--neon-fundo, #8a4dff) 60%); color: #fff; font: 800 14px/1 Inter, sans-serif; letter-spacing: .06em; text-transform: uppercase; box-shadow: inset 0 1px 0 rgb(255 255 255 / 25%), 0 10px 30px rgb(138 77 255 / 30%); transition: filter .15s, transform .15s; }
.ch-enviar .ic { width: 18px; height: 18px; transform: rotate(-90deg); }
.ch-enviar:hover { filter: brightness(1.08); }
.ch-enviar:active { transform: scale(.98); }
.ch-enviar:disabled { opacity: 0.45; cursor: default; filter: none; transform: none; }

/* dentro da caixa de vidro o desfoque não pega o fundo da página, então o menu fica quase opaco */
.ch-pop.sel-menu { position: absolute; background: color-mix(in srgb, var(--fundo-2) 94%, transparent); bottom: calc(100% + 10px); top: auto; width: 320px; max-height: min(400px, calc(100dvh - var(--topo-h, 67px) - 190px)); z-index: 60; animation-name: sel-entra-cima; }
.sel-item.ch-pop-item { grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; padding: 8px 12px 8px 8px; width: 100%; border: 0; background: none; color: var(--texto); text-align: left; font: inherit; }
.ch-pop-item:hover { background: var(--vidro-item); }
.ch-pop-item > span { display: grid; gap: 2px; min-width: 0; }
.ch-pop-item b, .ch-pop-item small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-pop-item b { font-weight: 600; }
.ch-pop-item small { color: var(--texto-2); font-size: 12.5px; }
.ch-pop-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--vidro-item); display: grid; place-items: center; object-fit: cover; font-style: normal; }
.ch-pop-ic .ic { width: 18px; height: 18px; }

.ch-anexos { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ch-anexo { position: relative; margin: 0; width: 110px; border-radius: 14px; overflow: hidden; }
.ch-anexo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.ch-anexo figcaption { position: absolute; left: 8px; bottom: 7px; font: 800 10.5px/1 Inter, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 6px rgb(0 0 0 / 60%); }
.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%; }
  .ch-caixa-pedido { grid-template-columns: 1fr auto; }
  .ch-principal { grid-column: 1 / -1; }
  .ch-slot { width: 76px; min-height: 84px; }
  .ch-enviar { width: 96px; min-height: 84px; }
  .ch-pop.sel-menu { width: min(320px, calc(100vw - 40px)); }
}
@media (prefers-reduced-motion: reduce) { .ch-pensando i { animation: none; } }
