/* retrocompatibility CHAT *****************************************/
.chatbox {
    position: fixed;
    width: 96%;
    bottom: 0px;
    padding: 2%;
    color: #FFF;
    background: #606060;
}

.chatbox i {
    font-size: 40px;
    padding-right: 10px;
    line-height: 20px;
}

.chattextarea {
    border: 0;
    resize: none;
    background: none;
    width: 80%;
    color: #FFF;
    line-height: 20px;
    height: 20px;
}

.chat .me,
.chat .somebody {
    width: 80%;
    float: right;
    margin: 2%;
}
.chat p {
    padding: 3%;
    background: #FFF;
    color: #5AAEFC;
    border-radius: 5px;
    margin-top: 5%;
    margin-left: 5%;
    margin-right: 5%;
}
.chat .somebody p {
    background: #5AAEFC;
    color: #FFF;
}

.chat .somebody {
    float: left;
}

#topbar-directchat {
    height: 50px;
    position:relative;
}

.innermedirectchat>p {
    background: #5AAEFC;
    color: #FFF;
    max-width: 80%;
    margin-left: auto;
    border-radius: 32px;
    margin-right: 2px;
    margin-top: 3px;
    margin-bottom: 3px;
    padding: 8px 16px;
    border-bottom-right-radius: 0;
    width: max-content;
}

.innersomebodydirectchat>p {
    background: #FFF;
    border: 1px solid #EEE;
    color: black;
    max-width: 70%;
    margin-right: auto;
    border-radius: 32px;
    margin-left: 2px;
    margin-top: 3px;
    margin-bottom: 3px;
    padding: 8px 16px;
    border-bottom-left-radius: 0;
    width: max-content;
}

.somebodydirectchat {
    text-align: left;
}

.innersomebodydirectchat {
    display: flex;
    align-items: flex-end;
    display: -webkit-box;
    -webkit-box-align: end;
    text-align: left;
}

.innermedirectchat {
    text-align: right;
}

.innermedirectchat audio {
    margin-top: 5px;
}

.innersomebodydirectchat audio {
    margin-top: 5px;
}

span.dateHeureMessageLabel {
    margin-left: 60px;
    font-size: 13px;
    color: #666;
    text-align: left;
}

.dateHeureGroupeLabel {
    margin: 20px 0px 10px 0px;
    font-size: 14px;
    color: #333;
}

.medirectchat {
    text-align: right;
    margin-right: 10px;
}

.innersomebodydirectchat p,
.innermedirectchat p {
    text-align: left;
    word-break: break-all;
}

.medirectchat p {
    border: solid 1px #4b94d8;
}

.somebodydirectchat audio,
.medirectchat audio {
    background: #5aaefc;
    border-radius: 32px;
    max-width: 80%;
}

.imgmedirectchat {
    margin-left: auto;
    border-radius: 5px;
    height: 35vh;
    max-width: 75%;
    min-width: 15%;
    margin-top: 5px;
    margin-right: 2px;
    background-color: #ccc;
    object-fit: cover;
}

.imgsomebodydirectchat {
    margin-right: auto;
    border-radius: 5px;
    height: 35vh;
    max-width: 75%;
    min-width: 15%;
    margin-top: 5px;
    margin-left: 2px;
    background-color: #ccc;
    object-fit: cover;
}

.somebodydirectchat+.somebodydirectchat>.innersomebodydirectchat>img.directchatuserphoto {
    visibility: hidden;
}

.somebodydirectchat img.directchatuserphoto {
    margin: 0 10px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    margin-bottom: -15px;
}

:not(.somebodydirectchat)+.somebodydirectchat {
    margin-bottom: 20px;
}

:not(.medirectchat)+.medirectchat {
    margin-bottom: 20px;
}

.directchatlist>div:first-child {
    margin-bottom: 20px;
}

.directchatlist {
    flex: 1;
    height: calc(100vh - 110px);
    overflow: auto;
    display: flex;
    flex-direction: column-reverse;
    overflow-x: hidden;
}

.menuPJ {
    position: absolute;
    bottom: 0;
    overflow: hidden;
    height: 0;
    transition: height 0.5s ease;
}

.list-btns-directchat {
    background: #FFF;
    border-radius: 15px 15px 0 0;
    width: max-content;
    border: 1px;
}

.btn-directchat {
    font-size: 35px;
    width: 60px;
    line-height: 60px;
    text-align: center;
    display: inline-block;
    vertical-align: text-top;
}

.btnEmoji {
    color: #ffa726;
}

#btnPhoto {
    color: #00c853;
}

#btnAudio {
    color: #eb4962;
}

.emojis-directchat {
    display: block;
}

#list-emojis-directchat {
    text-align: center;
    padding: 10px;
    background: #FFF;
    border-radius: 0 15px 0 0;
}

#sendbox-directchat {
    width: 100%;
    height: 60px;
    text-align: left;
    background: #FFF;
    display: flex;
    z-index: 150;
    position: absolute;
    bottom: 0;
}

