/* =========================================
BOTON FLOTANTE IA
========================================= */

#chatbot-btn{
    position: fixed;
    left: 20px;
    bottom: 20px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #0d6efd;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 32px;
    z-index: 999999;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

#chatbot-btn:hover{
    transform: scale(1.1);
}

/* =========================================
VENTANA CHAT
========================================= */

#chatbot-window{
    position: fixed;
    left: 20px;
    bottom: 105px;
    width: 350px;
    height: 500px;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    z-index: 999999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);

    display: none;
    flex-direction: column;
}

/* MOSTRAR CHAT */

#chatbot-window.active{
    display: flex !important;
}

/* =========================================
HEADER
========================================= */

.chat-header{
    background:#0d6efd;
    color:white;
    padding:15px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    font-size:18px;
    font-weight:bold;
}

/* BOTON LIMPIAR */

#clearChat{
    background:transparent;
    border:none;
    color:white;
    font-size:20px;
    cursor:pointer;
    transition:0.3s;
}

#clearChat:hover{
    transform:scale(1.2);
}

/* =========================================
AREA MENSAJES
========================================= */

#chat-messages{
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f4f6f9;
}

/* =========================================
MENSAJES
========================================= */

.message{
    margin-bottom: 15px;
    padding: 12px 14px;
    border-radius: 14px;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

/* IA */

.ia-message{
    background: #e9f2ff;
    color: #111;
    align-self: flex-start;
}

/* USUARIO */

.user-message{
    background: #0d6efd;
    color: white;
    margin-left: auto;
    text-align: right;
}

/* =========================================
INPUT
========================================= */

.chat-input{
    display: flex;
    border-top: 1px solid #ddd;
    background: white;
}

/* INPUT TEXTO */

.chat-input input{
    flex: 1;
    border: none;
    outline: none;
    padding: 15px;
    font-size: 14px;
}

/* BOTON ENVIAR */

.chat-input button{
    width: 65px;
    border: none;
    background: #0d6efd;
    color: white;
    cursor: pointer;
    font-size: 22px;
}

/* =========================================
RESPONSIVE
========================================= */

@media(max-width:480px){

    #chatbot-window{
        width: calc(100% - 40px);
        height: 75vh;
    }

}