


/* ==========================================
   CHATBOT FLUTUANTE JORDANA (BLINDADO CONTRA CONFLITOS)
   ========================================== */
.chatbot-trigger-wrapper {
    position: fixed;
    bottom: 30px;
    left: 30px; 
    z-index: 9999 !important; /* Jogado pra cima de tudo */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* BLINDAGEM DO BOTÃO: Forçando ele a ser um círculo perfeito */
#btn-chat-trigger {
    width: 65px !important;
    height: 65px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-image: linear-gradient(263deg, #73ed7c 16%, #019297 99%);
    box-shadow: 0 4px 15px rgba(43, 193, 170, 0.4) !important;
}

#btn-chat-trigger:hover {
    background-color: #219b88 !important;
    transform: scale(1.05) !important;
}

/* Centralizando o ícone perfeitamente */
#btn-chat-trigger i {
    font-size: 32px !important;
    line-height: normal !important;
    margin: 0 !important;
    color: #ffffff !important;
}

/* BLINDAGEM DA INVISIBILIDADE (Para não aparecer antes do scroll) */
.hidden-notification, .hidden-chat {
    opacity: 0 !important;
    transform: scale(0) !important;
    pointer-events: none !important;
    visibility: hidden !important; /* Garantia extra */
}

/* O Balãozinho de Notificação */
.chat-notification {
    background-color: #fff !important;
    color: #004466 !important;
    padding: 12px 20px !important;
    border-radius: 20px !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    margin-bottom: 15px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
    position: relative;
    cursor: pointer;
    border: 1px solid #e0e0e0 !important;
    transition: all 0.3s ease !important;
    transform-origin: bottom left !important;
    white-space: nowrap !important;
    display: block !important; 
    visibility: visible;
    opacity: 1;
    transform: scale(1);
}

.chat-notification span {
    color: #004466 !important;
    font-weight: 700 !important;
}

/* A perninha do balão */
.notification-tail {
    position: absolute;
    bottom: -8px;
    left: 25px; 
    width: 0; 
    height: 0; 
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #fff;
}

/* A Janela do Chat */
.chatbot-window {
    position: fixed;
    bottom: 110px !important; /* Ajustado pra não encostar no botão */
    left: 30px !important;
    width: 350px !important;
    max-width: calc(100vw - 40px) !important;
    height: 500px !important;
    max-height: calc(100vh - 120px) !important;
    background: #edf8f5 !important;
    border-radius: 15px !important;
    z-index: 10000 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    transform-origin: bottom left !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;
}

.chatbot-header {
    background: linear-gradient(135deg, #2bc1aa, #219b88) !important;
    color: white !important;
    padding: 15px 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.chatbot-title {
    display: flex !important;
    align-items: center !important;
    font-family: 'Orbitron', sans-serif !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    color: white !important;
}

.chatbot-title i { margin-right: 10px !important; color: white !important; }

#btn-close-chat {
    color: white !important;
    padding: 0 !important;
    line-height: 1 !important;
    height: auto !important;
}

.chatbot-body {
    flex-grow: 1 !important;
    padding: 20px !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

.chat-msg {
    max-width: 85% !important;
    padding: 12px 16px !important;
    border-radius: 15px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
    animation: fadeInUp 0.3s ease !important;
}

.chat-msg.bot {
    background: #fff !important;
    color: #004466 !important;
    align-self: flex-start !important;
    border-bottom-left-radius: 5px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
}

.chatbot-footer {
    background: #fff !important;
    padding: 10px 15px !important;
    display: flex !important;
    align-items: center !important;
    border-top: 1px solid #eee !important;
}

#chat-input {
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    height: 40px !important;
    color: #004466 !important;
}

/* Limpa as flutuações das mensagens do chat */
#chat-messages::after {
    content: "";
    clear: both;
    display: table;
}
#chat-messages {
    padding: 15px;
    height: 350px; /* Altura fixa da área de rolagem */
    overflow-y: auto;
    background-color: #ffffff;
}

#btn-send-chat { color: #2bc1aa !important; padding: 0 10px !important; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 15px;
    border-bottom-left-radius: 5px;
    width: fit-content;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    animation: fadeInUp 0.3s ease;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: #2bc1aa;
    border-radius: 50%;
    animation: bounce 1.3s linear infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: -1.1s; }
.typing-indicator span:nth-child(3) { animation-delay: -0.9s; }

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

@media (max-width: 600px) {
    .chatbot-window { left: 20px !important; bottom: 100px !important; }
    .chatbot-trigger-wrapper { left: 20px !important; bottom: 20px !important; }
}
