#livechat input, #livechat select, #livechat textarea, #livechat button {
    font-family: 'Roboto', sans-serif;
}

button {
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    border: 0;
}

#livechat button:active, #livechat textarea:active, #livechat input:active, #livechat button:focus, #livechat textarea:focus, #livechat input:focus {
    outline: none;
}

#livechat button:hover {
    cursor: pointer;
}

@keyframes progress-animation {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 50px 50px;
    }
}

#prechat {
    text-align: center;
    transition: all .1s ease-out;
    align-self: center;
}

#prechat.hide {
    opacity: 0;
    transform: scale(0.7);
    display:none;

}

#prechat input {
    padding: .4em;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    margin-top: .2em;
    display: inline-block;
}

#set-data-button {
    -webkit-appearance: none;
    border-radius: 2px;
    background-clip: padding-box;
    background-color: #aecf5f!important;
    box-shadow: 0 2px 0 rgba(0,0,0,.1), inset 0 -3px 0 rgba(129,163,48,.3);
    font-size: 14px;
    color: #fff;
    padding: 9px 6px 11px;
    width: 100%;
    border: 0;
    cursor: pointer;
    margin-top: 30px;
}

#livechat {
    width: 300px;
    height: 500px;
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 1.5em;
    right: 1.5em;
    transition: all .1s ease-out;
    box-shadow: 0 15px 50px 0 rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    opacity: 1;
    z-index: 1000;
}

#livechat-minimized {
    width: 4em;
    height: 4em;
    background-color: #0D47A1;
    position: fixed;
    bottom: 6em;
    right: 1.5em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 50px 0 rgba(0, 0, 0, 0.3);
    z-index: 100;
    opacity: 0;
    transition: all .2s ease-out;
    transform: scale(0.1);
}

#livechat-minimized:hover {
    cursor: pointer;
}

#livechat-minimized.minimized {
    opacity: 1;
    transform: none;
}

#livechat > div:first-child {
    border-radius: 5px 5px 0 0;
}

#livechat > div:last-child, #message-input, #send-button {
    border-radius: 0 0 10px 10px;
}

#livechat.minimized {
    transform: scale(0.8) translate(10%, 30%);
    opacity: 0;
    z-index: -1;
}

#rate-chat {
    position: absolute;
    top: 4em;
    left: 0;
    right: 0;
    z-index: 12;
}

#rate-chat.hide {
    opacity: 0;
    display: none;
}

#minimize {
    color: #fff;
    padding: 0;
}

#livechat.minimized #minimize {
    transform: rotate(180deg);
}

#message-list {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: .5em;
    background-color: white;
    overflow-y: auto;
    min-height: 0px;
    position: relative;
}

#message-list > div:last-child {
    padding-bottom: .5em;
}

#message-list .msg, #message-list .msg-operator {
    padding: 12px 10px;
}

#message-list .msg .author {
    color: #00457c;
    font-size: 12px;
    font-weight: 300;
    padding-bottom: 2px;
    display: block;
}

#message-list .msg-operator .author {
    color: #696969;
    font-size: 12px;
    font-weight: 300;
    padding-bottom: 2px;
    display: block;
}

#message-list .msg .msg-text {
    color: #00457c;
    display: block;
}

#message-list .msg-operator .msg-text {
    color: #000;
    display: block;
}

#livechat-header {
    flex-shrink: 0;
    line-height: 3em;
    padding: .5em 1em;
    height: 3em;
    display: flex;
    justify-content: space-between;
    background-color: #00457c;
    color: #fff;
    position: relative;
    z-index: 1;
}

#livechat-header div {
    line-height: 3em;
}

#message-input {
    font-size: 1em;
    padding: 0 1em;
    flex-grow: 1;
    border: 0;
    resize: none;
    height: 3.5em;
    line-height: 3.5em;
}

#message-input::placeholder {
    color: #b2bbc6;
}

.message-container {
    margin-bottom: .5em;
    max-width: 90%;
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
}

