#msgDialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background-color: #00000016;
}
body#page_connectivityCenter:not(.isMobile) #msgDialog {
    background-color: unset;
    top: 113px;
    margin-top: -113px;
    pointer-events: none;
}

#msgDialog .dialogWindow {
    background-color: white;
    padding: 10px;
    border: 1px solid lightgrey;
}

#chatList {
    height: -webkit-fill-available;
    height: -moz-available;
    min-width: 380px;
    height: 720px;
    overflow-y: auto;
}

#chatListSearch {
    background-color: unset;
    height: 100%;
    padding: 0px 5px;
}

#chatList .chatGroupNameList {
    margin-top: 5px;
    font-weight: bold;
    font-size: 1.1em;
}

#chatList .chatListItem {
    height: 45px;
    padding: 0px 5px;
    margin-right: 5px;
    cursor: pointer;
}
#chatList .chatListItem:not(:first-child) {
    border-top: 1px solid grey;
}
body:not(.isMobile) #chatList .chatListItem:hover {
    background-color: #dddddd
}
#chatList .chatListItem.selected {
    background-color: #dddddd
}

#chatList .lastMsg {
    margin-bottom: 5px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    width: 300px;
}

#chatList .lastMsgDateTime {
    margin-top: 5px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    width: 65px;
    text-align: right;
}
#chatList .chatListItem.hasNewMsg .lastMsgDateTime {
    font-weight: bold;
}

#chatList .newMsgInChatIndicator {
    display: none;
    position: absolute;
    right: 0px;
    bottom: 5px;
    height: 16px;
    width: 16px;
}
#chatList .chatListItem.hasNewMsg .newMsgInChatIndicator {
    display: unset;
}

#chatMsgContainer {
    width: 700px;
    border-left: 1px solid grey;
    padding: 0px 5px;
}

.chatBubble {
    margin: 5px 10% 5px 0px;
}
.chatBubble .msgContainer {
    padding: 10px;
    background-color: #eeeeee;
    border-radius: 5px;
    white-space: pre-wrap;
}
.chatBubble .attachment {
    text-align: center;
}
.chatBubble .attachment .imgAttachment {
    object-fit: contain;
    max-width: 100%;
}
.chatBubble.self {
    margin: 5px 5px 5px 10%;
}
.chatBubble.self .msgContainer {
    background-color: #32b7ec44;
}

.msgMeta {
    margin: 3px 5px 5px 5px;
}

#chatHeader {
    border-bottom: 1px solid grey;
}

#backToChatistButton {
    height: 32px;
    width: 32px;
    padding-right: 15px;
    margin-right: 15px;
    border-right: 1px solid grey;
    display: none;
}

#chatGroupNameHeader {
    line-height: 32px;
    font-weight: bold;
    margin-left: 10px
}

#chatGroupInfo {
    width: 250px;
    border-right: 1px solid grey;
    margin: 5px 5px 70px 0px;
    padding-right: 5px;
}

.chatGroupParticipantsContainer {
    margin-top: 5px;
}

.chatGroupParticipants {
    margin-left: 5px;
}

.chatGroupParticipants>div {
    margin-top: 5px;
}

.chatGroupAdminIcon, .chatGroupNoAdminIcon {
    float: right;
    margin: 0px 5px;
}
#chatMsgContainer[isAdmin='true'] .chatGroupAdminIcon,
#chatMsgContainer[isAdmin='true'] .chatGroupNoAdminIcon {
    cursor: pointer;
}

.chatGroupCommentingAllowedIcon, .chatGroupCommentingDisallowedIcon {
    float: right;
}
#chatMsgContainer[isAdmin='true'] .chatGroupCommentingAllowedIcon,
#chatMsgContainer[isAdmin='true'] .chatGroupCommentingDisallowedIcon {
    cursor: pointer;
}

.removeParticipantIcon {
    margin-left: 5px;
    cursor: pointer;
    display: none;
}
#chatMsgContainer[isAdmin='true'] .removeParticipantIcon,
#chatMsgContainer[isAdmin='true'] .placeholderIcon,
#chatMsgContainer[isAdmin='true'] #addParticipantButton {
    display: unset;
}

#addParticipantButton {
    display: none;
}

.placeholderIcon {
    height: 16px;
    width: 16px;
    margin-left: 5px;
    display: none;
}

#filePreview {
    border-top: 1px solid grey;
    position: relative;
}

#previewImage {
    max-height: 90%;
    max-width: 90%;
    object-fit: contain;
}

