/* =========================================================================
   Line de vendas na página de venda (widget em JavaScript: js/line-site.js).
   Classes "ls-" para não colidir com a landing.
   ========================================================================= */

#line-site {
    --ls-roxo: #7B61FF;
    --ls-azul: #2F80ED;
    --ls-verde: #19C58F;
    --ls-gradiente: linear-gradient(135deg, #7B61FF 0%, #2F80ED 60%, #19C58F 100%);
    --ls-texto: var(--pl-texto, #11201B);
    --ls-texto-2: var(--pl-texto-2, #55625C);
    --ls-linha: var(--pl-linha, #E3E3DC);
    --ls-fundo: #F7F6F2;
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    font-family: var(--pl-fonte-texto, 'Manrope', system-ui, sans-serif);
    pointer-events: none;
}

    #line-site > * {
        pointer-events: auto;
    }

/* ---------- Botão flutuante ---------- */
.ls-botao {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px 10px 10px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 800;
    font-size: .95rem;
    color: #fff;
    background: var(--ls-gradiente);
    box-shadow: 0 14px 34px rgba(91, 63, 224, .38);
    cursor: pointer;
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s;
    animation: ls-chega .6s cubic-bezier(.34, 1.56, .64, 1) 1.2s both;
}

    .ls-botao:hover {
        transform: translateY(-3px);
        box-shadow: 0 18px 40px rgba(91, 63, 224, .45);
    }

    .ls-botao:focus-visible {
        outline: 3px solid #fff;
        outline-offset: 3px;
    }

.ls-botao-icone {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, .22);
}

/* Conversa aberta: o botão vira só "fechar". */
.ls-aberto .ls-botao {
    padding: 10px;
}

.ls-aberto .ls-botao-texto {
    display: none;
}

@keyframes ls-chega {
    from { opacity: 0; transform: translateY(20px) scale(.9); }
    to { opacity: 1; transform: none; }
}

/* ---------- Convite ---------- */
.ls-convite {
    display: none;
    position: relative;
    max-width: 280px;
    padding: 14px 34px 14px 16px;
    border-radius: 18px 18px 4px 18px;
    background: #fff;
    border: 1px solid var(--ls-linha);
    box-shadow: 0 18px 40px rgba(6, 42, 34, .18);
}

    .ls-convite.ls-convite-visivel {
        display: block;
        animation: ls-chega .5s cubic-bezier(.34, 1.56, .64, 1) both;
    }

.ls-convite-texto {
    border: 0;
    padding: 0;
    background: none;
    font: inherit;
    font-size: .9rem;
    line-height: 1.45;
    text-align: left;
    color: var(--ls-texto);
    cursor: pointer;
}

.ls-convite-fechar {
    position: absolute;
    top: 6px;
    right: 8px;
    border: 0;
    background: none;
    font-size: 1.2rem;
    line-height: 1;
    color: var(--ls-texto-2);
    cursor: pointer;
}

/* ---------- Painel ---------- */
.ls-painel {
    display: flex;
    flex-direction: column;
    width: min(400px, calc(100vw - 32px));
    height: min(620px, calc(100vh - 120px));
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--ls-linha);
    box-shadow: 0 30px 70px rgba(6, 42, 34, .28);
    animation: ls-chega .35s cubic-bezier(.22, 1, .36, 1) both;
}

    .ls-painel[hidden] {
        display: none;
    }

.ls-topo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 14px 18px;
    color: #fff;
    background: var(--ls-gradiente);
}

.ls-avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.15rem;
    background: rgba(255, 255, 255, .22);
}

.ls-identidade {
    display: flex;
    flex-direction: column;
    flex: 1;
    line-height: 1.25;
}

    .ls-identidade strong {
        font-size: 1.02rem;
    }

.ls-status {
    font-size: .76rem;
    opacity: .9;
}

    .ls-status::before {
        content: "";
        display: inline-block;
        width: 7px;
        height: 7px;
        margin-right: 6px;
        border-radius: 50%;
        background: #7EE0B5;
        box-shadow: 0 0 0 3px rgba(126, 224, 181, .3);
    }

.ls-acao-topo {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    font-size: 1.15rem;
    color: #fff;
    background: rgba(255, 255, 255, .16);
    cursor: pointer;
}

    .ls-acao-topo:hover {
        background: rgba(255, 255, 255, .28);
    }

/* ---------- Mensagens ---------- */
.ls-mensagens {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 16px;
    overflow-y: auto;
    background: var(--ls-fundo);
    overscroll-behavior: contain;
}

.ls-msg {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: .92rem;
    line-height: 1.5;
    word-wrap: break-word;
    animation: ls-chega .3s ease both;
}

    .ls-msg p {
        margin: 0 0 6px;
    }

        .ls-msg p:last-child {
            margin-bottom: 0;
        }

    .ls-msg ul,
    .ls-msg ol {
        margin: 4px 0 6px;
        padding-left: 20px;
    }

    .ls-msg li {
        margin-bottom: 2px;
    }

.ls-msg-line {
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    color: var(--ls-texto);
    background: #fff;
    box-shadow: 0 6px 18px -10px rgba(17, 32, 27, .3);
}

    .ls-msg-line a {
        color: #5B3FE0;
        font-weight: 700;
    }

.ls-msg-eu {
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    color: #fff;
    background: var(--ls-roxo);
    white-space: pre-wrap;
}

.ls-digitando {
    display: inline-flex;
    gap: 5px;
    padding: 14px 16px;
}

    .ls-digitando i {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--ls-roxo);
        animation: ls-pulo 1s ease-in-out infinite;
    }

        .ls-digitando i:nth-child(2) { animation-delay: .15s; }
        .ls-digitando i:nth-child(3) { animation-delay: .3s; }

