/* GrowBot do site público (static/js/growbot_site.js, docs/GROWBOT_SITE.md).
   Botão pequeno no canto, que só abre no clique: nada de abrir sozinho, pular ou fazer barulho. */
.gbs-botao {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1035;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    background: #2E7D32;
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 6px 18px rgba(16, 40, 20, 0.25);
    cursor: pointer;
    transition: transform .2s ease, bottom .35s ease, background .2s ease;
}
.gbs-botao:hover { background: #256b29; transform: translateY(-2px); }
.gbs-botao:focus-visible { outline: 3px solid #8BC34A; outline-offset: 3px; }

.gbs-painel {
    position: fixed;
    right: 20px;
    bottom: 84px;
    z-index: 1045; /* acima da faixa "Testar grátis" do celular (1040), abaixo dos modais do Bootstrap (1050+) */
    width: 360px;
    max-height: min(560px, calc(100vh - 120px));
    display: none;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(16, 40, 20, 0.28);
    overflow: hidden;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1f2a22;
}
.gbs-aberto .gbs-painel { display: flex; }

.gbs-topo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #2E7D32;
    color: #fff;
}
.gbs-topo strong { font-family: 'Outfit', sans-serif; font-size: 1rem; display: block; line-height: 1.2; }
.gbs-topo small { opacity: .85; font-size: .78rem; }
.gbs-fechar {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 1.1rem;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
}
.gbs-fechar:hover { background: rgba(255, 255, 255, .15); }

.gbs-mensagens { flex: 1; overflow-y: auto; padding: 14px; background: #f7faf7; }
.gbs-msg { max-width: 88%; margin-bottom: 10px; padding: 9px 12px; border-radius: 12px; white-space: pre-wrap; }
.gbs-msg.bot { background: #eaf4ea; border-top-left-radius: 4px; }
.gbs-msg.voce { background: #e9ecef; margin-left: auto; border-top-right-radius: 4px; }
.gbs-msg .gbs-titulo { display: block; font-weight: 600; margin-bottom: 3px; }

.gbs-opcoes { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.gbs-opcoes.lista { flex-direction: column; }
.gbs-opcoes small { width: 100%; color: #5b6b5f; }
.gbs-opcoes button {
    border: 1px solid #2E7D32;
    background: #fff;
    color: #2E7D32;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: .85rem;
    cursor: pointer;
    text-align: left;
}
.gbs-opcoes.lista button { border-radius: 10px; border-color: #cfe3cf; color: #1f2a22; }
.gbs-opcoes button:hover { background: #eaf4ea; }
.gbs-opcoes button.link { background: #2E7D32; color: #fff; border-color: #2E7D32; }
.gbs-opcoes button.link:hover { background: #256b29; }
.gbs-opcoes button.discreto { border-color: #ced4da; color: #5b6b5f; }

.gbs-escrever { display: flex; gap: 6px; padding: 10px; border-top: 1px solid #e3ebe3; background: #fff; }
.gbs-escrever input {
    flex: 1;
    min-width: 0;
    border: 1px solid #ced4da;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 16px; /* 16px: o iPhone não dá zoom ao focar */
}
.gbs-escrever input:focus { outline: none; border-color: #2E7D32; }
.gbs-escrever button {
    border: 0;
    background: #2E7D32;
    color: #fff;
    width: 40px;
    border-radius: 50%;
    cursor: pointer;
}

@media (max-width: 767px) {
    .gbs-botao { right: 14px; bottom: 14px; width: 48px; height: 48px; font-size: 1.1rem; }
    /* A faixa "Testar grátis" fixa embaixo (landing_base.html) aparece depois de rolar: o botão sobe acima dela. */
    body.cta-visible .gbs-botao { bottom: 88px; }
    .gbs-painel { left: 8px; right: 8px; bottom: 8px; width: auto; max-height: none; height: min(78vh, 620px); }
    .gbs-aberto .gbs-botao { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .gbs-botao { transition: none; }
}
