/*
 * Central NST - NovaBot, o assistente do site (19/10/2026, tarefa #1107)
 * Nova System Tecnologias - Ismaire Zicardi, Especialista de Processos.
 * No traço da landing (nst-traco.css): navy, âmbar, letra à mão só nos títulos e no grifo.
 */
.nst-atd { --atd-navy: #0B1F3A; --atd-navy2: #16325C; --atd-azul: #1D4ED8; --atd-ambar: #F59E0B; --atd-linha: #E2E8F0;
    --atd-mao: 'Caveat', 'Segoe Print', cursive; font-family: 'Open Sans', system-ui, sans-serif; }
body.nst-atd-on #btn-back-to-top { bottom: 98px; }

/* botão que abre */
.nst-atd-abrir { position: fixed; right: 22px; bottom: 22px; z-index: 1055; display: flex; align-items: center; gap: 10px;
    background: var(--atd-navy); color: #fff; border: 0; border-radius: 40px; padding: 10px 18px 10px 12px; cursor: pointer;
    box-shadow: 0 10px 28px rgba(11, 31, 58, .32); transition: transform .2s, box-shadow .2s; }
.nst-atd-abrir:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(11, 31, 58, .38); }
.nst-atd-abrir:focus-visible { outline: 3px solid var(--atd-ambar); outline-offset: 3px; }
.nst-atd-abrir .ic { width: 54px; height: 54px; border-radius: 50%; background: #fff; color: var(--atd-navy); display: grid; place-items: center; flex: none; overflow: hidden; margin: -4px 0; }
.nst-atd-abrir .ic svg { width: 54px; height: 54px; display: block; }
.nst-atd-abrir .tx { display: flex; flex-direction: column; text-align: left; line-height: 1.05; }
.nst-atd-abrir .tx b { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: .86rem; letter-spacing: .02em; }
.nst-atd-abrir .tx i { font-family: var(--atd-mao); font-style: normal; font-weight: 700; font-size: 1.12rem; color: var(--atd-ambar); }
.nst-atd.aberto .nst-atd-abrir { display: none; }

/* janela */
.nst-atd-janela { position: fixed; right: 22px; bottom: 22px; z-index: 1060; width: 380px; max-width: calc(100vw - 32px);
    height: 600px; max-height: calc(100vh - 44px); background: #fff; border-radius: 18px; border: 1px solid var(--atd-linha);
    box-shadow: 0 24px 60px rgba(11, 31, 58, .28); display: none; flex-direction: column; overflow: hidden; }
.nst-atd.aberto .nst-atd-janela { display: flex; animation: nstAtdEntra .22s ease-out; }
@keyframes nstAtdEntra { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.nst-atd-topo { background: var(--atd-navy); color: #fff; padding: 14px 14px 12px 16px; display: flex; align-items: center; gap: 10px; flex: none; }
.nst-atd-topo .av { width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--atd-navy); display: grid; place-items: center; flex: none; overflow: hidden; }
.nst-atd-topo .av svg { width: 42px; height: 42px; display: block; }
.nst-atd-topo .nm { flex: 1; min-width: 0; line-height: 1.1; }
.nst-atd-topo .nm b { display: block; font-family: 'Montserrat', sans-serif; font-size: .95rem; }
.nst-atd-topo .nm i { font-family: var(--atd-mao); font-style: normal; font-weight: 700; font-size: 1.05rem; color: var(--atd-ambar); }
.nst-atd-topo button { background: transparent; border: 0; color: #fff; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: 1.2rem; line-height: 1; }
.nst-atd-topo button:hover { background: rgba(255, 255, 255, .12); }
.nst-atd-topo button:focus-visible { outline: 2px solid var(--atd-ambar); }

.nst-atd-corpo { flex: 1; overflow-y: auto; padding: 14px 14px 6px; background: #F8FAFC; scroll-behavior: smooth; }
.nst-atd-msg { max-width: 86%; margin: 0 0 10px; padding: 9px 12px; border-radius: 14px; font-size: .9rem; line-height: 1.45; white-space: pre-line; word-wrap: break-word; }
.nst-atd-msg.bot { background: #fff; border: 1px solid var(--atd-linha); color: #1E293B; border-bottom-left-radius: 4px; }
.nst-atd-msg.eu { background: var(--atd-navy2); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.nst-atd-msg a.lk { display: inline-block; margin-top: 6px; color: var(--atd-azul); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--atd-ambar); }
.nst-atd-digitando { display: inline-flex; gap: 4px; padding: 12px 14px; }
.nst-atd-digitando span { width: 6px; height: 6px; border-radius: 50%; background: #94A3B8; animation: nstAtdPisca 1s infinite; }
.nst-atd-digitando span:nth-child(2) { animation-delay: .15s; } .nst-atd-digitando span:nth-child(3) { animation-delay: .3s; }
@keyframes nstAtdPisca { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

.nst-atd-opcoes { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 12px; }
.nst-atd-opcoes button { background: #fff; border: 1.5px solid var(--atd-navy2); color: var(--atd-navy); border-radius: 18px; padding: 6px 12px;
    font-size: .82rem; cursor: pointer; text-align: left; font-family: inherit; }
.nst-atd-opcoes button:hover { background: var(--atd-navy); color: #fff; }
.nst-atd-opcoes button.pessoa { border-color: var(--atd-ambar); }
.nst-atd-opcoes button:focus-visible { outline: 2px solid var(--atd-ambar); outline-offset: 1px; }

/* cartão do atendente */
.nst-atd-cartao { background: #fff; border: 1px solid var(--atd-linha); border-radius: 14px; padding: 14px; margin: 0 0 12px; }
.nst-atd-cartao .quem { display: flex; align-items: center; gap: 10px; }
.nst-atd-cartao .ini { width: 42px; height: 42px; border-radius: 50%; background: #25D366; color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 1.1rem; flex: none; }
.nst-atd-cartao .quem small { display: block; color: #64748B; font-size: .76rem; }
.nst-atd-cartao .quem b { font-size: 1rem; color: var(--atd-navy); }
.nst-atd-cartao .av { margin: 10px 0 0; font-size: .82rem; color: #92400E; background: #FEF3C7; border-radius: 8px; padding: 7px 10px; }
.nst-atd-cartao .ir { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; background: #25D366; color: #fff;
    text-decoration: none; border-radius: 10px; padding: 11px; font-weight: 700; font-size: .92rem; }
.nst-atd-cartao .ir:hover { background: #1EBE5A; color: #fff; }
.nst-atd-cartao .pr { margin-top: 8px; font-size: .74rem; color: #64748B; text-align: center; }
.nst-atd-nome { display: flex; gap: 6px; margin: 0 0 12px; }
.nst-atd-nome input { flex: 1; min-width: 0; border: 1.5px solid var(--atd-linha); border-radius: 10px; padding: 8px 10px; font-size: .88rem; font-family: inherit; }
.nst-atd-nome input:focus { outline: none; border-color: var(--atd-azul); }
.nst-atd-nome button { border: 0; background: var(--atd-navy); color: #fff; border-radius: 10px; padding: 0 12px; font-size: .84rem; cursor: pointer; }

/* rodapé com o campo */
.nst-atd-pe { flex: none; border-top: 1px solid var(--atd-linha); padding: 10px 10px 8px; background: #fff; }
.nst-atd-form { display: flex; gap: 8px; align-items: flex-end; }
.nst-atd-form textarea { flex: 1; resize: none; border: 1.5px solid var(--atd-linha); border-radius: 12px; padding: 9px 11px; font-size: .9rem;
    font-family: inherit; max-height: 96px; min-height: 40px; line-height: 1.35; }
.nst-atd-form textarea:focus { outline: none; border-color: var(--atd-azul); }
.nst-atd-form button { width: 42px; height: 40px; border-radius: 12px; border: 0; background: var(--atd-navy); color: #fff; cursor: pointer; flex: none; display: grid; place-items: center; }
.nst-atd-form button:disabled { opacity: .45; cursor: default; }
.nst-atd-form button svg { width: 18px; height: 18px; }
.nst-atd-rodape { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: .72rem; color: #64748B; white-space: nowrap; }
.nst-atd-rodape a { color: #64748B; }
.nst-atd-rodape button { background: transparent; border: 0; color: var(--atd-azul); font-weight: 600; font-size: .76rem; cursor: pointer; padding: 2px 0; border-bottom: 2px solid var(--atd-ambar); }

@media (max-width: 520px) {
    .nst-atd-abrir { right: 14px; bottom: 14px; padding: 8px 14px 8px 8px; }
    .nst-atd-abrir .tx i { display: none; }
    body.nst-atd-on #btn-back-to-top { bottom: 84px; right: 18px; }
    .nst-atd-janela { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .nst-atd.aberto .nst-atd-janela, .nst-atd-digitando span { animation: none; }
    .nst-atd-abrir, .nst-atd-corpo { transition: none; scroll-behavior: auto; }
}
