﻿.floating-chat {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: fixed;
    bottom: 30px;
    right: 25px;
    width: 50px;
    height: 50px;
    transform: translateY(70px);
    transition: all 250ms ease-out;
    border-radius: 50%;
    opacity: 0;
    background: rgb(255, 218, 0) no-repeat fixed;
    z-index: 9999;
}


.floating-chat .chat-btn {
    font-size: 30px;
    color: #1d1f48
}


.floating-chat.enter:hover {
    opacity: 1;
}

.floating-chat.enter {
    transform: translateY(0);
    opacity: 0.8;
}

.floating-chat.expand {
    width: 370px;
    max-height: 470px;
    height: 470px;
    cursor: auto;
    opacity: 1;
}

.floating-chat :focus {
    outline: 0;
}

.floating-chat button {
    background: transparent;
    border: 0;
    color: white;
    text-transform: uppercase;
    border-radius: 3px;
    cursor: pointer;
}

.floating-chat .chat {
    display: flex;
    flex-direction: column;
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    border-radius: 50%;
    transition: all 250ms ease-out;
    margin: auto;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.floating-chat .chat.enter {
    opacity: 1;
    width: auto;
    height: auto;
    box-shadow: rgba(29, 31, 72, 0.4) 0px 1px 3px 0px, rgba(29, 31, 72, 0.5) 0px 1px 5px 0px;
    border-radius: 5px;
}

.floating-chat .chat .header {
    flex-shrink: 0;
    display: flex;
    background: var(--color-sana);
    padding: 10px;
    border-radius: 5px 5px 0 0;
}

.floating-chat .chat .header .title {
    flex-grow: 1;
    flex-shrink: 1;
    padding: 0 5px;
    font-weight: 500;
}

.floating-chat .chat .header .title .online-text {
    color: #0f0;
}

.floating-chat .chat .header button {
    flex-shrink: 0;
}

.floating-chat .chat .header button:hover {
    flex-shrink: 0;
    background-color: rgba(255, 218, 0, 1);
    color: #1d1f48;
}

.floating-chat .chat .messages {
    padding: 10px;
    margin: 0;
    list-style: none;
    overflow-y: scroll;
    overflow-x: hidden;
    flex-grow: 1;
    background: white;
    height: 365px;
}

.floating-chat .chat .messages::-webkit-scrollbar {
    width: 5px;
}

.floating-chat .chat .messages::-webkit-scrollbar-track {
    border-radius: 5px;
    background-color: rgba(29, 31, 72, 0.6);
}

.floating-chat .chat .messages::-webkit-scrollbar-thumb {
    border-radius: 5px;
    background-color: rgba(29, 31, 72, 0.7);
}

.floating-chat .chat .messages li.message {
    position: relative;
    clear: both;
    display: inline-block;
    padding: 14px;
    margin: 0 0 20px 0;
    font: 13px/16px "Noto Sans", sans-serif;
    border-radius: 10px;
    background-color: #F7F3E9;
    word-wrap: break-word;
    max-width: 81%;
}

.floating-chat .chat .messages li:before {
    position: absolute;
    top: -3px;
    width: 35px;
    height: 35px;
    border-radius: 25px;
    content: "";
    background-size: cover;
}


.floating-chat .chat .messages li:after {
    position: absolute;
    top: 10px;
    content: "";
    width: 0;
    height: 0;
    border-top: 10px solid #F7F3E9;
}


.floating-chat .chat .messages li.self {
    animation: show-chat-odd 0.15s 1 ease-in;
    -moz-animation: show-chat-odd 0.15s 1 ease-in;
    -webkit-animation: show-chat-odd 0.15s 1 ease-in;
    float: right;
    margin-right: 5px;
    color: white;
    background: #1d1f48;
}


.floating-chat .chat .messages li.self:before {
    /*right: -45px;*/
    /*background-image: url(https://e7.pngegg.com/pngimages/799/987/png-clipart-computer-icons-avatar-icon-design-avatar-heroes-computer-wallpaper-thumbnail.png);*/
}


.floating-chat .chat .messages li.self:after {
    border-right: 10px solid transparent;
    border-top: 10px solid #1d1f48;
    right: -10px;
}


.floating-chat .chat .messages li.other {
    animation: show-chat-even 0.15s 1 ease-in;
    -moz-animation: show-chat-even 0.15s 1 ease-in;
    -webkit-animation: show-chat-even 0.15s 1 ease-in;
    float: left;
    margin-left: 45px;
    color: var(--color-sana);
}

.floating-chat .chat .messages li.other:before {
    left: -45px;
    background-image: url('../img/sana-logo.png');
}

.floating-chat .chat .messages li.other:after {
    border-left: 10px solid transparent;
    left: -10px;
}


.floating-chat .chat .messages .no-message-placeholder {
    height: 100%;
    width: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url("../img/placeholder-text.png");
}


.floating-chat .chat .messages .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #b8942f;
    margin-bottom: 10px;
    margin-right: 5px;
}


