@charset "UTF-8";

/* =========================================
   CHATBOT AI - ESTILO DIGITAL SOFT
   ========================================= */

/* --- ESCONDE O SISTEMA ANTIGO DE CHAT DO HTML --- */
/* O chatbot real é injetado pelo JS (chatbot.js), não o do HTML */
#chat-wrapper {
    display: none !important;
}

/* =========================================
   NOVO SISTEMA (injetado via chatbot.js)
   ========================================= */

/* --- Botão Flutuante --- */
.chatbot-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    background: var(--cor-destaque);
    color: var(--cor-fundo-principal);
    border: none;
    border-radius: 50%;
    width: 65px;
    height: 65px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 200, 150, 0.4);
    transition: var(--transicao-suave);
    animation: pulse 2.5s infinite;
    padding: 0;
    margin: 0;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 200, 150, 0.6);
    animation: none;
}

.chatbot-toggle .material-symbols-outlined {
    font-size: 32px;
}

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0    rgba(0, 200, 150, 0.4); }
    70%  { box-shadow: 0 0 0 15px rgba(0, 200, 150, 0);   }
    100% { box-shadow: 0 0 0 0    rgba(0, 200, 150, 0);   }
}

/* --- Container da Janela de Chat --- */
/* ESTADO PADRÃO: FECHADO/INVISÍVEL */
.chatbot-bubble {
    position: fixed;
    bottom: 110px;
    right: 30px;
    z-index: 9998;
    width: 360px;
    height: 500px;
    background-color: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: var(--glass-border-base);
    border-radius: 16px;
    box-shadow: var(--shadow-soft-glow);
    display: flex;
    flex-direction: column;
    overflow: hidden;

    /* FECHADO por padrão */
    opacity: 0;
    transform: scale(0.85) translateY(20px);
    pointer-events: none;
    transform-origin: bottom right;
    transition: opacity 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
                transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ESTADO ABERTO - classe .open adicionada via JS */
.chatbot-bubble.open {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: all;
}

/* --- Cabeçalho do Chat --- */
.chatbot-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: var(--glass-border-base);
    flex-shrink: 0;
}

.chatbot-info h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--cor-destaque);
    font-weight: 600;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.5px;
}

.chatbot-info .status {
    margin: 2px 0 0 0;
    font-size: 0.75rem;
    color: var(--cor-destaque);
    opacity: 0.7;
}

.chatbot-minimize {
    background: transparent;
    border: none;
    color: var(--cor-texto-secundario);
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0;
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-minimize:hover { color: var(--cor-destaque); }
.chatbot-minimize .material-symbols-outlined { font-size: 22px; }

/* --- Área de Mensagens --- */
.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: thin;
    scrollbar-color: var(--cor-destaque) transparent;
}

.chatbot-messages::-webkit-scrollbar { width: 6px; }
.chatbot-messages::-webkit-scrollbar-thumb {
    background-color: var(--cor-destaque);
    border-radius: 10px;
}

/* Balões de Mensagem */
.message {
    display: flex;
    animation: fadeInMsg 0.3s ease;
}

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

.message-content {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.message-content p { margin: 0; }

.bot-message { justify-content: flex-start; }
.bot-message .message-content {
    background: rgba(255, 255, 255, 0.05);
    border: var(--glass-border-base);
    color: var(--cor-texto-principal);
    border-bottom-left-radius: 2px;
}

.user-message { justify-content: flex-end; }
.user-message .message-content {
    background: rgba(0, 200, 150, 0.1);
    border: 1px solid rgba(0, 200, 150, 0.2);
    color: var(--cor-destaque);
    border-bottom-right-radius: 2px;
}

/* Indicador de digitação */
.typing-indicator .message-content {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 14px 18px;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: var(--cor-destaque);
    border-radius: 50%;
    opacity: 0.6;
    animation: blink 1.2s infinite;
}
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
    0%, 80%, 100% { opacity: 0.2; transform: scale(1);   }
    40%            { opacity: 1;   transform: scale(1.2); }
}

/* --- Área de Input --- */
.chatbot-input-area {
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-top: var(--glass-border-base);
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-shrink: 0;
}

.chatbot-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: var(--glass-border-base);
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--cor-texto-principal);
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
    resize: none;
    transition: var(--transicao-suave);
    line-height: 1.4;
}

.chatbot-input:focus {
    outline: none;
    border-color: var(--cor-destaque);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 10px rgba(0, 200, 150, 0.2);
}

.chatbot-input::placeholder {
    color: var(--cor-texto-secundario);
    opacity: 0.7;
}

.chatbot-send {
    background: var(--cor-destaque);
    color: var(--cor-fundo-principal);
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transicao-suave);
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}

.chatbot-send:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 4px 10px rgba(0, 200, 150, 0.4);
}

.chatbot-send .material-symbols-outlined {
    font-size: 20px;
    margin-left: 2px;
}

/* --- Rodapé --- */
.chatbot-footer {
    padding: 8px;
    text-align: center;
    flex-shrink: 0;
}

.chatbot-footer p {
    margin: 0;
    font-size: 0.7rem;
    color: var(--cor-texto-secundario);
    opacity: 0.5;
}

/* --- Responsividade --- */
@media (max-width: 480px) {
    .chatbot-bubble {
        bottom: 90px;
        right: 15px;
        left: 15px;
        width: auto;
        height: 60vh;
    }

    .chatbot-toggle {
        bottom: 20px;
        right: 20px;
    }
}