.btn-sendbox-directchat {
    display: block;
    margin: auto 10px auto 10px;
    color: #5aaefc;
    text-align: right;
    font-size: 9px;
    display: flex;
    flex-direction: column;
}

a.btn-sendbox-directchat>i {
    font-size: 30px;
}

.text-editable-directchat {
    border: 1px solid orange;
    border-radius: 4px;
    line-height: 20px;
    min-height: 30px;
    max-height: 58px;
    overflow-y: auto;
    padding: 0px 5px 0px 5px;
    margin: auto;
    width: 80%;
    text-align: left;
}

.text-editable-directchat>* {
    text-align: left;
}

.emojis img {
    margin: 2%;
    width: 48px;
    height: 48px;
}

.emoji {
    height: 64px;
}

/* Wonderful new chat by Matthew */

@keyframes rotate {
    from {
        transform: rotate(0);
    }
    to {
        transform: rotate(360deg);
    }
}

.btn-sendbox-directchat.btn-directchat-send .icon.loading-icon {
    animation: 750ms linear infinite rotate;
}

.btn-sendbox-directchat.btn-directchat-send .icon {
    font-size: 30px;
}

.btn-sendbox-directchat.btn-directchat-menu-toggle {
    color: #75d721;
    transition: all 0.5s ease;
}

.btn-sendbox-directchat.btn-directchat-menu-toggle>i {
    font-size: 38px;
}

.btn-sendbox-directchat.btn-directchat-menu-toggle.active {
    transform: rotate(225deg);
    color: #999;
}

.innersomebodydirectchat p {
    background: #FFF;
    border: 1px solid #EEE;
    color: black;
    margin-right: auto;
    border-radius: 32px;
    margin-left: 2px;
    margin-top: 3px;
    margin-bottom: 3px;
    padding: 8px 16px;
    border-bottom-left-radius: 0;
    width: fit-content;
}

.innersomebodydirectchat p.chatemoji,
.innermedirectchat p.chatemoji {
    border-color: transparent;
    background-color: #0000000a;
}

.chat-buttons {
    overflow: hidden;
    height: 0;
    transition: height 0.5s ease;
}

.chat-buttons.active {
    height: 220px;
}

.chat-buttons:not([data-display="btns"])>.btns-directchat {
    display: none;
}

.chat-buttons:not([data-display="emojis"])>.emojis-directchat {
    display: none;
}

.inline-emoji {
    width: 20px;
    vertical-align: text-bottom;
}

.btns-directchat {
    display: grid;
    grid-template-columns: repeat(3, 33.33%);
    align-items: center;
    height: 220px;
    background-color: #f9fafa;
    border-top: 1px solid #eceded;
}

.btns-directchat>* {
    padding: 10px;
}

.emojis-directchat {
    height: 220px;
    overflow: hidden auto;
}

.new-btn-directchat {
    margin: 5px;
    font-size: 30px;
    width: 50px;
    line-height: 50px;
    text-align: center;
    display: inline-block;
    vertical-align: text-top;
    background-color: white;
    border: 1px solid #5aaefc;
    border-radius: 50%;
    color: #5aaefc;
}

.btn-directchat-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
    font-weight: 300;
}

.btn-sendbox-directchat.btn-directchat-menu-toggle {
    color: #75d721;
    font-size: 38px;
    transition: all 0.5s ease;
}

.btn-sendbox-directchat.btn-directchat-menu-toggle.active {
    transform: rotate(225deg);
    color: #999;
}

.btn-sendbox-directchat.btn-directchat-send {
    color: #5aaefc;
    font-size: 9px;
    display: flex;
    flex-direction: column;
}

.btn-sendbox-directchat.btn-directchat-send .icon {
    font-size: 30px;
}

.sendbox-directchat {
    width: 100%;
    height: 60px;
    text-align: left;
    border-top: 1px solid #eceded;
    display: flex;
    align-items: center;
    z-index: 150;
}

.emojis-list {
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(8, 12.5%);
    background-color: #f9fafa;
    border-top: 1px solid #eceded;
}

.emojis-list>* {
    margin: 5px;
}

.emojis-list>*>img {
    width: 100%;
    height: auto;
    vertical-align: middle;
}

.directchat-thumbnail {
    margin: 10px;
    padding-right: 5px;
    display: grid;
    grid-template-columns: 64px auto 24px;
    align-items: center;
    color: initial;
    background-color: #f7f7f7;
    border-radius: 4px;
}

.directchat-thumbnail>img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
}

.directchat-thumbnail>:nth-child(2) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.directchat-thumbnail>:nth-child(3) {
    width: 22px;
    height: 22px;
    text-align: center;
    font-size: 22px;
    line-height: 22px;
    color: #f00;
    background-color: #fff;
    border: 1px solid #f00;
    border-radius: 50%;
}