.message {
    background-color: #3e7ce4;
    padding: .9em;
    border-radius: 1.4em 0 1.4em 1.4em;
    color: #fff;
    box-shadow: rgba(0, 0, 0, 0.03) 0px 2px 4px;
    word-wrap: break-word;
    max-width: 100%;
}

.message-container.agent {
    align-self: flex-start;
}

.message-container.agent .message {
    background-color: #fff;
    border-radius: 0 1.4em 1.4em 1.4em;
    color: #5a6976;
}

.message-container.system {
    align-self: center;
}

.message-container.system .message {
    border-radius: 0;
    color: #000;
    box-shadow: none;
    background-color: transparent;
}

.agent-avatar {
    width: 2.4em;
    height: auto;
    border-radius: 50%;
    display: block;
    margin-right: .5em;
}

#footer {
    display: flex;
    background-color: #fff;
    flex-shrink: 0;
    border-top: 1px solid #c9c9c9;
}

#send-button {
    background-color: #fff;
    color: #000000;
    font-size: 1em;
}

#offline-message {
    width: auto;
    height: auto;
    text-align: center;
    background-color: #fff;
    border-radius: .5em;
    padding: .5em;
    color: #5a6976;
    position: absolute;
    top: 4.5em;
    bottom: 0;
    left: 0;
    right: 0;
    box-shadow: rgba(0, 0, 0, 0.03) 0px 2px 4px;
    transition: all .2s ease-out;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

#queue-message {
    text-align: center;
    background-color: #fff;
    border-radius: .5em;
    padding: .5em;
    color: #5a6976;
    position: absolute;
    top: 4.5em;
    bottom: 5em;
    left: 1em;
    right: 1em;
    box-shadow: rgba(0, 0, 0, 0.03) 0px 2px 4px;
    transition: all .2s ease-out;
    z-index: 10;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
}

#queue-message.hide {
    opacity: 0;
    display: none;
}

.queue-icon {
    font-size: 3em;
}

#offline-message.hide {
    opacity: 0;
    display: none;
}

.offline-icon {
    font-size: 2em;
}

#connection-message {
    color: #fff;
    position: absolute;
    top: 0;
    transition: all .2s ease-out;
    text-align:center;
    right: 0;
    left: 0;
    font-size: .8em;
    background-image: linear-gradient(
            -45deg,
            rgba(255, 255, 255, .2) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, .2) 50%,
            rgba(255, 255, 255, .2) 75%,
            transparent 75%,
            transparent
    );
    background-size: 50px 50px;
    animation: progress-animation 2s linear infinite;
    background-color: #90CAF9;
}

#connection-message.hide {
    transform: translateY(-100%);
}

#connection-message.disconnected {
    background-color: #D50000;
}

#typing-indicator {
    position: absolute;
    bottom: 4em;
    z-index: 9;
    left: 0;
    right: 0;
    text-align: center;
    font-size: .8em;
    background-color: rgba(255, 255, 255, 0.7);
    padding: .5em;
}

#typing-indicator.hide {
    opacity: 0;
    display: none;
}

#agent-informations {
    width: 100%;
}
#agent-informations.hide {
    opacity: 0;
    display: none;
}

#agent-informations .operator-info {
    background-position: 100% 50%;
    background-repeat: no-repeat;
    height: 60px;
}

#agent-informations .avatar {
    border: none;
    padding: 0;
    border-radius: 0;
    display: block;
    float: left;
    margin-right: 15px;
    background-clip: padding-box;
    width: 58px;
    height: 58px;
    vertical-align: top;
}

#agent-informations .operator-name {
    color: #000;
    font-size: 16px;
    font-weight: 700;
    margin-top: 2px;
    overflow: hidden;
    display: block;
    max-width: 180px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#agent-informations .operator-role {
    color: #000;
    font-size: 12px;
    margin-top: .25em;
    display: block;
    max-width: 180px;
}

@media (max-width: 600px) {
    #livechat {
        bottom: 40px;
        left: 0;
        right: 0;
        width: 100%;
    }
}
