*, ::before, ::after {
    box-sizing: border-box;
}
#chatbot {
    max-width: 768px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#chatbot #cb-box {
    padding: 10px 15px;
    height: 600px;
    border: 1px solid #CCC;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-radius: 5px;
    background: #EEE;
}

#chatbot #cb-box > div.human,
#chatbot #cb-box > div.bot {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 75%;
}

#chatbot #cb-box > div.human {
    align-self: start;
}

#chatbot #cb-box > div.bot {
    align-self: end;
    justify-content: end;
}

#chatbot #cb-box > div.bot div:hover {
    cursor: pointer;
    background: #ffd68f;
}

#chatbot #cb-box > div.human span,
#chatbot #cb-box > div.bot span {
    position: relative;
    top: 3px;
}

#chatbot #cb-box > div.human span b,
#chatbot #cb-box > div.bot span b {
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

#chatbot #cb-box > div.human span b {
    background: blueviolet;
    color: white;
}

#chatbot #cb-box > div.bot span b {
    background: orange;
    color: white;
}

#chatbot #cb-box > div.human div,
#chatbot #cb-box > div.bot div {
    border: 1px solid #CCC;
    border-radius: 5px;
    padding: 8px 12px;
    background: #FFF;
}

#chatbot #cb-box > div.bot span {
    order: 1;
}

#chatbot #cb-input {
    display: flex;
    gap: 5px;
}

#chatbot #cb-input input {
    width: 100%;
    padding: 5px;
}

#chatbot #cb-box > div.bot div.dots {
    display: inline-block;
    width: 40px;
    height: 16px;
    background: radial-gradient(circle closest-side,orange 90%,#0000) 0%   50%, radial-gradient(circle closest-side,orange 90%,#0000) 50%  50%, radial-gradient(circle closest-side,orange 90%,#0000) 100% 50%;
    background-size: calc(100%/3) 8px;
    background-repeat: no-repeat;
    animation: dots 1.2s infinite linear;
    border: 0;
    position: relative;
    top: 10px;
    color: transparent;
}

#chatbot #cb-box div.payloads {
    display: flex;
    flex-direction: column;
    align-items: end;
    text-align: right;
    font-size: 12px;
    gap: 5px;
    max-width: 75%;
    align-self: end;
}

#chatbot #cb-box div.payloads div {
    padding: 2px 5px;
    border: 1px solid orange;
    border-radius: 5px;
    background: orange;
    color: white;
}

#chatbot #cb-box div.payloads div:hover {
    background: white;
    color: orange;
    cursor: pointer;
}

@keyframes dots {
    20% {
        background-position: 0%   0%, 50%  50%,100%  50%;
    }
    40% {
        background-position: 0% 100%, 50%   0%,100%  50%;
    }

    60% {
        background-position: 0%  50%, 50% 100%,100%   0%;
    }

    80% {
        background-position: 0%  50%, 50%  50%,100% 100%;
    }
}

