.whatsapp-widget {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 9999;
    cursor: pointer;
    animation: pulse 2s infinite;
}

.whatsapp-button {
    background: #0fe108;
    color: white;
    padding: 15px 25px;
    border-radius: 30px;
    font-weight: bold;
    display: flex;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 16px;
}

.whatsapp-button:hover {
    transform: scale(1.05);
    background: #128C7E;
}

/* Modal de chat */
.whatsapp-modal {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 40px;
    width: 350px;
    max-height: 70vh;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 10000;
    font-family: Arial, sans-serif;
}

/* Encabezado del chat */
.chat-header {
    background: #075E54;
    color: white;
    padding: 15px;
    border-radius: 15px 15px 0 0;
    display: flex;
    align-items: center;
    font-size: 16px;
}

.whatsapp-icon {
    font-size: 24px;
    margin-right: 10px;
}

.close-btn {
    margin-left: auto;
    cursor: pointer;
    font-size: 24px;
    padding: 0 8px;
    transition: opacity 0.3s;
}

.close-btn:hover {
    opacity: 0.8;
}

/* Contenedor del mensaje */
.message-container {
    padding: 15px;
    overflow-y: auto;
    background: #ECE5DD;
    max-height: 50vh;
}

/* Burbuja de mensaje */
.message-content {
    background: #dcf8c6;
    color: #000;
    padding: 15px;
    border-radius: 10px 10px 0 10px;
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 14px;
    word-wrap: break-word;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.message-line {
    margin: 8px 0;
    position: relative;
    padding-left: 25px;
}

.message-line:before {
 
    position: absolute;
    left: 0;
    top: 2px;
    color: #0fe108;
    font-size: 14px;
}

/* Pie del chat */
.chat-footer {
    padding: 15px;
    background: white;
    border-radius: 0 0 15px 15px;
    text-align: center;
}

.send-button {
    background: #0fe108;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
    font-size: 16px;
    width: 100%;
    max-width: 280px;
    display: inline-block;
}

.send-button:hover {
    background: #128C7E;
}

/* Animación */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .whatsapp-widget {
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-button {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .whatsapp-modal {
        width: 90%;
        right: 5%;
        left: 5%;
        bottom: 80px;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .message-content {
        font-size: 13px;
        padding: 12px;
    }
    
    .send-button {
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .whatsapp-widget {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-modal {
        bottom: 70px;
        max-height: 80vh;
        width: 95%;
        right: 2.5%;
        left: 2.5%;
    }
    
    .chat-header {
        padding: 12px;
        font-size: 14px;
    }
    
    .close-btn {
        font-size: 22px;
    }
    
    .message-container {
        max-height: 60vh;
    }
    
    .whatsapp-icon {
        font-size: 20px;
    }
    
    .message-line {
        padding-left: 22px;
    }
}

@media (max-width: 360px) {
    .whatsapp-button {
        padding: 10px 15px;
    }
    
    .message-content {
        font-size: 12px;
        padding: 10px;
    }
    
    .message-line:before {
        font-size: 12px;
    }
    
    .send-button {
        font-size: 13px;
        padding: 12px 15px;
    }
}