Send me a message

Have a project in mind or just want to chat ideas? Fill out the form and I’ll get back to you shortly.

<script
  id="retell-widget"
  src="https://dashboard.retellai.com/retell-widget.js"
  type="module"
  data-public-key="faf9576fcb702817d806b"
  data-agent-id="agent_3ccbacd040b5881ce2d257864c"
  data-title="Habla con nuestro Asistente AI"
></script>

<script>
  window.addEventListener('load', () => {
    setTimeout(() => {
      try {
        const widgetContainer = document.querySelector('#retell-chat-widget-container');
        
        if (widgetContainer) {
          // --- NUEVO CÓDIGO PARA MOVER EL WIDGET A LA IZQUIERDA ---
          console.log("Moviendo el widget a la izquierda...");
          widgetContainer.style.right = 'auto'; // Anula la posición de la derecha
          widgetContainer.style.left = '20px';  // Establece una nueva posición a la izquierda (puedes cambiar 20px si quieres)
          // --- FIN DEL NUEVO CÓDIGO ---

          const shadowRoot = widgetContainer.shadowRoot;
          if (shadowRoot) {
            console.log("Widget de Retell encontrado. Aplicando estilos...");
            
            const header = shadowRoot.querySelector('.chat-header');
            if (header) {
              header.style.backgroundColor = '#f86f05';
            }
            
            const openChatButton = shadowRoot.querySelector('#chat-button-container .bg-gray-900');
            if(openChatButton){
              openChatButton.style.backgroundColor = '#f86f05';
            }

            const headerTitle = shadowRoot.querySelector('.chat-header-title');
            if (headerTitle) {
              const logo = document.createElement('img');
              logo.src = 'https://andresmorales.com.co/wp-content/uploads/2025/06/cropped-cropped-321-1-196x94.png';
              logo.style.width = '80px';
              logo.style.height = 'auto';
              logo.style.marginRight = '10px';
              headerTitle.parentNode.insertBefore(logo, headerTitle);
            }
          }
        } else {
            console.error("No se pudo encontrar el contenedor del widget de Retell.");
        }
      } catch (error) {
        console.error("Error al personalizar el widget de Retell:", error);
      }
    }, 2000);
  });
</script>