
:root {
    --bootom: 35px;
    --right: 130px;
    --logo-width: 60px;
    --width: 450px;
    --backgroundbot: #e30505;
    --text: #fff;
    --degrade: linear-gradient(-45deg, #01b439 0%, var(--primary) 35%, var(--primary) 65%, #01b439 100%);
}

.a21chatbot {
    position: fixed;
    bottom: var(--bootom);
    right: var(--right);
    max-width: var(--width);
    width: var(--logo-width);
    height: auto;
    cursor: pointer;
    z-index: 999;

    /* largura da barra */
    ::-webkit-scrollbar {
        width: 5px;
    }

    /* fundo da barra */
    ::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    /* parte que se move */
    ::-webkit-scrollbar-thumb {
        background: var(--backgroundbot);
        border-radius: 5px;
    }

    /* quando passa o rato */
    ::-webkit-scrollbar-thumb:hover {
        background: var(--backgroundbot);
    }

    .boas-vindas {
        position: relative;
        max-width: var(--width);
        height: 60px;
        transition: all 1s ease;

        .icon {
            position: absolute;
            right: 0px;
            margin-left: 30px;
            width: var(--logo-width);
            height: auto;
            z-index: 900;
        }

        .texto {
            position: absolute;
            height: 60px;
            width: 200px;
            right: 75px;
            padding-right: 40px;
            display: flex;
            align-items: center;
            transform: translateX(50px);
            /* opacity: 0; */
            transition: transform .4s ease, opacity .4s ease;
            cursor: pointer;
            p {
                width: 100%;
                margin: 0;
                background-color: var(--backgroundbot);
                border: 1px solid var(--text);
                color: #fff;
                border-radius: 5px;
                right: calc(0px - var(--width));
                text-align: center;
            }
        }

    }

    .boas-vindas.active {

        .texto {
            transform: translateX(0);
            opacity: 1;
        }

    }

    .body {
        position: absolute;
        height: 600px;
        bottom: 0;
        width: calc(var(--width) + 20px);
        right: calc(var(--logo-width) - 10px);
        padding: 0;
        background: #f5f7f9;
        box-shadow: 0 0px 20px rgba(0,0,0,0.5);

        display: flex;
        flex-direction: column;

        transform: translateX(50px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transition: transform .4s ease, opacity .4s ease;
    }

    .body.active {
        opacity: 1;
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }


    /* ÁREA DAS MENSAGENS */

    .dialogo {
        flex: 1;
        overflow-y: auto;
        padding: 20px;
        height: calc(100% - 50px);
        /* position: relative; */
    }

    .dialogo ul {
        list-style: none;
        padding: 0;
        margin: 0;
        /*
        position: absolute;
        width: calc(var(--width) - 20px);
        bottom: 0;
        */
    }


    /* MENSAGENS */

    .dialogo li {
        max-width: 75%;
        width: fit-content;
        padding: 10px 14px;
        margin-bottom: 12px;
        border-radius: 14px;
        line-height: 1.4;
        font-size: 14px;
        word-wrap: break-word;
    }


    /* BOT */

    .dialogo li.bot {
        background: #e9eef2;
        color: #333;
        margin-right: auto;
        border-bottom-left-radius: 4px;
    }


    /* HUMANO */

    .dialogo li.human {
        background: var(--backgroundbot);
        color: #fff;
        margin-left: auto;
        border-bottom-right-radius: 4px;
    }


    /* ÁREA DO INPUT */

    .input-chat {
        border-top: 1px solid #ddd;
        background: #fff;
        padding: 0 10px 10px 10px;
        p {
            margin: 0;
            font-size: 10px;
        }
        label {
            margin-top: -5px;
            font-size: 12px;
        }
    }


    /* INPUT */

    .input-chat textarea {
        width: 100%;
        height: 55px;
        resize: none;

        border-radius: 8px;
        border: 1px solid #ccc;

        padding: 10px;
        font-size: 14px;
        font-family: inherit;

        box-sizing: border-box;

        outline: none;
    }

    .input-chat textarea:focus {
        border-color: var(--backgroundbot);
    }

    .close {
        position: absolute;
        top: 0px;
        right: 4px;
        font-size: 21px;
        font-weight: 600;
        background: #f5f7f9;
        color: #888;
        height: 45px;
        width: 45px;
        text-align: center;
        padding: 7px;
        border-radius: 0 0 0 10px;
    }

}

@media (max-width: 767.99px) {
    
    .a21chatbot {

        .boas-vindas {
            .texto {
                p {
                    font-size: 12px;
                    line-height: 150%;
                }
            }
        }

        .body {
            position: fixed;
            left: 5%;
            width: 90%;
            right: 5%;
            bottom: calc(var(--bootom) + 35px);
        }

    }
    
}