/* ChatBot Profissional e Responsivo */
#chatbot-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4820fc 60%, #2ecc71 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(72, 32, 252, 0.18), 0 2px 8px rgba(0, 0, 0, 0.10);
    z-index: 1000;
    transition: box-shadow 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chatbot-button:hover {
    background: linear-gradient(135deg, #2ecc71 60%, #4820fc 100%);
    box-shadow: 0 8px 24px rgba(72, 32, 252, 0.25);
}

.faq-chatbot {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(72, 32, 252, 0.12), 0 2px 8px rgba(0, 0, 0, 0.10);
    width: 350px;
    max-width: 95vw;
    max-height: 80vh;
    min-height: 420px;
    display: none;
    flex-direction: column;
    z-index: 9999;
    animation: chatbot-fadein 0.3s;
    overflow: hidden;
}

@keyframes chatbot-fadein {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-chatbot-header {
    background: linear-gradient(90deg, #4820fc 80%, #2ecc71 100%);
    color: #fff;
    padding: 16px 20px 12px 20px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.faq-chatbot-header .close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    margin-left: 10px;
    transition: color 0.2s;
}

.faq-chatbot-header .close-btn:hover {
    color: #2ecc71;
}

.faq-chatbot-messages {
    flex: 1;
    padding: 18px 16px 0 16px;
    overflow-y: auto;
    background: #f7f8fa;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

.faq-bubble {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 15px;
    margin-bottom: 2px;
    word-break: break-word;
    box-shadow: 0 2px 8px rgba(72, 32, 252, 0.04);
    animation: bubble-in 0.2s;
}

.faq-bubble.bot {
    background: #e8eafd;
    color: #4820fc;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.faq-bubble.user {
    background: #4820fc;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

@keyframes bubble-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 8px;
    padding: 10px 16px 0 16px;
    background: #f7f8fa;
    border-top: 1px solid #ececec;
    justify-content: flex-start;
    align-items: flex-start;
}

.faq-suggestion-btn {
    background: #fff;
    color: #4820fc;
    border: 1px solid #4820fc;
    border-radius: 20px;
    padding: 7px 16px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 4px;
    margin-right: 0;
    margin-left: 0;
    transition: background 0.2s, color 0.2s, border 0.2s;
    outline: none;
    white-space: normal;
    word-break: break-word;
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
}

@media (min-width: 400px) {
    .faq-suggestion-btn {
        flex: 1 1 48%;
        min-width: 120px;
        max-width: 48%;
    }
}

@media (min-width: 600px) {
    .faq-suggestion-btn {
        flex: 1 1 45%;
        min-width: 140px;
        max-width: 45%;
    }
}

.faq-suggestion-btn:hover, .faq-suggestion-btn:focus {
    background: #4820fc;
    color: #fff;
    border: 1px solid #2ecc71;
}

.faq-chatbot-input {
    display: flex;
    align-items: center;
    padding: 10px 16px 16px 16px;
    background: #fff;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    border-top: 1px solid #ececec;
}

.faq-chatbot-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d1d1d1;
    border-radius: 20px;
    font-size: 15px;
    outline: none;
    margin-right: 8px;
    background: #f7f8fa;
    transition: border 0.2s;
}

.faq-chatbot-input input:focus {
    border: 1.5px solid #4820fc;
}

.faq-chatbot-input button {
    background: #4820fc;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.faq-chatbot-input button:hover {
    background: #2ecc71;
}

/* Responsividade */
@media (max-width: 600px) {
    .faq-chatbot {
        right: 0;
        left: 0;
        bottom: 0;
        width: 100vw;
        max-width: 100vw;
        min-height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .faq-chatbot-header, .faq-chatbot-input {
        padding-left: 10px;
        padding-right: 10px;
    }

    .faq-chatbot-messages, .faq-chatbot-suggestions {
        padding-left: 10px;
        padding-right: 10px;
    }

    #chatbot-button {
        right: 16px;
        bottom: 16px;
        width: 52px;
        height: 52px;
        font-size: 22px;
    }

    #chatbot-tooltip {
        right: 16px;
        bottom: 72px;
        font-size: 14px;
        max-width: 90vw;
    }

    .faq-chatbot-header .close-btn {
        font-size: 36px;
        padding: 0 10px;
    }
}

/* Balão de encorajamento do botão do assistente */
#chatbot-tooltip {
    position: fixed;
    bottom: 90px;
    right: 30px;
    background: #4820fc;
    color: #fff;
    padding: 12px 18px;
    border-radius: 16px;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(72, 32, 252, 0.10);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    transform: translateY(10px);
    max-width: 260px;
    text-align: center;
    font-weight: 500;
}

#chatbot-tooltip.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}