:root {
    --color-darkgrey: #5f5d5d;
    --color-lightgrey: #ebebeb;
    --color-transgrey: #5f5d5d23;
    --color-red: #ff4550;
    --color-green: #49ce7a;
    --color-brightblue: #0a76ff;
    --color-greyblue: #a5bddc;
    --color-transwhite: rgba(255, 255, 255, 0.97);
    --color-transred: rgba(255, 69, 80, 0.85);
}


.chat-context {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    padding: 1em 1em 0 1em;
    box-sizing: border-box;
    font-family: 'Avenir',helvetica,arial,sans-serif;
    padding-top: 0em;
}

#chat {
    flex: 1 1 0;
    overflow-y: scroll;
    padding-left: 2.5em;
    padding-right: 2.5em;
    box-sizing: border-box;
}
#chat::-webkit-scrollbar, #ui-options::-webkit-scrollbar {
    width: 0 !important;
}
.button {
    cursor: pointer;
}
.chat-response {
    max-width: 80%;
    /*opacity: 0;*/
    padding: 1em;
    border-radius: 15px 15px 0px 15px;
    background-color: var(--color-green);
    /*text-align: right;*/
    text-align: left;
    margin-right: 0;
    margin-left: auto;
    margin-top: 1em;
    margin-bottom: 1em;
    position: relative;
    color: var(--color-transwhite);
    width: fit-content;
}
.chat-response p {
    margin: 0;
}
.chat-response.robot {
    background-color: var(--color-lightgrey);
    border-radius: 15px 15px 15px 0px;
    text-align: left;
    margin-right: auto;
    margin-left: 0;
    color: var(--color-darkgrey);
}
.chat-response:after {
    content: "";
    width: 2em;
    height: 2em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    position: absolute;
    bottom: -1.5em;
    left: -2.5em;
    font-size: 1em;
}
.chat-response.user:after {
    content: "";
    left: auto;
    right: -2.5em;
}

#ui-response {
    height: 120px;
    max-height: 120px;
    position: relative;
    transition: all .5s ease-out;
    -webkit-transition: all .5s ease-out;
    -moz-transition: all .5s ease-out;
}
#ui-response.full-submit #response-text {
    display: none;
}
#ui-response.full-submit #ui-submit {
    width: 100%;
}
#ui-response.hide {
    overflow: hidden;
    animation: hide .5s forwards;
    -webkit-animation: hide .5s forwards;
    -moz-animation: hide .5s forwards;
}
@keyframes hide {
    0% {
        opacity: 1;
    }
    99.9999% {
        opacity: 0;
        max-height: 60px;
    }
    100% {
        max-height: 0em;
    }
}

#ui-submit {
    width: 70px;
    height: 120px;
    background-color: var(--color-green);
    color: var(--color-transwhite);
    position: absolute;
    bottom: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    cursor: pointer;
}
#response-text {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 12px 80px 12px 12px;
    border: 1px solid var(--color-lightgrey);
    transition: all .5s ease-in;
    -webkit-transition: all .5s ease-in;
    -moz-transition: all .5s ease-in;
    color: var(--color-darkgrey);
    font-size: 16px;
    font-family: Arial;
}
#response-text:focus {
    outline: none;
    box-shadow: 0 0 15px var(--color-lightgrey);
}
#response-text.invalid {
    background-color: var(--color-transred);
    color: var(--color-transwhite);
}
#ui-options {
    display: flex;
    justify-content: flex-start;
    padding: 1em;    
    overflow-x: scroll;
}
#ui-options:empty {
    padding: 0em;
}
.ui-option {
    border-radius: 3px;
    border: 1px solid var(--color-green);
    padding: 1em;
    margin-right: 1em;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    transition: background-color .2s ease-in;
    color: var(--color-darkgrey);
}
.ui-option:hover, .ui-option.selected {
    background-color: var(--color-green);
    color: #FFF;
}
.ui-option:last-child {
    margin: 0;
}
.ui-option p {
    margin: 0;
}
.ui-option .subtext {
    color: var(--color-greyblue);
    font-size: .85em;
}
.ui-option:hover .subtext, .ui-option.selected .subtext {
    color: var(--color-transwhite);
}
.ui-option.filtered-out {
    display: none;
}
#ui-control > * {
    opacity: 1;
    transition: opacity 1s ease-in-out, max-height 1s ease-in-out;
    -moz-transition: opacity 1s ease-in-out, max-height 1s ease-in-out;
    -webkit-transition: opacity 1s ease-in-out, max-height 1s ease-in-out;
}
#ui-control .hidden {
    opacity: 0;
    -webkit-transition: background 0s;
    -moz-transition: background 0s;
    -ms-transition: background 0s;
    -o-transition: background 0s;
    transition: background 0s;
}