#chatContent {
    height: 650px;
    overflow-y: auto;
    margin: 2px 0px;
}
#chatContent.previewOpen {
    height: 300px;
}

.chatBubble:not(.self) .msgSender {
    border-right: 1px solid grey;
    padding-right: 5px;
    margin-right: 5px;
}

#chatTextarea, #chatTextareaDummy {
    height: 60px;
    resize: none;
    margin-right: 5px;
}
#chatTextareaDummy {
    border: 1px solid #767676;
    outline: none;
    line-height: 60px;
    text-align: center;
}
#chatMsgContainer[commentingAllowed='false'] #emoji-button,
#chatMsgContainer[commentingAllowed='false'] #chatTextarea,
#chatMsgContainer[commentingAllowed='false'] #sendChatMsgButton,
#chatMsgContainer[commentingAllowed='true'] #chatTextareaDummy {
    display: none;
}

#newChatSelection tr {
    vertical-align: top;
}

/*#newChatSelection tr:not(.hidden):nth-child(2n) {*/
#newChatSelection tr.oddRow {
    background-color: #dddddd;
}

#newChatSelection tr.selected {
    background-color: #32b7ec66;
}

#newChatSelection td {
    padding: 5px;
}

#newChatSelection .classDisplay,
#newChatSelection .courseDisplay {
    white-space: pre-wrap;
}

.newChatFilterDisplay {
    width: 250px;
    border: 1px solid grey;
    white-space: pre-wrap;
    max-height: 100px;
    min-height: 1.5em;
    float: left;
    overflow-y: auto;
    padding: 3px;
    margin: 5px 10px;
}

.allowCommentButton,
.disallowCommentButton {
    float: right;
    cursor: pointer;
}

.loadingMoreMsgsIndicator {
    text-align: center;
}

#customPupilChatImageClone {
    max-height: 150px;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 5px;
}

#chatContentContainer {
    width: -webkit-fill-available;
    width: -moz-available;
}


/* --------------------------- Mobile Start --------------------------------------------- */


body.isMobile #fullMenu {
    overflow-y: scroll;
    max-height: 97vh;
}

body.isMobile #msgDialog {
    margin-top: 80px;
    width: 100vw;
    height: calc(100% - 80px);
}

body.isMobile #msgDialog .dialogWindow {
    max-height: unset !important;
    width: 100vw;
    height: 100%;
    padding: 0px;
    border: 0px;
}

body.isMobile #msgDialog .dialogWindow .dialogHeader:not(.dialogScrollable) {
    display: none;
}

body.isMobile #msgDialog .dialogWindow .dialogScrollable,
body.isMobile #mailboxDialogContent,
body.isMobile #format_001,
body.isMobile #chatList,
body.isMobile #chatContent {
    height: 100%;
}

body.isMobile #chatListContainer,
body.isMobile #format_003,
body.isMobile #chatMsgContainer,
body.isMobile #msgNewChatDialog .dialogWindow,
body.isMobile #newChatFilterDialog .dialogWindow {
    width: 100vw;
}

body.isMobile #format_007 {
    width: 100%;
}

body.isMobile #msgNewChatDialog .newChatFilterDisplay {
    margin: 10px 10px;
    line-height: 2.2em;
}

body.isMobile #newChatSelection td {
    padding: 12px 5px;
}

body.isMobile #chatMsgContainer {
    border-left: 0px;
}

body.isMobile #chatList .chatListItem {
    margin-right: unset;
}

body.isMobile #chatMsgContainer {
    padding-bottom: 5px;
}

body.isMobile #format_004 {
    height: calc(100% - 39px);
}

body.isMobile #format_005 {
    height: calc(100% - 67px);
}

body.isMobile #format_006 {
    margin-right: 10px;
}

body.isMobile #backToChatistButton {
    display: block;
}

body.isMobile #chatContentContainer {
    width: 99vw; /* Because we don't see the scroll bar with 100vw' */
}

body.isMobile #chatGroupInfo {
    width: 0vw;
    margin-top: 15px;
    border-right: 0px;
}

body.isMobile .chatGroupParticipantsContainer,
body.isMobile .chatGroupParticipants>div {
    margin-top: 15px;
}

body.isMobile #addParticipantButton,
body.isMobile .chatGroupAdminIcon,
body.isMobile .chatGroupNoAdminIcon,
body.isMobile .chatGroupCommentingAllowedIcon,
body.isMobile .chatGroupCommentingDisallowedIcon,
body.isMobile .removeParticipantIcon,
body.isMobile .placeholderIcon {
    margin-right: 20px;
}


/* --------------------------- Mobile End ----------------------------------------------- */