@keyframes ls-pulo {
    0%, 80%, 100% { opacity: .3; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-4px); }
}

.ls-erro {
    align-self: stretch;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: .85rem;
    color: #8A2A1B;
    background: #FFE5DC;
}

    .ls-erro p {
        margin: 0;
    }

    .ls-erro a {
        color: inherit;
        font-weight: 800;
    }

/* ---------- Sugestões ---------- */
.ls-sugestoes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 10px;
    background: var(--ls-fundo);
}

    .ls-sugestoes[hidden] {
        display: none;
    }

.ls-sugestao {
    padding: 7px 12px;
    border: 1px solid #D9D2FF;
    border-radius: 999px;
    font: inherit;
    font-size: .8rem;
    font-weight: 700;
    color: #4A3AA7;
    background: #fff;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

    .ls-sugestao:hover {
        background: #ECE8FF;
        border-color: var(--ls-roxo);
    }

/* ---------- Horários ---------- */
.ls-horarios {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #D9D2FF;
}

.ls-dia-nome {
    display: block;
    margin-bottom: 6px;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ls-texto-2);
}

.ls-horas {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ls-hora {
    min-width: 64px;
    padding: 8px 10px;
    border: 1.5px solid var(--ls-roxo);
    border-radius: 10px;
    font: inherit;
    font-size: .85rem;
    font-weight: 800;
    color: #4A3AA7;
    background: #fff;
    cursor: pointer;
}

    .ls-hora:hover:not(:disabled) {
        color: #fff;
        background: var(--ls-roxo);
    }

    .ls-hora:disabled {
        opacity: .45;
        cursor: default;
    }

    .ls-hora.ls-hora-escolhida {
        opacity: 1;
        color: #fff;
        background: var(--ls-roxo);
    }

/* ---------- Formulário da apresentação ---------- */
.ls-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border-radius: 16px;
    background: #fff;
    border: 1.5px solid var(--ls-verde);
    box-shadow: 0 12px 30px -18px rgba(11, 133, 102, .5);
}

.ls-form-titulo {
    margin: 0;
    font-size: .95rem;
    color: var(--ls-texto);
}

.ls-form-ajuda {
    margin: 0 0 4px;
    font-size: .8rem;
    color: var(--ls-texto-2);
}

.ls-form-campo {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: .76rem;
    font-weight: 700;
    color: var(--ls-texto-2);
}

    .ls-form-campo input {
        padding: 9px 11px;
        border: 1px solid var(--ls-linha);
        border-radius: 10px;
        font: inherit;
        font-size: .9rem;
        font-weight: 500;
        color: var(--ls-texto);
        background: #fff;
    }

        .ls-form-campo input:focus {
            outline: none;
            border-color: var(--ls-roxo);
            box-shadow: 0 0 0 3px rgba(123, 97, 255, .18);
        }

.ls-form-aceite {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: .8rem;
    line-height: 1.4;
    color: var(--ls-texto-2);
}

    .ls-form-aceite input {
        margin-top: 2px;
        accent-color: var(--ls-roxo);
    }

    .ls-form-aceite a {
        color: #5B3FE0;
        font-weight: 700;
    }

.ls-form-erro {
    font-size: .8rem;
    color: #C0362C;
}

    .ls-form-erro:empty {
        display: none;
    }

.ls-form-acoes {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 4px;
}

.ls-form-outro,
.ls-form-confirmar {
    padding: 9px 14px;
    border-radius: 999px;
    font: inherit;
    font-size: .85rem;
    font-weight: 800;
    cursor: pointer;
}

.ls-form-outro {
    border: 1px solid var(--ls-linha);
    color: var(--ls-texto-2);
    background: #fff;
}

.ls-form-confirmar {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #0B8566, #19C58F);
    box-shadow: 0 8px 18px rgba(11, 133, 102, .3);
}

    .ls-form-confirmar:disabled {
        opacity: .6;
        cursor: wait;
    }

/* ---------- Entrada ---------- */
.ls-entrada {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid var(--ls-linha);
    background: #fff;
}

.ls-campo {
    flex: 1;
    max-height: 120px;
    padding: 10px 14px;
    border: 1px solid var(--ls-linha);
    border-radius: 18px;
    font: inherit;
    font-size: .92rem;
    line-height: 1.4;
    resize: none;
    overflow-y: hidden;
    color: var(--ls-texto);
}

    .ls-campo:focus {
        outline: none;
        border-color: var(--ls-roxo);
        box-shadow: 0 0 0 3px rgba(123, 97, 255, .16);
    }

.ls-enviar {
    display: grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    font-size: 1rem;
    color: #fff;
    background: var(--ls-gradiente);
    cursor: pointer;
}

    .ls-enviar:disabled {
        opacity: .5;
        cursor: wait;
    }

.ls-rodape {
    margin: 0;
    padding: 0 14px 10px;
    font-size: .7rem;
    color: var(--ls-texto-2);
    background: #fff;
}

    .ls-rodape a {
        color: inherit;
    }

/* ---------- Celular: a conversa ocupa a tela ---------- */
@media (max-width: 520px) {
    #line-site {
        right: 12px;
        bottom: 12px;
    }

    .ls-aberto .ls-painel {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        border: 0;
    }

    .ls-aberto .ls-botao {
        display: none;
    }

    .ls-botao-texto {
        display: none;
    }

    .ls-botao {
        padding: 10px;
    }

    .ls-convite {
        max-width: 230px;
        padding: 10px 28px 10px 12px;
    }

    .ls-convite-texto {
        font-size: .82rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ls-botao, .ls-convite, .ls-painel, .ls-msg, .ls-digitando i {
        animation: none !important;
    }
}
