| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/laragon/www/modules/e-gamq/ |
Upload File : |
<script src="/modules/e-gamq/chatbot.js?v=2.4"></script>
<style>
* {
box-sizing: border-box;
}
button,
input {
font: inherit;
-webkit-appearance: none;
appearance: none;
}
img,
svg {
max-width: 100%;
display: block;
}
.chatbot-container {
position: fixed;
bottom: 24px;
right: 24px;
width: min(400px, calc(100vw - 32px));
height: min(610px, calc(100vh - 32px));
background: #ffffff;
border-radius: 28px 28px 24px 24px;
box-shadow: 0 24px 70px rgba(10, 25, 48, 0.24);
display: flex;
flex-direction: column;
z-index: 10000;
font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
overflow: hidden;
border: 1px solid rgba(226, 232, 240, 0.9);
}
.chatbot-header {
position: relative;
min-height: 118px;
background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
color: #ffffff;
padding: 20px 24px 20px 100px;
display: flex;
align-items: center;
gap: 10px;
border-radius: 28px 28px 0 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
overflow: hidden;
flex-shrink: 0;
}
.chatbot-header::before {
display: none;
}
.chatbot-header::after {
display: none;
}
.chatbot-avatar {
position: absolute;
left: 12px;
top: 50%;
transform: translateY(-50%);
width: 72px;
height: 72px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.2);
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
overflow: hidden;
z-index: 2;
flex-shrink: 0;
}
.chatbot-avatar img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center 34%;
border-radius: 50%;
}
.chatbot-info {
position: relative;
flex: 1;
z-index: 1;
min-width: 0;
overflow: hidden;
}
.chatbot-info h4 {
margin: 0;
font-size: 18px;
font-weight: 800;
color: #ffffff;
letter-spacing: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.chatbot-info p {
margin: 4px 0 0 0;
font-size: 13px;
color: rgba(255, 255, 255, 0.9);
font-weight: 400;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.chatbot-close {
position: absolute;
right: 18px;
top: 18px;
z-index: 5;
background: rgba(255, 255, 255, 0.2);
border: none;
color: #ffffff;
font-size: 24px;
cursor: pointer;
width: 36px;
height: 36px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
padding: 0;
flex-shrink: 0;
pointer-events: auto;
}
.chatbot-close:hover {
background: rgba(255, 255, 255, 0.3);
transform: scale(1.05);
}
.chatbot-messages {
flex: 1;
min-height: 0;
padding: 14px 18px;
overflow-y: auto;
overflow-x: hidden;
background: #f8fafc;
scroll-behavior: smooth;
}
.chatbot-messages::-webkit-scrollbar {
width: 6px;
}
.chatbot-messages::-webkit-scrollbar-track {
background: transparent;
}
.chatbot-messages::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 3px;
}
.chatbot-messages::-webkit-scrollbar-thumb:hover {
background: #94a3b8;
}
.chatbot-message {
margin-bottom: 12px;
padding: 12px 14px;
border-radius: 14px;
max-width: 96%;
word-wrap: break-word;
line-height: 1.5;
font-size: 14px;
}
.chatbot-message p {
margin: 0;
white-space: pre-line;
}
.chatbot-message a {
color: #0891b2;
font-weight: 600;
text-decoration: none;
}
.chatbot-message a:hover {
text-decoration: underline;
}
.chatbot-rich-content.is-collapsed {
max-height: 260px;
overflow: hidden;
position: relative;
}
.chatbot-rich-content.is-collapsed::after {
content: '';
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 42px;
background: linear-gradient(180deg, rgba(255,255,255,0), #fff);
}
.chatbot-read-more {
margin-top: 8px;
padding: 0;
border: 0;
background: transparent;
color: #0891b2;
cursor: pointer;
font: inherit;
font-weight: 700;
-webkit-appearance: none;
appearance: none;
}
.bot-message {
background: white;
border: 1px solid #e2e8f0;
border-bottom-left-radius: 4px;
align-self: flex-start;
color: #1e293b;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.user-message {
background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
color: white;
border-bottom-right-radius: 4px;
margin-left: auto;
box-shadow: 0 2px 8px rgba(6, 182, 212, 0.25);
}
.chatbot-options {
flex-shrink: 0;
padding: 10px 14px;
background: #ffffff;
border-top: 1px solid #e2e8f0;
max-height: 210px;
overflow-y: auto;
overflow-x: hidden;
}
.chatbot-options[data-mode="main"] {
max-height: 360px;
padding: 14px 20px 16px;
overflow-y: auto;
overflow-x: hidden;
}
.chatbot-options[data-mode="main-compact"] {
height: 52px !important;
max-height: 52px !important;
min-height: 52px !important;
padding: 8px 14px !important;
overflow-x: hidden !important;
overflow-y: hidden !important;
white-space: nowrap;
border-top: 1px solid #cbd5e1;
box-shadow: 0 -6px 16px rgba(15, 23, 42, 0.05);
}
.chatbot-options-title {
display: none;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-bottom: 10px;
color: #1e293b;
}
.chatbot-options[data-mode="main-compact"] .chatbot-options-title {
height: 36px;
margin-bottom: 0;
}
.chatbot-options-title-text {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
font-size: 13px;
font-weight: 700;
letter-spacing: 0;
}
.chatbot-options-title-text::before {
content: '';
width: 6px;
height: 18px;
border-radius: 999px;
background: #0891b2;
flex-shrink: 0;
}
.chatbot-expand-options {
width: 32px;
height: 28px;
border: 1px solid #cbd5e1;
border-radius: 999px;
background: #f8fafc;
color: #0f172a;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0;
font-size: 17px;
line-height: 1;
transition: all 0.2s;
-webkit-appearance: none;
appearance: none;
}
.chatbot-expand-options:hover {
border-color: #0891b2;
background: #ecfeff;
color: #0e7490;
}
.chatbot-options[data-mode="main"] .chatbot-options-title,
.chatbot-options[data-mode="main-compact"] .chatbot-options-title {
display: flex;
}
.chatbot-options::-webkit-scrollbar {
width: 6px;
}
.chatbot-options::-webkit-scrollbar-track {
background: transparent;
}
.chatbot-options::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 3px;
}
.options-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 8px;
margin-bottom: 8px;
}
.quick-options-row {
display: grid;
grid-template-columns: 1fr;
gap: 8px;
min-width: 0;
overflow: visible;
margin-bottom: 8px;
}
.option-button {
display: flex;
align-items: center;
gap: 10px;
width: 100%;
background: #ffffff;
border: 1px solid #dbe4ee;
color: #26364a;
padding: 12px 14px;
margin-bottom: 8px;
border-radius: 8px;
cursor: pointer;
text-align: left;
font-size: 14px;
font-weight: 600;
transition: all 0.2s;
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
-webkit-appearance: none;
appearance: none;
}
.chatbot-options[data-mode="main-compact"] .quick-options-row {
display: flex !important;
flex-wrap: nowrap !important;
gap: 8px;
min-width: max-content;
overflow-x: auto;
overflow-y: hidden;
margin-bottom: 0;
padding-bottom: 2px;
}
.chatbot-options[data-mode="main-compact"] .option-button {
width: auto !important;
min-width: 122px;
height: 36px;
margin-bottom: 0 !important;
padding: 6px 10px !important;
border-radius: 8px;
white-space: nowrap !important;
}
.chatbot-options[data-mode="main-compact"] .option-text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.chatbot-options[data-mode="minimized"] {
height: 42px !important;
max-height: 42px !important;
min-height: 42px !important;
padding: 6px 12px !important;
overflow: hidden !important;
}
.chatbot-topic-toggle {
width: 100%;
height: 30px;
border: 1px solid #dbe6ef;
border-radius: 999px;
background: #f8fafc;
color: #334155;
cursor: pointer;
font-size: 13px;
font-weight: 600;
-webkit-appearance: none;
appearance: none;
padding: 0;
font-family: inherit;
}
.options-grid .option-button {
margin-bottom: 0;
}
.option-button:hover {
background: #f0fdfa;
color: #0f172a;
border-color: #0891b2;
transform: translateY(-1px);
box-shadow: 0 6px 14px rgba(15, 118, 110, 0.12);
}
.option-icon {
width: 24px;
height: 24px;
border-radius: 6px;
background: #f1f5f9;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 15px;
flex-shrink: 0;
}
.option-text {
flex: 1;
line-height: 1.3;
}
.back-button {
background: #f1f5f9;
border-color: #cbd5e1;
color: #64748b;
font-weight: 600;
margin-top: 8px;
-webkit-appearance: none;
appearance: none;
}
.back-button:hover {
background: #e2e8f0;
color: #475569;
border-color: #94a3b8;
transform: translateY(-1px);
}
.chatbot-input {
flex-shrink: 0;
padding: 10px 14px;
border-top: 1px solid #e2e8f0;
display: flex;
gap: 10px;
background: white;
}
.chatbot-input input {
flex: 1;
padding: 10px 16px;
border: 1.5px solid #e2e8f0;
border-radius: 24px;
outline: none;
font-size: 14px;
transition: all 0.2s;
font-family: inherit;
-webkit-appearance: none;
appearance: none;
}
.chatbot-input input:focus {
border-color: #0891b2;
box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}
.chatbot-input input::placeholder {
color: #94a3b8;
}
.chatbot-input button {
background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
color: white;
border: none;
padding: 0;
border-radius: 50%;
cursor: pointer;
width: 44px;
height: 44px;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
transition: all 0.2s;
box-shadow: 0 2px 8px rgba(6, 182, 212, 0.25);
flex-shrink: 0;
-webkit-appearance: none;
appearance: none;
}
.chatbot-input button:hover {
transform: scale(1.05);
box-shadow: 0 4px 12px rgba(6, 182, 212, 0.35);
}
.chatbot-input button:active {
transform: scale(0.95);
}
.chatbot-toggle {
position: fixed;
bottom: 28px;
right: 28px;
width: 92px;
height: 92px;
background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
border: none;
border-radius: 50%;
color: white;
font-size: 28px;
cursor: pointer;
box-shadow: 0 16px 42px rgba(6, 182, 212, 0.38);
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
overflow: hidden;
flex-shrink: 0;
padding: 0;
}
.chatbot-toggle img {
width: 86px;
height: 86px;
object-fit: cover;
object-position: center 34%;
border-radius: 50%;
}
.chatbot-toggle:hover {
transform: scale(1.1) rotate(5deg);
box-shadow: 0 6px 24px rgba(6, 182, 212, 0.5);
}
.chatbot-toggle:active {
transform: scale(1.05);
}
/* Animation for new messages */
@keyframes messageSlideIn {
from {
opacity: 0;
transform: translateY(12px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.chatbot-message {
animation: messageSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Mobile Responsive */
@media (max-width: 480px) {
.chatbot-container {
width: min(calc(100vw - 32px), 400px);
height: min(calc(100vh - 100px), 610px);
right: 16px;
left: 16px;
bottom: 16px;
border-radius: 12px;
}
.chatbot-toggle {
width: 76px;
height: 76px;
bottom: 16px;
right: 16px;
font-size: 24px;
}
.chatbot-toggle img {
width: 70px;
height: 70px;
}
.options-grid {
grid-template-columns: 1fr;
}
.chatbot-header {
min-height: 100px;
padding: 16px 24px 16px 80px;
}
.chatbot-header::before {
display: none;
}
.chatbot-avatar {
left: 8px;
width: 60px;
height: 60px;
}
.chatbot-messages {
padding: 12px 14px;
}
.chatbot-options {
padding: 12px;
max-height: 180px;
}
.chatbot-options[data-mode="main"] {
max-height: 330px;
padding: 12px;
}
.chatbot-options[data-mode="main-compact"] {
height: 52px !important;
max-height: 52px !important;
min-height: 52px !important;
}
.chatbot-options[data-mode="main-compact"] .option-button {
min-width: 108px;
font-size: 13px;
}
}
@media (max-width: 360px) {
.chatbot-container {
width: min(calc(100vw - 24px), 360px);
}
}
</style>
<button id="chatbot-toggle" class="chatbot-toggle">
<img src="/assets/images/brand/avatars/chatbot.png" width="55" height="55" data-bgposition="center top" data-bgfit="cover" data-bgrepeat="no-repeat" class="rev-slidebg">
<span class="chatbot-icon-fallback" style="display: none;">💬</span>
</button>
<div id="chatbot-container" class="chatbot-container" style="display: none;">
<div class="chatbot-header">
<div class="chatbot-avatar">
<img src="/assets/images/brand/avatars/chatbot.png" alt="Asistente GAMQ">
</div>
<div class="chatbot-info">
<h4>Asistente GAMQ</h4>
<p>Municipio de Quillacollo</p>
</div>
<button class="chatbot-close" id="chatbot-close" type="button" aria-label="Cerrar chatbot">×</button>
</div>
<div class="chatbot-messages" id="chatbot-messages"></div>
<div class="chatbot-options" id="chatbot-options"></div>
<div class="chatbot-input">
<input type="text" placeholder="Escribe tu pregunta..." id="chatbot-input">
<button id="chatbot-send">➤</button>
</div>
</div>