/* ===== CHATBOT WEBFUN.IA ===== */
/* Estilos com prefixo wf- para evitar conflitos */
/* Tema atualizado: uso de cor sólida ao invés de gradiente */

:root {
    --wf-primary: #7C3AED; /* roxo primário (btn) */
    --wf-primary-hover: #8B5CF6; /* roxo hover (btn hover) */
    --wf-primary-light: #EEF2FF; /* tom claro para superfícies / bolhas */
}

.wf-chatbot-icon {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: var(--wf-primary) !important;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: pulse-chatbot 2s infinite !important;
    z-index: 10000;
    transition: transform 0.3s ease;
    border: none;
    outline: none;
}

.wf-chatbot-icon:hover {
    transform: scale(1.1);
}

.wf-chatbot-icon svg {
    width: 30px;
    height: 30px;
    fill: white;
}

/* Quando usamos imagem como logo no ícone */
.wf-chatbot-icon img.wf-chatbot-logo {
    width: 60%;
    height: 60%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    user-select: none;
    pointer-events: none;
}

/* Link WhatsApp dentro das mensagens */
.wf-whatsapp-link {
    display: inline-block;
    background: #25D366;
    color: #fff !important;
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: background .2s, transform .2s;
}
.wf-whatsapp-link:hover { background:#1EB257; transform: translateY(-2px); }
.wf-whatsapp-link:active { transform: translateY(0); }

/* Fallback quando imagem não carrega */
.wf-chatbot-icon.wf-chatbot-fallback::before {
    content: 'IA';
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 1px;
}

.wf-chatbot-icon.wf-chatbot-fallback .wf-chatbot-fallback-icon {
    display: block !important;
}

.wf-chatbot-fallback-icon {
    width: 30px;
    height: 30px;
    fill: white;
}

.wf-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
    animation: wf-pulse 2s infinite;
}

@keyframes wf-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.wf-chat-container {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 380px;
    max-width: 90vw;
    height: 550px;
    max-height: 70vh;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.wf-chat-container.wf-active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.wf-chat-header {
    background: var(--wf-primary);
    color: white;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.wf-chat-header h1 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

.wf-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s;
    padding: 0;
}

.wf-close-btn:hover {
}

/* Hover do ícone do chatbot mantendo cor sólida */
.wf-chatbot-icon:hover { background: var(--wf-primary-hover); }

.wf-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #f8f9fa;
}

.wf-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.4;
    font-size: 0.95rem;
    word-wrap: break-word;
    margin: 0;
}

.wf-bot-message {
    background-color: white;
    border-bottom-left-radius: 5px;
    align-self: flex-start;
    color: #333;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.wf-user-message {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border-bottom-right-radius: 5px;
    align-self: flex-end;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.wf-options-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.wf-option {
    background-color: white;
    border: 2px solid #e6e9f0;
    border-radius: 50px;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.wf-option:hover {
    border-color: #6a11cb;
    background-color: #f9f7ff;
    transform: translateY(-1px);
}

.wf-option-number {
    background-color: #6a11cb;
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.wf-option-text {
    font-weight: 500;
    font-size: 0.9rem;
    flex: 1;
    color: #222;
}

.wf-chat-input-container {
    display: flex;
    padding: 15px;
    border-top: 1px solid #e6e9f0;
    background-color: white;
    flex-shrink: 0;
    gap: 10px;
}

.wf-chat-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e6e9f0;
    border-radius: 50px;
    outline: none;
    font-size: 0.95rem;
    font-family: inherit;
}

.wf-chat-input:focus {
    border-color: #6a11cb;
}

.wf-send-button {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 0.9rem;
    white-space: nowrap;
}

.wf-send-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.wf-typing-indicator {
    display: flex;
    align-items: center;
    color: #888;
    font-size: 0.85rem;
    margin-top: 5px;
}

.wf-typing-dots {
    display: flex;
    margin-left: 8px;
}

.wf-typing-dot {
    width: 6px;
    height: 6px;
    background-color: #888;
    border-radius: 50%;
    margin: 0 2px;
    animation: wf-typing 1.4s infinite ease-in-out;
}

.wf-typing-dot:nth-child(1) { animation-delay: 0s; }
.wf-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.wf-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes wf-typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

.wf-service-icon {
    margin-right: 5px;
    font-size: 1.1rem;
}

.wf-hidden {
    display: none !important;
}

/* Responsividade */
@media (max-width: 480px) {
    .wf-chat-container {
        width: 95vw;
        right: 2.5vw;
        height: 70vh;
        bottom: 80px;
    }
    
    .wf-chat-header h1 {
        font-size: 1.1rem;
    }
    
    .wf-message {
        max-width: 90%;
        font-size: 0.9rem;
    }
}

/* Animações */
@keyframes wf-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.wf-fade-in {
    animation: wf-fadeIn 0.3s ease-out;
}
