:root {
    --oliviabotaoia : #2d70e5;
    --oliviabotaoiahover : #4f8bf1;
    --oliviafechar : #ff0000;
    --oliviafecharhover : #ff3636;
    --oliviafalaela : #2d70e5;
    --oliviafalavoce : #304b7a;
    --oliviabotaoperguntar : #304b7a;
    --oliviabotaoperguntarhover : #4a679b;
}
#olivia {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 0;
    height: 300px;
    overflow: hidden;
    background-color: transparent;
    z-index: 999;
    transition: 0.5s;
    & .avatar {
        position: absolute;
        bottom: 0;
        right: -300px;
        width: 300px;
        height: 300px;
        transition: 0.5s;
        & figure {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            & img {
                width: 100%;
                height: 100%;
                object-fit: contain;
                object-position: bottom left;
            }
        }
    }
    & .interacao {
        position: absolute;
        top: 0;
        left: 0;
        width: 250px;
        height: 258px;
        background-color: #ffffff;
        opacity: 0;
        transition: 0.5s;
        border: 1px solid #838383;
        border-radius: 6px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
        & .formulario {
            position: relative;
            float: left;
            width: calc(100% - 6px);
            height: calc(100% - 12px);
            margin: 3px;
            z-index: 999;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-flow: column;
            & .asmensagens {
                position: relative;
                float: left;
                width: 100%;
                max-width: 600px;
                height: calc(100% - 81px);
                padding-bottom: 10px;
                border-bottom: 1px solid #c7c7c7;
                overflow-y: scroll;
                scrollbar-width: none;
                -ms-overflow-style: none;
                & .aconversa {
                    position: relative;
                    float: left;
                    width: 100%;
                    margin-top: -5px;
                    min-height: calc(100% + 5px);
                    max-width: 600px;
                    & .item {
                        position: relative;
                        float: left;
                        width: calc(100% - 20px);
                        clear: both;
                        margin-top: 5px;
                        margin-left: 20px;
                        background-color: var(--oliviafalavoce);
                        border-radius: 4px;
                        & p {
                            color: #ffffff;
                            margin: 5px 10px;
                            line-height: 16px;
                            font-size: 14px;
                            & a {
                                color: #ffd35a;
                                text-decoration: underline;
                                word-break: break-word;
                            }
                            & a:hover {
                                color: #ffd35a;
                                text-decoration: none;
                            }
                        }
                    }
                    & .item.ela {
                        background-color: var(--oliviafalaela);
                        margin-left: 0;
                    }
                }
            }
            & .asmensagens::-webkit-scrollbar {
                display: none;
            }
            & .pergunta {
                position: relative;
                float: left;
                width: 100%;
                height: 60px;
                margin-top: 10px;
                display: flex;
                justify-content: center;
                align-items: center;
                & form {
                    position: relative;
                    float: left;
                    width: 100%;
                    height: 100%;
                    max-width: 600px;
                    & textarea {
                        position: relative;
                        float: left;
                        width: calc(100% - 58px);
                        border: 1px solid #b6b6b6;
                        border-radius: 4px;
                        line-height: 16px;
                        min-height: 60px;
                    }
                    & button[type="submit"] {
                        position: relative;
                        float: right;
                        width: 48px;
                        height: 48px;
                        line-height: 40px;
                        text-align: center;
                        border-radius: 50%;
                        background-color: var(--oliviabotaoperguntar);
                        color: #ffffff;
                        transition: 0.2s;
                        cursor: pointer;
                    }
                    & button[type="submit"]:hover {
                        background-color: var(--oliviabotaoperguntarhover);
                    }
                }
            }
        }
        & .botaodeaumentar {
            position: absolute;
            top: 0;
            right: -35px;
            width: 30px;
            height: 30px;
            background-color: var(--oliviabotaoia);
            color: #ffffff;
            border-radius: 4px;
            transition: 0.2s;
            text-align: center;
            line-height: 30px;
        }
        & .botaodeaumentar:hover {
            background-color: var(--oliviabotaoiahover);
        }

        & .botaodefechar {
            position: absolute;
            top: 40px;
            right: -35px;
            width: 30px;
            height: 30px;
            background-color: var(--oliviafechar);
            color: #ffffff;
            border-radius: 4px;
            transition: 0.2s;
            text-align: center;
            line-height: 30px;
        }
        & .botaodefechar:hover {
            background-color: var(--oliviafecharhover);
        }
    }
    & .painelfundo {
        position: fixed;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        background-color: rgba(0, 0, 0, 0.5);
        display: none;
    }
    & .fechar {
        position: absolute;
        top: 0;
        right: 0;
        width: 50px;
        height: 32px;
        line-height: 32px;
        text-align: center;
        background-color: var(--oliviafechar);
        color: #ffffff;
        border-top-left-radius: 6px;
        border-bottom-left-radius: 6px;
        border-top: 1px solid #000000;
        border-bottom: 1px solid #000000;
        border-left: 1px solid #000000;
        transition: 0.2s;
    }
    & .fechar:hover {
        background-color: var(--oliviafecharhover);
        color: #ffffff;
    }
}
#olivia.aberto {
    width: 300px;
    overflow: unset;
    & .avatar {
        right: -50px;
    }
    .interacao.aberto {
        top: -100px;
        left: -96px;
        opacity: 1.0;
    }
    .interacao.aberto.aumentado {
        top: calc((100vh * -1) + 400px);
        left: calc((100vw * -1) + 326px);
        width: calc(100vw - 69px);
        height: calc(100vh - 120px);
        z-index: 999;
    }
}

.oliviafloating {
    position: fixed;
    right: 30px;
    bottom: 240px;
    background-color: var(--oliviabotaoia);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    color: #ffffff !important;
    line-height: 64px;
    text-align: center;
    font-size: 22px;
    border: 4px solid #ffffff;
    z-index: 999;
    transition: 0.2s;
    & p {
        margin: 0;
        line-height:44px;
        font-weight: bold;
        font-size: 24px;
        text-decoration: none;
    }
}
.oliviafloating:hover {
    background-color: var(--oliviabotaoiahover);
    text-decoration: none;
}

.animacaopensando {
    line-height: 16px;
    font-size: 8px;
}
.animacaopensando i {
    opacity: 0.3;
    margin: 0 2px;
    animation: pulse 1s infinite;
}
.animacaopensando i:nth-child(1) {
    animation-delay: 0s;
}
.animacaopensando i:nth-child(2) {
    animation-delay: 0.2s;
}
.animacaopensando i:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes pulse {
    0%, 80%, 100% {
        opacity: 0.3;
    }
    40% {
        opacity: 1;
    }
}


@media only screen and (max-width: 768px) {

    #olivia.aberto {
        .interacao.aberto.aumentado {
            top: calc((100vh * -1) + 410px);
            left: calc((100vw * -1) + 326px);
            width: calc(100vw - 69px);
            height: calc(100vh - 120px);
            z-index: 999;
        }
    }

}

@media only screen and (max-width: 480px) {

    #olivia {
        & .avatar {
            right: -250px;
            width: 250px;
            height: 250px;
        }
    }
    #olivia.aberto {
        width: 300px;
        overflow: unset;
        & .avatar {
            right: -80px;
        }
        .interacao.aberto {
            top: -60px;
            left: -30px;
            opacity: 1.0;
        }
    }

}
