
:root {

    --chat-primario: #2A2A5F;
    --chat-secundario: #1b1b40;
    --chat-fondo: #f5f7fb;
    --chat-borde: #e5e7eb;

}

/*================== CONTENEDOR ==================*/

.chatbot-contenedor {

    position: static;

}

/*================== BOTÓN ==================*/

.chatbot-boton {

    position: fixed;

    right: 35px;

    bottom: 120px;

    width: 50px;

    height: 50px;

    display: flex;

    justify-content: center;

    align-items: center;

    border: 1px solid #e5e7eb;

    border-radius: 50%;

    background: #ffffff;

    cursor: pointer;

    overflow: hidden;

    box-shadow: 0 8px 25px rgba(0, 0, 0, .12);

    padding: 0;

    z-index: 9999;

    opacity: 0;

    animation: fadeIn .8s ease forwards;

    animation-delay: .5s;

    transition: transform .3s ease,
                box-shadow .3s ease;

}

.chatbot-boton:hover {

    transform: scale(1.1);

    box-shadow: 0 12px 30px rgba(0, 0, 0, .2);

}

.chatbot-boton img {

    width: 30px;

    height: 30px;

    object-fit: contain;

    display: block;

}

/*================== PANEL ==================*/

.chatbot-panel {

    position: fixed;

    right: 85px;

    bottom: 60px;

    width: 360px;

    height: 540px;

    background: #ffffff;

    border-radius: 20px;

    overflow: hidden;

    display: none;

    flex-direction: column;

    border: 1px solid var(--chat-borde);

    box-shadow: 0 20px 50px rgba(0, 0, 0, .15);
    z-index: 99999;

}

.chatbot-panel.activo {

    display: flex;

}

/*================== HEADER ==================*/

.chatbot-header {

    background: #ffffff;

    color: #222;

    padding: 15px;

    border-bottom: 1px solid var(--chat-borde);

    display: flex;

    justify-content: space-between;

    align-items: center;

}

.chatbot-header-info {

    display: flex;

    align-items: center;

    gap: 12px;

}

.chatbot-header img {

    width: 40px;

    height: 40px;

    padding: 6px;

    border-radius: 12px;

    background: #f5f7fb;

}

.chatbot-header h3 {

    margin: 0;

    font-size: 15px;

    color: var(--chat-primario);

}

.chatbot-header span {

    font-size: 12px;

    color: #6b7280;

}

#cerrarChatbot {

    width: 35px;

    height: 35px;

    border: none;

    border-radius: 10px;

    background: #f5f7fb;

    color: #555;

    cursor: pointer;

    transition: .3s;

}

#cerrarChatbot:hover {

    background: #eceff5;

}

/*================== MENSAJES ==================*/

.chatbot-mensajes {

    flex: 1;

    overflow-y: auto;

    padding: 15px;

    background: var(--chat-fondo);

    display: flex;

    flex-direction: column;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    gap: 12px;

}

.chatbot-mensajes::-webkit-scrollbar {

    width: 6px;

}

.chatbot-mensajes::-webkit-scrollbar-thumb {

    background: #d1d5db;

    border-radius: 20px;

}

.mensaje-bot,
.mensaje-usuario {

    max-width: 85%;

    padding: 12px;

    border-radius: 16px;

    line-height: 1.6;

    font-size: 13px;

    word-wrap: break-word;

}

.mensaje-bot {

    background: #ffffff;

    border: 1px solid var(--chat-borde);

    color: #222;

    align-self: flex-start;

}

.mensaje-usuario {

    background: var(--chat-primario);

    color: #ffffff;

    align-self: flex-end;

}

/*================== PRODUCTOS ==================*/

.chatbot-producto {

    display: flex;

    gap: 10px;

    margin-top: 10px;

    padding: 10px;

    border-radius: 14px;

    background: #ffffff;

    border: 1px solid var(--chat-borde);

}

.chatbot-producto img {

    width: 60px;

    height: 60px;

    border-radius: 10px;

    object-fit: cover;

}

.chatbot-producto-info {

    flex: 1;

}

.chatbot-producto-info h4 {

    margin: 0 0 5px;

    font-size: 13px;

}

.chatbot-producto-info p {

    margin: 3px 0;

    font-size: 12px;

}

/*================== SUGERENCIAS ==================*/

