/* Chat de vendas — empilhado ACIMA do botão do WhatsApp (que fica em bottom:20px). */
.iav-abrir {
    position: fixed; bottom: 90px; right: 20px; z-index: 9998;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 18px; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--brand, #db2777); color: #fff;
    font: 600 .92rem/1 inherit;
    box-shadow: 0 6px 18px rgba(219, 39, 119, .35);
    transition: transform .15s, box-shadow .15s, background .15s;
}
.iav-abrir:hover { background: var(--brand-dark, #9d174d); transform: translateY(-2px); }
.iav-abrir[hidden] { display: none; }

.iav-painel {
    position: fixed; bottom: 90px; right: 20px; z-index: 9998;
    width: min(370px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 130px));
    display: flex; flex-direction: column; overflow: hidden;
    background: #fff; border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
}
.iav-painel[hidden] { display: none; }

.iav-cab {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 16px; background: var(--brand, #db2777); color: #fff;
}
.iav-cab strong { display: block; font-size: .98rem; }
.iav-cab span   { display: block; font-size: .76rem; opacity: .85; }
.iav-fechar {
    background: none; border: 0; color: #fff; font-size: 1.6rem; line-height: 1;
    cursor: pointer; padding: 0 4px; opacity: .85;
}
.iav-fechar:hover { opacity: 1; }

.iav-lgpd {
    margin: 0; padding: 10px 16px; font-size: .72rem; line-height: 1.45;
    color: #6b7280; background: #fdf2f8; border-bottom: 1px solid #fce7f3;
}

.iav-msgs {
    flex: 1; min-height: 180px; overflow-y: auto;
    padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
    background: #fafafa;
}
.iav-msg {
    max-width: 85%; padding: 9px 13px; border-radius: 14px;
    font-size: .88rem; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word;
}
.iav-msg.ia        { align-self: flex-start; background: #fff; border: 1px solid #eee; border-bottom-left-radius: 4px; }
.iav-msg.visitante { align-self: flex-end;   background: var(--brand, #db2777); color: #fff; border-bottom-right-radius: 4px; }
.iav-msg.erro      { align-self: center; background: #fef2f2; color: #b91c1c; font-size: .8rem; }

.iav-pensando { align-self: flex-start; display: flex; gap: 4px; padding: 11px 14px; }
.iav-pensando i {
    width: 6px; height: 6px; border-radius: 50%; background: #d1d5db;
    animation: iavPulso 1.2s infinite ease-in-out;
}
.iav-pensando i:nth-child(2) { animation-delay: .18s; }
.iav-pensando i:nth-child(3) { animation-delay: .36s; }
@keyframes iavPulso { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.iav-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #eee; background: #fff; }
.iav-form input {
    flex: 1; padding: 10px 14px; border: 1px solid #e5e7eb; border-radius: 999px;
    font-size: .88rem; outline: none; font-family: inherit;
}
.iav-form input:focus { border-color: var(--brand, #db2777); }
.iav-form button {
    width: 40px; height: 40px; flex-shrink: 0; border: 0; border-radius: 50%; cursor: pointer;
    background: var(--brand, #db2777); color: #fff; display: grid; place-items: center;
}
.iav-form button:disabled { opacity: .5; cursor: default; }

.iav-humano {
    display: block; padding: 9px; text-align: center; font-size: .76rem;
    color: #6b7280; text-decoration: none; border-top: 1px solid #f3f4f6; background: #fff;
}
.iav-humano:hover { color: var(--brand, #db2777); }

@media (max-width: 480px) {
    .iav-abrir  { bottom: 78px; right: 16px; padding: 11px 16px; font-size: .86rem; }
    .iav-painel { bottom: 16px; right: 16px; left: 16px; width: auto; max-height: calc(100vh - 32px); }
}

/* Escolhas clicáveis que a IA anexa à pergunta (massa, recheio, laço...). */
.iav-opcoes { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; max-width: 100%; margin: -2px 0 2px; }
.iav-opcoes-tit { width: 100%; font-size: .72rem; color: #9ca3af; margin-bottom: 2px; }
.iav-chip {
    border: 1px solid var(--brand, #db2777); background: #fff; color: var(--brand, #db2777);
    border-radius: 999px; padding: 7px 14px; font: 600 .82rem/1 inherit; cursor: pointer;
    transition: background .15s, color .15s;
}
.iav-chip:hover  { background: var(--brand, #db2777); color: #fff; }
.iav-chip:active { transform: translateY(1px); }

.iav-link { color: var(--brand-dark, #9d174d); text-decoration: underline; word-break: break-all; }
.iav-msg.visitante .iav-link { color: #fff; }
