
/* BOT*/

/* Botón flotante */
#chatBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #0084ff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
}

    #chatBtn:focus, #chatBtn:active {
        border: none !important;
        box-shadow: none !important;
    }

    #chatBtn:hover {
        border: none !important;
        box-shadow: none !important;
        animation: pulse 1.8s infinite;
    }

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

/* Ventana de chat */
#chatWindow {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 290px;
    height: 450px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#chatHeader {
    background-color: #0084ff;
    color: white;
    padding: 10px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#closeBtn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

#faq {
    background: #f0f8ff;
    padding: 10px;
    font-size: 13px;
    border-bottom: 1px solid #ccc;
}

    #faq ul {
        padding-left: 18px;
        margin: 5px 0;
    }

.faq-item {
    cursor: pointer;
    margin-bottom: 4px;
    color: #0077cc;
}

    .faq-item:hover {
        text-decoration: underline;
    }

#messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.msg {
    margin: 5px 0;
}

.msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 18px;
    line-height: 1.4;
    display: flex;
    word-wrap: break-word;
}
    /* Mensaje del usuario (alineado a la derecha) */
    .msg.user {
        min-width: 80%;
        align-self: flex-end;
        background-color: #f1f0f0;
        color: #000;
        border-bottom-right-radius: 2px;
        position: relative;
        word-wrap: anywhere;
    }

    /* Mensaje del bot (alineado a la izquierda) */
    .msg.bot {
        align-self: flex-start;
        background-color: #c6d0f8;
        color: #000;
        border-bottom-left-radius: 2px;
        position: relative;
        word-wrap:anywhere;
    }


#chatInputArea {
    display: flex;
    border-top: 1px solid #ccc;
}

#userInput {
    flex: 1;
    padding: 8px;
    border: none;
    font-size: 14px;
}

    #userInput:focus, #userInput:active {
        flex: 1;
        padding: 8px;
        border: none;
        font-size: 14px;
        box-shadow: 0px;
        outline: 0px;
    }


#sendBtn {
    padding: 8px 12px;
    border: none;
    background-color: #0084ff;
    color: white;
    cursor: pointer;
}

.animated-icon {
    display: inline-block;
    font-size: 24px;
}

#chatBtn.animating .animated-icon {
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

.preloaderTyping {
    font-style: italic;
    color: #666;
    opacity: 0.8;
}

    .preloaderTyping::after {
        content: ' .';
        animation: dots 1s steps(3, end) infinite;
    }

@keyframes dots {
    0% {
        content: ' .';
    }

    33% {
        content: ' ..';
    }

    66% {
        content: ' ...';
    }

    100% {
        content: ' .';
    }
}
