.whatsapp-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: Arial, sans-serif;
}

.chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 300px;
    background-color: #f0f0f0;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s ease-in-out;
    overflow: hidden;
}

.chat-window.open {
    transform: scaleY(1);
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #25d366;
    border-radius: 10px 10px 0 0;
    color: white;
}

.chat-header span {
    font-size: 16px;
    font-weight: bold;
}

.chat-header button {
    background-color: white;
    color: #25d366;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    padding: 10px;
    border-radius: 10px;
    max-width: 80%;
    word-wrap: break-word;
}

.chat-message.received {
    align-self: flex-start;
    background-color: #ffffff;
    border: 1px solid #ddd;
    color: #333;
    font-size: 16px;
}

.chat-footer {
    padding: 10px;
    background-color: #f4f4f4;
    display: flex;
    justify-content: flex-end;
}

.chat-footer button {
    background-color: #25d366;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.chat-footer button i {
    font-size: 16px;
}

.whatsapp-button {
    background-color: #25d366;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.whatsapp-button:hover {
    background-color: #20c25d;
}

/* Estilos para el texto "¡ESCRÍBENOS!" que aparece al hacer hover */
.whatsapp-container-text {
    display: none;
    position: fixed;
    bottom: 90px; /* Altura ajustada para que aparezca justo sobre el ícono */
    right: 20px;
    background-color: white;
    color: #25d366;
    border: 2px solid #25d366;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 2px 2px 3px #999;
}

.whatsapp-container:hover .whatsapp-container-text {
    display: block;
}


@media (min-width: 1920px) {
    .whatsapp-container {
        width: 100px; /* Doble del tamaño original */
        height: 100px; /* Doble del tamaño original */
        font-size: 60px;
        bottom: 25px; /* Ajuste en pantallas grandes */
    }

    .whatsapp-container i {
        margin-top: 20px; /* Centrado del ícono en pantallas grandes */
    }

    .whatsapp-container-text {
        bottom: 150px; /* Altura ajustada para el texto sobre el ícono */
        right: 20px; /* Margen derecho */
        font-size: 32px; /* Tamaño del texto ajustado */
    }
}

@media (max-width: 768px) {
    .whatsapp-container-text {
        display: block; /* Asegura que el texto esté siempre visible */
        bottom: 85px; /* Altura ajustada sobre el ícono */
        right: 30px; /* Ajuste en margen derecho */
    }

    .chat-message.received {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .whatsapp-container-text {
        bottom: 70px; /* Altura ajustada sobre el ícono */
    }
    .whatsapp-container {
        width: 50px; /* Tamaño reducido */
        height: 50px;
        bottom: 15px; /* Ajuste en margen inferior */
        right: 15px; /* Ajuste en margen derecho */
        font-size: 24px; /* Tamaño reducido del ícono */
    }

    .whatsapp-container i {
        margin-top: 3px; /* Centrado del ícono en tamaños pequeños */
    }
}
