/* --- Estilo do Botão Flutuante --- */
#whatsapp-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: transform 0.2s ease-out;

    /* Estado inicial para animação GSAP (invisível) */
    transform: scale(0);
    opacity: 0;
}

#whatsapp-button:hover {
    transform: scale(1.1);
    /* Efeito de zoom no hover */
}

#whatsapp-button img {
    width: 32px;
    height: 32px;
}

/* --- Estilo da Janela de Chat --- */
#chat-window {
    position: fixed;
    bottom: 100px;
    /* Posição acima do botão */
    right: 30px;
    width: 340px;
    max-width: 90vw;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 1001;
    font-family: Arial, sans-serif;

    /* Estado inicial para animação GSAP (fechado) */
    opacity: 0;
    transform: scale(0);
    transform-origin: bottom right;
    /* Anima a partir do canto do botão */
}

/* Cabeçalho do Chat */
.chat-header {
    background-color: #075E54;
    /* Verde escuro do WhatsApp */
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header .profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #f0f0f0;
}

.chat-header .header-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.chat-header .chat-title {
    font-weight: 600;
    font-size: 16px;
}

.chat-header .chat-status {
    font-size: 13px;
    opacity: 0.9;
}

#close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    font-weight: lighter;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

#close-chat:hover {
    opacity: 1;
}

/* Corpo do Chat (Mensagens) */
.chat-body {
    height: 250px;
    overflow-y: auto;
    padding: 20px;
    /* Fundo clássico do WhatsApp */
    background-color: #E5DDD5;
    background-image: url('/src/img/background-whatsapp.png');
}

.message {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 10px;
    max-width: 85%;
    line-height: 1.4;
}

.message.received {
    background-color: #FFFFFF;
    /* Mensagem recebida */
    align-self: flex-start;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.message p {
    margin: 0;
    padding: 0;
    font-size: 14px;
}

.message p:first-child {
    margin-bottom: 4px;
}

.message .timestamp {
    font-size: 7px;
    color: #999;
    float: right;
}

/* Rodapé do Chat */
.chat-footer {
    padding: 15px;
    background-color: #f0f0f0;
    text-align: center;
}

.start-chat-btn {
    background-color: #25D366;
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    display: block;
    transition: background-color 0.2s;
}

.start-chat-btn:hover {
    background-color: #128C7E;
}