.floating-chat .chat .messages .dot:last-child {
    margin-right: 0;
}


.floating-chat .chat .messages .waiting-message-container .dot:nth-last-child(1) {
    animation: jumpingAnimation 0.6s 0.1s ease-in infinite;
}

.floating-chat .chat .messages .waiting-message-container .dot:nth-last-child(2) {
    animation: jumpingAnimation 0.6s 0.2s ease-in infinite;
}

.floating-chat .chat .messages .waiting-message-container .dot:nth-last-child(3) {
    animation: jumpingAnimation 0.6s 0.3s ease-in infinite;
}


.floating-chat .chat .footer {
    flex-shrink: 0;
    display: flex;
    height: 60px;
    max-height: 60px;
    background: white;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border-radius: 0 0 5px 5px;
    padding: 0;
}

.floating-chat .chat .footer .text-box {
    background: white;
    min-height: 100%;
    width: 100%;
    height: 60px;
    color: #1d1f48;
    overflow-y: hidden;
    padding: 0.375rem 48px 0.375rem 0.75rem !important;
    font-size: 14px;
    font-weight: normal !important;
    resize: none;
    outline: none;
    border: none;
    border-radius: 0;
}

.floating-chat .chat .footer .text-box:disabled {
    color: grey;
    background-color: lightgrey;
    cursor: not-allowed;
}


.floating-chat .chat .footer .msg_send_btn {
    background: rgb(255, 218, 0) none repeat scroll 0 0;
    border: none;
    border-radius: 50%;
    color: #000000;
    cursor: pointer;
    font-size: 18px;
    width: 36px;
    height: 36px;
    position: absolute;
    right: 8px;
    bottom: 7px;
}

.floating-chat .chat .footer .msg_send_btn i {
    padding-right: 2px;
    padding-top: 6px;
}


.floating-chat .chat .footer .msg_send_btn:disabled {
    cursor: not-allowed;
}

.sources-container h4 {
    font-weight: 600;
}

.sources-container ul {
    list-style-type: disc;
}

.sources-container a {
    text-decoration: underline;
}


@keyframes show-chat-even {
    0% {
        margin-left: -480px;
    }

    100% {
        margin-left: 0;
    }
}

@-moz-keyframes show-chat-even {
    0% {
        margin-left: -480px;
    }

    100% {
        margin-left: 0;
    }
}

@-webkit-keyframes show-chat-even {
    0% {
        margin-left: -480px;
    }

    100% {
        margin-left: 0;
    }
}

@keyframes show-chat-odd {
    0% {
        margin-right: -480px;
    }

    100% {
        margin-right: 0;
    }
}

@-moz-keyframes show-chat-odd {
    0% {
        margin-right: -480px;
    }

    100% {
        margin-right: 0;
    }
}

@-webkit-keyframes show-chat-odd {
    0% {
        margin-right: -480px;
    }

    100% {
        margin-right: 0;
    }
}


@keyframes jumpingAnimation {
    0% {
        transform: translate3d(0, 0,0);
    }

    50% {
        transform: translate3d(0, 15px,0);
    }

    100% {
        transform: translate3d(0, 0, 0);
    }
}
