/* Button used to open the chat form - fixed at the bottom of the page */
.open-button {
    background-color: var(--main-color);
    color: white;
    border: none;
    cursor: pointer;
}

/* The popup chat - hidden by default */
.chat-popup {
    height: calc(100% - 45px);
    width: 60%;
    position: absolute;
    bottom: 45px;
    border: 1px solid #f1f1f1;
    z-index: 9;
    transition: left 0.17s, top 0.15s, transform 0.13s;
    transition-timing-function: linear;
}

.chat-popup-visible {
    left: 0;
    top: 0;
    transform: scale(1, 1) skew(0deg, 0deg);
}

.chat-popup-hidden {
    left: -100%;
    top: -100%;
    transform: scale(0.3, 0.3) skew(10deg, 10deg);
}

/* Add styles to the form chat-container */
.chat-container {
    height: 100%;
    background-color: white;
    margin:auto;
}

.inbox_msg {
    height: 100%;
    border: 1px solid #c4c4c4;
    clear: both;
    overflow: hidden;
}

.chat-container img {
    max-width:100%;
}

.inbox_people {
    height: 100%;
    background: #f8f8f8 none repeat scroll 0 0;
    float: left;
    overflow: hidden;
    width: 35%;
    border-right: 1px solid #c4c4c4;
}

.top_spac {
    margin: 20px 0 0;
}

.recent_heading {
    float: left;
    width:40%;
}

.srch_bar {
    display: inline-block;
    text-align: center;
}

.srch-add-btn > span {
    font-size: 185%;
}

.headind_left {
    height: 10%;
    padding:10px 29px 10px 20px;
    overflow:hidden;
    border-bottom:1px solid #c4c4c4;
    display: flex;
    justify-content: center;
    align-items: center;
}

.recent_heading h4 {
    color: #05728f;
    font-size: 21px;
    margin: auto;
}

.srch_bar input{
    border: 1px solid #cdcdcd;
    border-width: 0 0 1px 0;
    margin: 0;
    width: 80%;
    padding: 2px 0 4px 6px;
    background: none;
}

.srch_bar .input-group-addon button {
    background: rgba(0, 0, 0, 0) none repeat scroll 0 0;
    border: medium none;
    padding: 0;
    color: #707070;
    font-size: 18px;
}
.srch_bar .input-group-addon { margin: 0 0 0 -27px;}

.chat_ib {
    float: left;
    padding: 0 0 0 15px;
    width: 87%;
}

.chat_ib h5 {
    font-size: 15px;
    color: #464646;
    margin: 0 0 5px 0;
    line-height:normal;
}
.chat_ib span {
    font-size:13px;
}
.chat_people p {
    font-size: 14px;
    color: inherit;
    margin: auto;
}

.chat_img {
    float: left;
    width: 13%;
}

.chat_people{
    overflow: hidden;
    clear: both;
}

.chat_list {
    border-bottom: 1px solid #c4c4c4;
    margin: 0;
    padding: 18px 16px 10px;
    background-color: inherit;
}

.inbox_chat {
    height: 90%;
    overflow-y: scroll;
}

.active_chat{
    background: #ebebeb;
}

.incoming_msg_img {
    display: inline-block;
    width: 6%;
}

.received_msg {
    display: inline-block;
    padding: 0;
    vertical-align: top;
    width: 100%;
}

.received_width_msg {
    width: 57%;
}

.chat-message p {
    border-radius: 3px;
    font-size: 14px;
    margin: 0;
    padding: 5px 10px 5px 12px;
    width: 100%;
    word-break: break-word;
}

.received_width_msg p {
    background: #ebebeb none repeat scroll 0 0;
    color: #646464;
}

.sent_msg {
    float: right;
    width: 46%;
}

.sent_msg p {
    background: var(--main-color) none repeat scroll 0 0;
    color:#fff;
}

.time_date {
    color: #747474;
    display: block;
    font-size: 12px;
    margin: 3px 0 5px 0;
}

.mesgs {
    height: 100%;
    float: left;
    padding: 10px 15px 0 25px;
    width: 65%;
}

.outgoing_msg{
    overflow: hidden;
    margin: 20px 0;
}

.msg_history {
    height: 88%;
    overflow-y: auto;
}

/* INPUT */
.type_msg {
    display: flex;
    align-items: center;
    height: 12%;
    border-top: 1px solid #c4c4c4;
    position: relative;
}

