﻿.chatbox {
    position: fixed;
    bottom: 0;
    right: 30px;
    max-width: 400px;
    max-height: 400px;
    background-color: #fff;
    /*font-family: 'Lato', sans-serif;*/
    -webkit-transition: all 600ms cubic-bezier(0.19, 1, 0.22, 1);
    transition: all 600ms cubic-bezier(0.19, 1, 0.22, 1);
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
}

    /*.chatbox--tray {
    bottom: -350px;
}*/

    /*.chatbox--closed {
    bottom: -400px;
}*/

    .chatbox .form-control:focus {
        border-color: #1f2836;
    }

.chatbox-title,
.chatbox-body {
    border-bottom: none;
    display: none;
}

.chatbox-send-message {
    display: none;
}

.chatbox-title {
    min-height: 50px;
    padding-right: 10px;
    background-color: #1f2836;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    cursor: pointer;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
}

    .chatbox-title h5 {
        height: 50px;
        margin: 0 0 0 15px;
        line-height: 50px;
        position: relative;
        padding-left: 20px;
        -webkit-flex-grow: 1;
        flex-grow: 1;
    }

    .chatbox-title button {
        height: 50px;
        margin: 0 0 0 15px;
        line-height: 50px;
        position: relative;
        padding-left: 20px;
        -webkit-flex-grow: 1;
        flex-grow: 1;
        background-color: inherit;
        border: none !important;
    }



    .chatbox-title h5 a {
        color: #fff;
        max-width: 195px;
        display: inline-block;
        text-decoration: none;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .chatbox-title h5:before {
        content: '';
        display: block;
        position: absolute;
        top: 50%;
        left: 0;
        width: 12px;
        height: 12px;
        background: #4CAF50;
        border-radius: 6px;
        -webkit-transform: translateY(-50%);
        transform: translateY(-50%);
    }
    .chatbox-title button:before {
        content: '';
        display: block;
        position: absolute;
        top: 50%;
        left: 0;
        width: 12px;
        height: 12px;
        background: #4CAF50;
        border-radius: 6px;
        -webkit-transform: translateY(-50%);
        transform: translateY(-50%);
    }


.chatbox-title-tray,
.chatbox-title-close {
    width: 24px;
    height: 24px;
    outline: 0;
    border: none;
    background-color: transparent;
    opacity: 0.5;
    cursor: pointer;
    -webkit-transition: opacity 200ms;
    transition: opacity 200ms;
}

    .chatbox-title-tray:hover,
    .chatbox-title-close:hover {
        opacity: 1;
    }

    .chatbox-title-tray span {
        width: 12px;
        height: 12px;
        display: inline-block;
        border-bottom: 2px solid #fff
    }

    .chatbox-title-close svg {
        vertical-align: middle;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 1.2px;
    }

.chatbox-body,
.chatbox-credentials {
    padding: 15px;
    border-top: 0;
    background-color: #f5f5f5;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    -webkit-flex-grow: 1;
    flex-grow: 1;
}

.chatbox-credentials {
    display: none;
}

    .chatbox-credentials .form-control {
        -webkit-box-shadow: none;
        box-shadow: none;
    }

.chatbox-body {
    overflow-y: auto;
}

.chatbox-body-message {
    position: relative;
}

    .chatbox-body-message p {
        padding: 15px;
        border-radius: 4px;
        font-size: 14px;
        max-width: 80%;
        background-color: #fff;
        -webkit-box-shadow: 1px 1px rgba(100, 100, 100, 0.1);
        box-shadow: 1px 1px rgba(100, 100, 100, 0.1);
    }

    .chatbox-body-message img {
        width: 40px;
        height: 40px;
        border-radius: 4px;
        border: 2px solid #fcfcfc;
        /*position: absolute;*/
        top: 15px;
    }

.chatbox-body-message-left {
    display: flex;
    flex-direction: row;
}



.chatbox-body-message-right {
    display: flex;
    flex-direction: row-reverse;
}


.chatbox-message {
    padding: 15px;
    min-height: 50px;
    outline: 0;
    resize: none;
    border: none;
    font-size: 12px;
    border: 1px solid #ddd;
    border-bottom: none;
    background-color: #fefefe;
    width: 80%;
}

.chatbox-empty {
    height: 262px;
}

    .chatbox-empty.chatbox-tray {
        bottom: -212px;
    }

    .chatbox-empty.chatbox-closed {
        bottom: -262px;
    }

    .chatbox-empty .chatbox-body,
    .chatbox-empty .chatbox-message {
        display: none;
    }

    .chatbox-empty .chatbox-credentials {
        display: block;
    }
