/* ===================================================================
   TEO — Assistente Virtual
   Estilos do botão flutuante e balão de convite.
   Replica a lógica de posicionamento do botão do WhatsApp
   (definido em modify_min.css / modify.css), ficando logo ACIMA dele.
   =================================================================== */

/* ---------- Botão flutuante TEO ---------- */
/* O WhatsApp usa: bottom:2rem; right:2rem; 60x60px.
   O TEO fica logo acima, com um gap de 16px. */
.btn-floating-teo {
    align-items: center;
    background: linear-gradient(135deg, #ecb934 0%, #d4a52d 100%);
    border-radius: 50%;
    bottom: calc(2rem + 60px + 16px);
    box-shadow: 0 4px 14px 0 rgba(236, 185, 52, 0.45);
    cursor: pointer;
    display: flex;
    height: 60px;
    justify-content: center;
    position: fixed;
    right: 2rem;
    user-select: none;
    width: 60px;
    z-index: 10;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-decoration: none;
    overflow: visible;
    isolation: isolate;
}

.teo-badge-new {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(25%, -35%);
    background-color: #ff3b30;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
    padding: 4px 7px;
    border-radius: 10px;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 11;
}
/* Badge usada inline ao lado do título dentro do balão */
.teo-badge-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ff3b30;
    color: #fff !important;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 10px;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.btn-floating-teo:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px 0 rgba(236, 185, 52, 0.6);
}
.btn-floating-teo:active { transform: scale(0.96); }
.btn-floating-teo svg,
.btn-floating-teo img { height: 70%; width: 70%; }

/* Animação de pulse (igual ao do WhatsApp, mas em dourado) */
.btn-floating-teo::before {
    content: "";
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(236, 185, 52, 0.75);
    animation: _pulse_teo 1.6s infinite;
}
@keyframes _pulse_teo {
    0%   { box-shadow: 0 0 0 0 rgba(236, 185, 52, 0.7); }
    70%  { box-shadow: 0 0 0 14px rgba(236, 185, 52, 0); }
    100% { box-shadow: 0 0 0 0 rgba(236, 185, 52, 0); }
}

/* ---------- Balão de convite ---------- */
.teo-bubble {
    position: fixed;
    bottom: calc(2rem + 60px + 16px + 60px + 12px);
    right: 2rem;
    width: 280px;
    max-width: calc(100vw - 4rem);
    background: #fff;
    border: 1px solid #e3e8ec;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(32, 79, 94, 0.18);
    padding: 14px 16px;
    z-index: 11;
    font-family: "Outfit", -apple-system, "Segoe UI", Roboto, sans-serif;
    color: #204f5e;
    animation: _teo_bubble_in 0.4s ease;
}
@keyframes _teo_bubble_in {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Seta do balão apontando para baixo (em direção ao botão TEO) */
.teo-bubble__arrow {
    position: absolute;
    bottom: -9px;
    right: 22px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #fff;
    filter: drop-shadow(0 1px 1px rgba(32, 79, 94, 0.1));
}

.teo-bubble__close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: transparent;
    border: none;
    color: #7d97a1;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
.teo-bubble__close:hover { color: #d9534f; background: #fff5f5; }

.teo-bubble__content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 14px;
}
.teo-bubble__emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: linear-gradient(135deg, #ecb934 0%, #d4a52d 100%);
    box-shadow: 0 2px 6px rgba(212,165,45,0.12);
    overflow: hidden;
}
.teo-bubble__emoji img {
    width: 80%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    display: block;
}
.teo-bubble__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    line-height: 1.45;
}
.teo-bubble__text strong {
    font-size: 15px;
    font-weight: 700;
    color: #204f5e;
}
.teo-bubble__text span {
    color: #7d97a1;
}
.teo-bubble__cta {
    display: inline-block;
    margin-top: 4px;
    background: linear-gradient(135deg, #ecb934 0%, #d4a52d 100%);
    color: #fff !important;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 3px 10px rgba(236, 185, 52, 0.35);
}
.teo-bubble__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(236, 185, 52, 0.5);
}

/* Estado oculto do balão (após fechar) */
.teo-bubble.teo-bubble--hidden {
    display: none;
}

/* ===================================================================
   Responsivo — replica a lógica do WhatsApp (modify.css)
   =================================================================== */

/* Mobile (<=480px): o WhatsApp sobe para bottom:128px.
   O TEO acompanha, ficando 16px acima dele. */
@media (max-width: 480px) {
    .btn-floating-teo {
        bottom: calc(128px + 56px + 16px);
        right: 16px;
        height: 60px;
        width: 60px;
    }
    .btn-floating-teo::before { width: 56px; height: 56px; }

    /* Balão: largura fluida para não ultrapassar a borda da tela.
       left+right garantem margem segura; margin-left:auto centraliza à direita. */
    .teo-bubble {
        bottom: calc(128px + 56px + 16px + 56px + 12px);
        right: 2rem;
        left: 2rem;
        width: auto;
        max-width: 320px;
        margin-left: auto;
    }
    .teo-bubble__arrow { right: 18px; }
}

/* Telas pequenas (<=360px): reduz o balão */
@media (max-width: 360px) {
    .teo-bubble {
        padding: 12px 14px;
    }
    .teo-bubble__text strong { font-size: 14px; }
    .teo-bubble__text span { font-size: 12px; }
    .teo-bubble__cta { font-size: 12px; padding: 7px 12px; }
}