.type_msg input {
    background: rgba(0, 0, 0, 0) none repeat scroll 0 0;
    border: medium none;
    color: #4c4c4c;
    font-size: 15px;
    min-height: 48px;
    width: 100%;
    margin: 0;
}

.msg_send_btn {
    background: var(--main-color) none repeat scroll 0 0;
    border: medium none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    height: 33px;
    position: absolute;
    right: 0;
    width: 33px;
}

.avatar {
    height: 50px;
    width: 50px;
    border-radius: 50%;
}

.msg_send_btn > span {
    font-size: 110%;
}

/* FIN INPUT */

.router-link-active {
    background-color: var(--main-color) !important;
    color: white !important;
}

.filename {
    display: inline-block;
    padding: 0 10px;
    background-color: var(--main-color);
    border: 1px solid black;
    color: #fff;
    border-radius: 15px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    font-weight: 700;
    font-size: 12px;
    font-family: 'verdana', sans-serif;
}

.user-img {
    height: 50px;
    width: 50px;
    border-radius: 50%;
}

.chat-username {
    height: 10%;
    background-color: #1c1b1b;
    color: var(--main-color) !important;
}

.chat-messages {
    height: 70%;
    background-color: #333232
}

.chat-textbox {
    height: 20%;
    background-color: #1c1b1b
}

.chat-userlist {
    display: none;
}

.chat-chatbox .fa-paperclip{
    cursor: pointer;
}

.veil{
    position: absolute;
    height: 100%;
    width: 100%;
    background-color: gray;
    transition: opacity 0.1s;
}

.veil.active{
    opacity: 0.6;
    z-index: 1;
}

.file-preview{
    height: 0;
    width: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 1s, height 1s;
    z-index: 2;
}

.file-preview > div{
    background-color: #141414;
}

.file-preview > div:nth-child(2){
    display: flex;
    flex-direction: column;
    align-items: center;
    border-top: 1px solid white;
}

.opacity-1{
    opacity: 1;
}

.chat-active{
    background-color: var(--main-color);
}

.chat-textbox input::placeholder{
    color: white;
}

.deleteMessageButton{
    cursor: pointer;
    width: 5%;
}

.deleteMessageButton + p, .deleteMessageButton + img{
    width: 95%;
}

.deleteMessageButton + img{
    cursor: pointer;
}

.file-buttons{
    display: flex;
    justify-content: space-around;
}

@media (min-width: 768px) {
    .chat-userlist {
        display: block;
    }
}

@media (min-width: 1180px) {
    .chat_ib {
        display: flex;
        justify-content: space-between;
    }
    .chat_ib h5 {margin:0;}
}

@media (max-width: 576px) {
    .chat-popup {
        width: 99%;
    }

    .inbox_people {
        width: 40%;
    }
    .mesgs {
        width: 60%;
        padding: 10px 10px 0 10px;
    }

    .headind_left {
        padding: 5px;
    }

    .srch-add-btn {
        padding: 0;
    }
    .sent_msg {
        width: 80%;
    }
    .received_width_msg {
        width: 80%;
    }
}

@media (max-width: 768px) {
    .open-button {
        position: absolute;
        bottom: 0;
        left: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 30px;
        height: 30px;
        border-radius: 50%;
    }

    .chat-popup {
        height: 85%;
        width: 80%;
        transition: height 0.2s, width 0.2s, transform 0.15s;
        transition-timing-function: ease-in-out;
    }

    .chat-popup-cell-visible {
        height: 85% !important;
        width: initial;
        transform: initial;
    }

    .chat-popup-cell-hidden {
        height: 0 !important;
        width: 0 !important;
        transform: translate(15px, 30px);
        z-index: -1;
    }
}

@media (max-width: 768px) and (orientation: portrait) {
    .type_msg {height: 9%;}
    .msg_history {height: 91%;}
    .headind_left {height: 11%;}
    .inbox_chat {height: 89%;}
}

@media(max-width: 1024px) {
    .chat-popup {
        width: 65%;
    }
}

@media (max-width: 1110px) {
    .msg_send_btn {
        width: 29px;
        height: 29px;
    }
}

@media (max-width: 1280px) and (orientation: landscape) {
    .type_msg {height: 14%;}
    .msg_history {height: 86%;}
}

@media (max-width: 1330px) {
    .headind_left {
        height: 13%;
    }
}