@keyframes upAndDown {
    0% { bottom: 1px; }
    16.66667% { bottom: 1px; }
    32.33333% { bottom: 1px; }
    50% { bottom: 4px; }
    66.66667% { bottom: 4px; }
    83.33333% { bottom: 4px; }
    100% { bottom: 1px; }
}

body { display: flex; margin: 0; padding: 0; font-family: Lato, sans-serif; height: 100%; background: #eeeef1; }
h3 { margin: 0; padding: 10px 0; }

.login-services { display: inline-block; border: 1px solid #e0e1e2; width: 250px; margin: auto; padding: 14px; background: #f5f5ff; text-align: center; }
.login-services h1 { font-family: Lato; }
.login-services a { display: block; margin: 5px 0; }
.login-services a > * { width: 185px; height: 40px; }

button, .button { border: 1px solid black; border-radius: 3px; background: rgb(250, 251, 253); cursor: pointer; font: 13.3333px Arial; margin: 0 8px 8px 0; padding: 4px 8px; text-align: center; }
.button-container { margin: 8px -8px 0 8px; padding: 0; }

.chat-context { display: inline-flex; flex-direction: column; max-height: 100%; width: 250px; overflow-x: hidden; overflow-y: auto; background-color: #4D394B; background-position: bottom; background-repeat: no-repeat; overflow: auto; }
.chatsystem-container { display: flex; flex-direction: column; flex: 1; overflow: hidden; padding: 0; }

.chan-search-wrapper { position: relative; margin: 1em 15px 0 25px; text-align: center; }
.chan-search-input { width: 100%; border-style: none; padding: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.chan-search-wrapper::before { display: inline-block; position: absolute; left: -25px; bottom: 0; width: 25px; height: 100%; content: " "; background: transparent; } /* FIXME icon */

.chat-context-menuButton { display: none; position: fixed; top: 0; right: 0; width: 62px; height: 62px; z-index: 500; cursor: pointer; }
.chat-context-menu a { display: block; padding: 1em 0 0 1.5em; color: #AB9BA9; text-transform: uppercase; text-decoration: none; }
.chat-context-menu a:last-child { padding-bottom: 1em; }
.chat-context-channellist { padding-left: 0; list-style: none; }
.chat-context-channellist > header { color: #AB9BA9; text-transform: uppercase; margin-top: 2em; padding-left: 1.5em; }
.chat-context-rooms { flex: 1; }
.chat-context-room { position: relative; color: #AB9BA9; }
.chat-context-room > a { display: block; padding: 3px 0 3px 1.5em; text-decoration: none; color: #AB9BA9; margin-right: 15px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; }
.chat-context-room.chat-ims { color: #4c9689; }
.chat-context-room.chat-ims.presence-away { color: #AB9BA9; font-style: italic; }
.chat-context-room > a:hover { background-color: rgba(10, 5, 10, .6); }
.chat-context-room.selected { color: #fff; }
.chat-context-room.selected > a { background-color: #4c9689; color: #fff; border-top-right-radius: 3px; border-bottom-right-radius: 3px; }
.chat-context-room::before { position: absolute; display: inline-block; top: 0; bottom: 0; margin: auto auto auto 7px; padding-top: 3px; font-weight: normal; }
.chat-context-room.chat-context-typing::before { display: none; }
.chat-context-room.chat-channel::before { content: "#"; }
.chat-context-room.chat-group::before { content: attr(data-count); font-size: 12px; height: 12px; line-height: 12px; padding: 2px; overflow: hidden; background: #AB9BA9; color: white; border-radius: 5px; }
.chat-context-room.chat-ims.selected::before { background-color: white; border-color: white; }
.presence-indicator::before { content: " "; display: inline-block; height: 6px; width: 6px; padding: 0; border: 2px solid currentColor; vertical-align: middle; background: currentColor; border-radius: 5px; }
.presence-indicator.presence-away::before { background: transparent; }

.chat-context .chat-context-roominfo { position: fixed; display: block; left: 235px; width: 400px; top: 0; bottom: 0; z-index: 100; background-color: #4D394B; color: white; overflow: auto; font-style: initial; }
.chatsystem-content .chat-context-roominfo { position: absolute; display: block; width: 400px; z-index: 100; background-color: #4D394B; color: white; overflow: auto; }
.roominfo-title { background-position: center center; background-size: cover; padding: 250px 0 0 0; font-size: 1.75em; }
.roominfo-title > h3 { padding: 0 15px; background: rgba(0, 0, 0, 0.5); }
.chat-context-roominfo a { color: white; }
.chat-context-roominfo .roominfo-userlist { padding: 0; list-style: none; }
.chat-context-roominfo .roominfo-userlist a, .chat-context-roominfo .presence-indicator { color: #4c9689; text-decoration: none; }
.chat-context-roominfo .roominfo-userlist .presence-away a, .chat-context-roominfo .presence-away { color: #AB9BA9; font-style: italic; }
.chat-context-roominfo .presence-indicator::before { margin-right: 5px; }
.roominfo-topic,.roominfo-purpose,.roominfo-phone,.roominfo-pincount,.roominfo-usercount,.roominfo-userlist { margin: 20px 15px 0 15px; }
.roominfo-topic *,.roominfo-purpose * { display: block; }
.roominfo-author, .chat-context-roominfo .chatmsg-author-name, .chat-context-roominfo .chatmsg-content a  { color: #c1c1c1; }
.roominfo-channel .roominfo-phone { display: none; }
.roominfo-user .roominfo-author, .roominfo-user .roominfo-usercount, .roominfo-user .roominfo-userlist { display: none; }
.roominfo-pinlist { list-style: none; }
.roominfo-pinlist-item:not(:first-child) { margin-top: 15px; }
.roominfo-pinlist-item { position: relative; }
.roominfo-pinlist-item .roominfo-unpin { position: absolute; top: 0; right: 0; height: 1.25em; width: 1.25em; background-image: url("pin.svg"); background-size: contain; background-repeat: no-repeat; background-position: center center; }

.chat-context .typing-container { position: absolute; left: 6.5px; display: none; }
.chat-context .chat-context-typing .typing-container { display: block; }

.hidden { display: none !important; }
.error { display: none; position: fixed; top: 0; left: 0; right: 0; height: 2em; line-height: 2em; background: #ffa2a2; padding: 0.5em 1em; }
.no-network .error { display: inline-block; }
.chatsystem-content { flex: 1; overflow: auto; }
.chatsystem-title { display: inline-block; padding: 14px 10px; font-size: 1.75em; font-style: italic; }
.chatsystem-header-star { background: center center no-repeat /100%; background-image: url("star_empty.png"); display: inline-block; height: 1em; width: 1em; }
.chatsystem-container.starred .chatsystem-header-star { background-image: url("star_full.png"); }
.chatsystem-container.no-room-selected { position: relative; visibility: hidden; }
.chatsystem-container.no-room-selected::after { position: absolute; top: 0; bottom: 0; left: 0; right: 0; background: #e0e0e0; content: " "; visibility: visible; }
.chatsystem-whoistyping { margin: 0; padding: 0 10px; height: 1.5em; line-height: 1.5em; background: #EAEAEA; }
.chatsystem-whoistyping > li { display: inline; }
.chatsystem-whoistyping .typing-container { margin: 0 5px; background: rgb(156, 156, 156); padding: 0 2px; border-radius: 2px; display: inline-block; height: 14px; line-height: 12px ;}
.chatsystem-whoistyping .typing-container::after { content: " "; height: 5px; width: 4px; display: inline-block; position: absolute; right: -7px; top: 0px; border-top: 7px solid rgb(156, 156, 156); border-right: 10px solid transparent; border-radius: 4px; }

.chatsystem-content a:visited,.chatsystem-content a:hover,.chatsystem-content a { color: #909090; }

.chatsystem-control { position: relative; display: inline-block; width: 100%; padding: 14px 0; }
.chatsystem-control > * { display: inline-block; }
.chat-context-room:not(.selected).unread, .chat-context-room:not(.selected).unread > a { font-weight: bold; color: white; }
.chat-context-room:not(.selected).unreadHi, .chat-context-room:not(.selected).unreadHi > a { font-weight: bold; color: #4c9689; }
.chatmsg-authorGroup { position: relative; }
.chatmsg-authorGroup .chatmsg-item .chatmsg-author-name { display: none; }
.chatmsg-authorGroup > .chatmsg-author { position: absolute; }
.chatmsg-authorGroup > .chatmsg-author * { vertical-align: top; }
.chatmsg-authorGroup > .chatmsg-author .chatmsg-author-img-wrapper { position: relative; display: inline-block; top: 0; }
.chatmsg-authorGroup > .chatmsg-author-messages { padding: 18px 0 0 36px; }
.chatmsg-authorGroup, .chatmsg-me_message { padding: 10px; }
.chatmsg-authorGroup .chatmsg-item { padding: 4px 10px; }
.chatmsg-authorGroup.chatmsg-first-daily,.chatmsg-me_message.chatmsg-first-daily { margin-top: 1em; }
.chatmsg-authorGroup.chatmsg-first-daily::before,.chatmsg-me_message.chatmsg-first-daily::before { position: absolute; top: -1em; width: calc(100% - 20px); content: attr(data-date); border-bottom: 1px solid rgb(156, 156, 156); }
.chatmsg-item { display: flex; position: relative; }
.chatmsg-item:hover { background: #F9F9F9; }
.chat-context-roominfo .chatmsg-item:hover { background: inherit; }
.chatmsg-item .chatmsg-unread { display: inline-block; position: absolute; right: 0; top: -1em; color: rgba(255,135,109,.5); background: white; padding: 0 5px 0 3px; font-style: italic; text-align: right; }
.chatmsg-item .chatmsg-unread::after { border-top: 2px solid rgba(255,135,109); display: inline-block; position: absolute; right: 0; left: -10px; bottom: -1px; content: " "; }
.chatmsg-content { display: inline-block; width: 100%; }
.chatmsg-content .chatmsg-msg, .chatmsg-content .chatmsg-msg *,
.chatmsg-content .chatmsg-attachments, .chatmsg-content .chatmsg-attachments * { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chatmsg-author { display: inline-block; }
.chatmsg-author-img-wrapper { height: 36px; width: 36px; margin-right: 10px; }
.chatmsg-author-img { max-height: 36px; max-width: 36px; border-radius: 3px; }
.chatsystem-content a.chatmsg-author-name, .chatmsg-author-name { text-decoration: none; display: inline; font-weight: bold; color: #000; }
.chatmsg-authorGroup .chatmsg-item .chatmsg-link-user, .chatsystem-content a.chatmsg-author-name, .chatmsg-author-name { padding: 0 4px; border-radius: 3px;}
.chatmsg-msg { display: block; vertical-align: top; }
.chatmsg-reactions:empty,.chatmsg-attachments:empty { display: none; }
.chatmsg-reactions { padding: 0 0 0 24px; margin: 5px 0; list-style: none; }
.chatmsg-attachments { padding: 0; }
.chatmsg-content > .chatmsg-edited, .chatmsg-ts, .chatmsg-attachment-footer * { font-size: 0.75em; font-style: italic; }
.chatmsg-item .chatmsg-edited { display: none; }
.chatmsg-item.edited .chatmsg-edited { display: block; }
.chatmsg-attachment-footer-icon { max-height: 1em; max-width: 1em; vertical-align: middle; }

.chatmsg-notice { background: rgba(255, 255, 0, 0.2); }
.chatmsg-content .chatmsg-notice { display: inline; font-style: italic; margin-right: 15px; }

.chatmsg-same-author:not(.chatmsg-me_message) { padding: 2px 10px; }
.chatmsg-same-author > .chatmsg-author-img-wrapper { display: none; }
.chatmsg-same-author > .chatmsg-content > .chatmsg-author-name { display: none; }
.chatmsg-same-author:not(.chatmsg-me_message) .chatmsg-content { margin-left: 46px; }
.chatmsg-same-ts .chatmsg-ts { display: none; }

.chatmsg-hover { display: none; position: absolute; top: -8px; right: 0; margin: 0; list-style: none; padding: 0; }
.chatmsg-hover > li { display: inline-block; width: 1.5em; height: 1.5em; background: white; border: 1px solid lightgrey; vertical-align: bottom; cursor: pointer; background-size: contain; background-repeat: no-repeat; background-position: center center; border-right: none; }
.chatmsg-hover > li > span { margin-top: 3.5px; margin-left: 3px; }
.chatmsg-hover > li:first-child { border-bottom-left-radius: 5px; }
.chatmsg-hover > li:last-child { border-top-right-radius: 5px; border-right: 1px; }
.chatsystem-content .chatmsg-item:hover .chatmsg-hover { display: block; }
.replyto-container { display: none; width: 100%; }
.replyingTo .replyto-container { display: inline-block; }
.replyingTo .chat-chat-content { height: calc(100vh - 13em); }
.replyto-container .replyto-close { position: absolute; display: inline-block; top: 15px; right: 0; height: 1.5em; width: 1.5em; text-align: center; cursor: pointer; z-index: 500; }

.chatmsg-item.chatmsg-me_message { font-style: italic; margin-right: 10px; }
.chatmsg-item.chatmsg-me_message .chatmsg-author-name { position: static; display: inline; }
.chatmsg-item.chatmsg-me_message .chatmsg-author-name::before { content: "* "; }
.chatmsg-item.chatmsg-me_message .chatmsg-msg { margin: 0 0 0 1em; display: inline; }
.chatmsg-item.chatmsg-me_message .chatmsg-author-img-wrapper { display: none; }
.chatmsg-item.chatmsg-me_message .chatmsg-ts { display: block; }

.chatmsg-item .bold { font-weight: bold; }
.chatmsg-item .italic { font-style: italic; }
.chatmsg-item .strike { text-decoration: line-through; }
.chatmsg-item .quote { border-left: 3px solid #e3e4e6; padding-left: 10px; }
.chatmsg-item .code, .chatmsg-item .codeblock { background: #005; color: white; border-radius: 3px; font-weight: normal; font-style: normal; font-family: 'Space mono', 'monospace'; text-decoration: none; padding: 0 5px; }
.chatmsg-item .code { padding: 0 5px; }
.chatmsg-item .codeblock { display: block; padding: 5px; }
.chatmsg-item .highlight { background: #005; color: white; border-radius: 3px; }

.chatmsg-attachments { list-style: none; }
.chatmsg-attachment .chatmsg-attachment-block .chatmsg-author * { display: inline-block; }
.chatmsg-attachment .chatmsg-author-img { max-height: 18px; max-width: 18px; vertical-align: middle; margin-right: 5px; }
.chatmsg-attachment-img { max-height: 200px; max-width: 400px; }
.chatmsg-attachment-block { border-left: 3px solid; padding-left: 10px; }
.chatmsg-attachment-block.has-thumb .chatmsg-attachment-content { display: flex; }
.chatmsg-attachment-block.has-thumb .chatmsg-attachment-text { flex: 1; margin-left: 14px; }
.chatmsg-attachment-block.has-thumb .chatmsg-attachment-thumb img { max-width: 150px; max-height: 150px; }
.chatmsg-attachment-footer > * + *::before { padding: 0 2px 0 5px; font-style: normal; content: "|"; }

.chatmsg-attachment-fields { max-width: 100%; padding: 0; margin: 0; list-style: none; }
.chatmsg-attachment-fields .field { display: inline-block; width: 50%; margin: 10px 0 0 0; }
.chatmsg-attachment-fields .field-long { width: 100%; }
.chatmsg-attachment-fields .field-title { font-weight: bold; }

.chatmsg-attachment-actions { list-style: none; color: #444547; }
.chatmsg-attachment-actions-item { display: inline-block; }

.chat-command-list:empty { display: none; }
.chat-command-list { position: absolute; top: 0; left: 0; right: 0; height: auto; list-style: none; margin: 10px 10px 0 10px; padding: 0; background: rgba(77, 57, 75, 0.9); color: #AB9BA9; max-height: 10em; overflow-x: hidden; overflow-y: auto; transform: translate(0, -100%); }
.chat-command-item { display: flex; margin: 2px 0; }
.chat-command-item > * { padding: 0 5px; }
.chat-command-name { font-weight: bold; }
.chat-command-usage { color: white; }
.chat-command-desc { flex: 1; font-style: italic; text-align: right; }
.chat-command-userIcon { display: inline-block; width: 20px; height: 20px; background-size: contain; background-position: center center; background-repeat: no-repeat; }

.attach-file-icon { height: 1.5em; vertical-align: bottom; }
.msgform { display: flex; margin: 0 10px; align-items: flex-end; }
.msgform-input { flex: 1; padding: 0.5em; font-family: Lato, sans-serif; resize: none; }
.msgform-action { margin: 0 0 0 10px; }
.msgform-action * { height: 1.5em; }
.msgform-oneline { height: 1.5em; width: 1.5em; margin-bottom: 0; background-size: 60%; background-repeat: no-repeat; background-position: center; }

.file-upload-container { position: fixed; z-index: 5000; background: rgba(55, 55, 55, 0.8); top: 0; bottom: 0; right: 0; left: 0; max-width: 100%; margin: auto; height: 200px; width: 500px; max-height: 100%; padding: 1.5em; border: 1px solid rgba(55, 55, 55, 1); border-radius: 10px; }
.file-upload-container > form { display: inline-block; background: white; height: 100%; width: 100%; }
.file-upload-container input { display: block; }
.file-upload-error { margin: 1em 0; padding: 0.5em 1.5em; background: #ffa2a2; }

.emoji { max-width: initial!important; }
.emoji-small { position: relative; display: inline-block; max-width: initial!important; width: 20px; height: 20px; vertical-align: middle; }
.emoji-small .emoji { transform: scale(0.3); position: absolute; left: -24px; top: -24px; }
.emoji-medium { position: relative; display: inline-block; max-width: initial!important; width: 30px; height: 30px; vertical-align: middle; }
.emoji-medium .emoji { transform: scale(0.5); position: absolute; left: -19px; top: -16px; }
.emoji-custom { text-indent: -9999em; image-rendering: optimizeQuality; font-size: inherit; max-width: initial!important; height: 64px; width: 64px; top: -3px; position: relative; display: inline-block; margin: 0 .15em; line-height: normal; vertical-align: middle; background-repeat: no-repeat; background-size: contain; }

.emojibar { position: fixed; display: flex; flex-direction: column; height: 300px; width: 300px; left: 0; right: 0; top: 0; bottom: 0; margin: auto; padding: 5px; overflow: hidden; background: #ddd; z-index: 1000; text-align: right; }
.emojibar-emojis { display: block; flex: 1; width: 100%; overflow: auto; text-align: left; }
.emojibar-header { height: 30px; display: block; text-align: center; }
.emojibar-header > img { max-width: 100%; max-height: 20px; }
.emojibar-list { list-style: none; padding: 0; margin: 0; }
.emojibar-list-item { display: inline-block; margin: 5px; cursor: pointer; }
.emojibar-detail { display: block; height: 40px; text-align: left; }
.emojibar-search { width: 300px; margin: 5px auto; }
.emojibar-overlay { position: fixed; top: 0; bottom: 0; left: 0; right: 0;  background: rgba(0, 0, 0, 0.2); }

.dialog-overlay { position: fixed; top: 0; bottom: 0; left: 0; right: 0;  background: rgba(0, 0, 0, 0.2); }
.dialog { position: fixed; display: inline-block; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1000; background: #ddd; text-align: left; border-radius: 3px; }
.dialog-title { padding: 0 0 0 16px; position: relative; background-color: #4D394B; font-weight: bold; color: white; }
.dialog-title-label { display: inline-block; margin: 8px 0; }
.dialog-title-close { display: inline-block; position: absolute; top: 0; bottom: 0; right: 8px; height: 19px; width: 19px; margin: auto; background: rgb(250, 251, 253); border-radius: 3px; cursor: pointer; color: #000103; text-align: center; line-height: 15px; }
.dialog-body { padding: 16px; }
.dialog-footer { text-align: right; padding: 0 16px 16px 0; }

.typing-container { position: relative; }
.typing-container > * { position: relative; bottom: 1px; font-size: 18px; animation-name: upAndDown; animation-duration: 3s; animation-iteration-count: infinite; }
.typing-container .typing-dot1 { animation-delay: 0; }
.typing-container .typing-dot2 { animation-delay: 0.5s; }
.typing-container .typing-dot3 { animation-delay: 1s; }

.OSM-wrapper { position: relative; }
.OSM-wrapper .OSM-controls { position: absolute; top: 10px; left: 5px; }
.OSM-wrapper .OSM-controls button { display: inline-block; height: 25px; width: 25px; padding: 0; margin: 0 5px; background: rgba(0, 0, 0, 0.3) no-repeat center /100% }
.OSM-wrapper .OSM-controls button.OSM-controls-zoomMin { background-image: url("zoomout.svg"); }
.OSM-wrapper .OSM-controls button.OSM-controls-zoomPlus { background-image: url("zoomin.svg"); }

.error-block { background: red; color: white; }
.full-width { display: block; width: 100%; }

.maci-wrapper { position: fixed; z-index: 5000; top: 50%; left: 50%; transform: translate(-50%, -50%); margin: auto; }
.maci-wrapper.fixed-width { border: 1px solid #e0e1e2; width: 100%; max-width: 500px; background: #f5f5ff; }
.maci-content { margin: 15px; }
.maci-content header { margin: 10px 0; }
.maci-content footer { text-align: right; }

.maci-setting { position: fixed; z-index: 4000; display: flex; flex-direction: column; top: 0; bottom: 0; left: 0; right: 0; max-width: 750px; max-height: 500px; margin: auto; background: #f5f5ff; border: 1px solid #e0e1e2; }
.settingHead { background: grey; padding: 0 8px; }
.settingBody { display: flex; margin: 8px; flex: 1; }
.settingNav { display: inline-block; width: 150px; }
.settingNav ul { padding: 0; list-style: none; }
.settingContent { display: inline-block; }
.settingContent > section { display: none; }
.settingContent > section > label { display: block; }
.settingFooter { display: inline-block; line-height: 42px; min-height: 42px; text-align: right; }
.maci-setting.display-services .settings-services { display: block; }
.maci-setting.display-display .settings-display { display: block; }
.maci-setting.display-privacy .settings-privacy { display: block; }

.settings-service-list-empty { display: none; }
.settings-service-list:empty +.settings-service-list-empty { display: block; }