.chatbot-sugerencias {

    padding: 12px;

    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    border-top: 1px solid var(--chat-borde);

    background: #ffffff;

}

.sugerencia {

    border: none;

    padding: 8px 12px;

    border-radius: 30px;

    background: #eef2ff;

    color: var(--chat-primario);

    cursor: pointer;

    font-size: 12px;

    transition: .3s;

}

.sugerencia:hover {

    background: #dbe4ff;

}

/*================== INPUT ==================*/

.chatbot-input {

    padding: 12px;

    display: flex;

    gap: 8px;

    background: #ffffff;

    border-top: 1px solid var(--chat-borde);

}

.chatbot-input input {

    flex: 1;

    padding: 10px 12px;

    border: 1px solid var(--chat-borde);

    border-radius: 12px;

    outline: none;

    font-size: 13px;

    font-family: inherit;

}

.chatbot-input input:focus {

    border-color: var(--chat-primario);

}

#enviarChatbot {

    width: 45px;

    height: 45px;

    border: none;

    border-radius: 12px;

    background: var(--chat-primario);

    color: white;

    cursor: pointer;

}

/*================== RESPONSIVE ==================*/

@media (max-width: 768px) {



    .chatbot-boton img {

        width: 30px;

        height: 30px;

    }

}

@keyframes fadeIn {

    to {

        opacity: 1;

    }

}

.chatbot-mapa {

    width: 100%;

    max-width: 250px;

    margin: 10px auto;

    overflow: hidden;

    border-radius: 10px;

}

.chatbot-mapa iframe {

    width: 100%;

    height: 140px;

    border: 0;

    border-radius: 10px;

}
.chatbot-mapa {

    width: 100%;

    max-width: 220px;

    margin: 10px auto;

}

.chatbot-mapa iframe {

    width: 100%;

    height: 120px;

}
/*================== RESPONSIVE ==================*/

@media (max-width: 768px) {

    /*================== BOTÓN ==================*/

    .chatbot-boton {

        position: fixed;

        width: 50px;
        height: 50px;

        right: 20px;

        bottom: 82px;

        z-index: 100000;

    }

    .chatbot-boton img {

        width: 30px;
        height: 30px;

    }


    /*================== PANEL ==================*/

    .chatbot-panel {

        width: 94%;

        height: 70vh;

        right: 3%;

        bottom: 135px;

        top: auto;

        border-radius: 18px;

    }

    /*================== HEADER ==================*/

    .chatbot-header {

        padding: 12px;

    }

    .chatbot-header img {

        width: 38px;
        height: 38px;

    }


    /*================== MENSAJES ==================*/

    .chatbot-mensajes {

        padding: 10px;

        gap: 8px;

        overflow-y: auto;

        overscroll-behavior: contain;

        touch-action: pan-y;

    }

    .mensaje-bot,
    .mensaje-usuario {

        max-width: 90%;

        padding: 10px;

        font-size: 12px;

        line-height: 1.5;

    }


    /*================== SUGERENCIAS ==================*/

    .chatbot-sugerencias {

        padding: 8px;

        gap: 6px;

        max-height: 75px;

        overflow-y: auto;

    }

    .sugerencia {

        padding: 7px 10px;

        font-size: 11px;

    }


    /*================== INPUT ==================*/

    .chatbot-input {

        padding: 8px;

        gap: 6px;

    }

    .chatbot-input input {

        padding: 9px 10px;

        font-size: 12px;

    }

    #enviarChatbot {

        width: 42px;

        height: 42px;

        flex-shrink: 0;

    }



    /*================== PRODUCTOS ==================*/

    .chatbot-producto {

        gap: 8px;

        padding: 8px;

        margin-top: 8px;

    }

    .chatbot-producto img {

        width: 55px;

        height: 55px;

    }

    .chatbot-producto-info h4 {

        font-size: 12px;

    }

    .chatbot-producto-info p {

        font-size: 11px;

    }


    /*================== MAPA ==================*/

    .chatbot-mapa {

        width: 100%;

        max-width: 220px;

        margin: 8px auto;

    }

    .chatbot-mapa iframe {

        width: 100%;

        height: 120px;

    }

}
@media (max-width: 768px) {

    .chatbot-mensajes {
        overflow-y: auto;
        overscroll-behavior: contain;
        touch-action: pan-y;
    }

}