.loader {
    border: 16px solid #f3f3f3;
    border-top: 16px solid var(--color-green);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    margin: auto;
    animation: spin 2s linear infinite;
}
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


@media (max-width: 600px) {
    .chat-context {
        padding: 0em;
    }
    #chat {
        padding: 1.25em;
        padding-bottom: 0em;
    }
    .chat-response.user:after {
        right: -1em;
    }
    .chat-response:after {
        left: -1em;
        bottom: -1em;
    }
}

.chat-bubble {
    background-color: #E6F8F1;
    padding: 16px 28px;
    -webkit-border-radius: 20px;
    -webkit-border-bottom-left-radius: 2px;
    -moz-border-radius: 20px;
    -moz-border-radius-bottomleft: 2px;
    border-radius: 20px;
    border-bottom-left-radius: 2px;
    display: inline-block;
}

.typing {
    align-items: center;
    display: flex;
    height: 17px;
}

    .typing .dot {
        animation: mercuryTypingAnimation 1.8s infinite ease-in-out;
        background-color: #6CAD96;
        //rgba(20,105,69,.7);
        border-radius: 50%;
        height: 7px;
        margin-right: 4px;
        vertical-align: middle;
        width: 7px;
        display: inline-block;
    }

        .typing .dot:nth-child(1) {
            animation-delay: 200ms;
        }

        .typing .dot:nth-child(2) {
            animation-delay: 300ms;
        }

        .typing .dot:nth-child(3) {
            animation-delay: 400ms;
        }

        .typing .dot:last-child {
            margin-right: 0;
        }

@keyframes mercuryTypingAnimation {
    0% {
        transform: translateY(0px);
        background-color: #6CAD96;
        // rgba(20,105,69,.7);
    }

    28% {
        transform: translateY(-7px);
        background-color: #9ECAB9;
        //rgba(20,105,69,.4);
    }

    44% {
        transform: translateY(0px);
        background-color: #B5D9CB;
        //rgba(20,105,69,.2);
    }
}

#chat-context {
    height: 90vh;
}

.chat-btn {
    margin-right: 6px !important;
    padding: 10px !important;
    color: #49ce7a;
    text-transform: uppercase;
    font-family: arial;
    width: 140px;
    margin-bottom: 24px !important;
    display: inline-block;
    font-size: 14px;
}

.chat-btn:hover {
    background-color: #ffffff !important;
    color: #49ce7a !important;
}

.chat-buttons {
    padding-top: 16px;
    margin-left: 16px !important;
}


.chat-response.user:after {
    color: var(--color-green);
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    content: "\f007";
}

#sample-sku-btn select, #sample-btn select {
    border: none !important;
    background-color: transparent !important;
    color: #49ce7a !important;
    max-width: 140px !important;
    outline: 0 !important;
}

@media only screen and (max-width: 600px) {
    .chat-buttons {
        margin-left: 0px !important;
    }
}

@media only screen and (max-width: 380px) {
    .chat-btn {
        width: 100% !important;
        box-sizing: border-box!important;
    }
}