/* --- Botão Flutuante do WhatsApp --- */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #25D366; /* Cor do WhatsApp */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.05);
}

.whatsapp-float img {
    width: 35px;
    height: 35px;
}

/* --- Modal do Chat --- */
.chat-modal {
    display: none; /* Inicia oculto */
    position: fixed;
    bottom: 90px; /* Acima do botão flutuante */
    right: 20px;
    width: 350px; /* Largura padrão de chat */
    max-height: 500px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    z-index: 999;
    flex-direction: column;
    overflow: hidden; /* Garante que os balões de mensagem fiquem dentro */
}

.chat-header {
    background-color: #075E54; /* Verde escuro do WhatsApp */
    color: #fff;
    padding: 15px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1em;
    position: relative; /* Para o status online */
}

.chat-title {
    font-weight: bold;
}

.chat-status {
    font-size: 0.8em;
    opacity: 0.9;
    position: absolute;
    bottom: 1px; /* Posição abaixo do título */
    left: 15px;
}


.chat-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0 5px;
}

.chat-body {
    flex-grow: 1; /* Ocupa o espaço restante */
    padding: 15px;
    overflow-y: auto; /* Scroll para as mensagens */
    background-color: #ECE5DD; /* Fundo do chat do WhatsApp */
    display: flex;
    flex-direction: column;
    gap: 10px; /* Espaço entre os balões de mensagem */
}

/* Balão de mensagem do bot */
.message-bot {
    background-color: #fff; /* Balão branco/claro */
    border-radius: 8px;
    padding: 10px 12px;
    max-width: 80%;
    align-self: flex-start; /* Alinha à esquerda */
    box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
    position: relative;
}
/* Pontinha do balão do bot */
.message-bot::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px; /* Ajuste para a posição da ponta */
    border: 8px solid transparent;
    border-top-color: #fff; /* Cor do balão */
    border-right-color: #fff;
}


/* Balão de mensagem do usuário (opcional, se você quiser simular as respostas do usuário) */
.message-user {
    background-color: #DCF8C6; /* Verde claro do WhatsApp */
    border-radius: 8px;
    padding: 10px 12px;
    max-width: 80%;
    align-self: flex-end; /* Alinha à direita */
    box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
    position: relative;
}
/* Pontinha do balão do usuário */
.message-user::before {
    content: '';
    position: absolute;
    top: 0;
    right: -8px; /* Ajuste para a posição da ponta */
    border: 8px solid transparent;
    border-top-color: #DCF8C6; /* Cor do balão */
    border-left-color: #DCF8C6;
}


.chat-footer {
    padding: 15px;
    background-color: #f0f0f0; /* Fundo leve para o rodapé */
    display: flex;
    gap: 10px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    align-items: center;
}

.chat-footer input[type="text"] {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 1em;
    outline: none;
}

.chat-footer .send-button {
    background-color: #25D366; /* Cor do WhatsApp */
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease;
}

.chat-footer .send-button:hover {
    background-color: #1DA851;
}

/* Estilo para inputs dinâmicos dentro do chat body */
.chat-input-wrapper {
    display: flex;
    gap: 10px;
    margin-top: 10px; /* Espaço após a mensagem do bot */
    align-items: center;
    align-self: flex-start; /* Alinha com as mensagens do bot */
    width: 100%; /* Ocupa a largura total para alinhamento */
}

.chat-input-wrapper input[type="text"],
.chat-input-wrapper input[type="tel"],
.chat-input-wrapper textarea {
    flex-grow: 1;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.95em;
    outline: none;
    max-width: 75%; /* Para não ocupar 100% e parecer mais natural */
}

.chat-input-wrapper button {
    background-color: #075E54;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9em;
    white-space: nowrap; /* Evita quebra de linha no texto do botão */
}

.chat-input-wrapper button:hover {
    background-color: #054C43;
}