@use "../../../010-settings/" as *;
@use "../../../030-tools/_tool_browser-prefixes" as *;

/* Modules/Chatroom */

.ilValignBottom {
	vertical-align: bottom;
}

#chat_actions {
	white-space: nowrap;
	margin-left: 10px;
}

#chat_messages {
	height: 300px;
	padding: 2px 2px 0 2px;
	overflow-y: scroll;
	overflow-x: hidden;
	overflow-wrap: break-word;
	word-wrap: break-word;
	-ms-word-break: break-all;
	word-break: break-all;
	word-break: break-word;
	-ms-hyphens: auto;
	-moz-hyphens: auto;
	-webkit-hyphens: auto;
	hyphens: auto;
	width: 100%;
	position: relative;

	.messageContainer {
		min-height: 250px;
	}

	.fader {
		position: -webkit-sticky;
		position: sticky;
		bottom: 0;
		width: 100%;
		height: 50px;
		background: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0)), to(#fff));
		background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #fff 100%);

		.typing-info {
			font-size: .6em;
			position: absolute;
			bottom: 0;
			padding: 2px 5px;
			text-align: left;
			width: 100%;
		}
	}
}

.chatroom-centered-checkboxes {
	label {
		margin: 0 5px 0 0;
	}
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 5px;
}

@media only screen and (max-width: $il-grid-float-breakpoint-max) {
	#message-controls .msg-control {
		display: block;
	}
}

#chat_users {
	overflow: visible;
	height: 100%;
        background-color: white;
}

#private_rooms {
	z-index: 200;
	display: none;
}

td.chatroom {
	width: 200px;
	height: auto;
}

.chat-autocomplete-container {
    position: relative;
}

.chat-autocomplete-container .alert {
    margin-top: 5px;
}

.chat-autocomplete {
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow: hidden auto;
    padding: 0;
    margin: 0;
    border: 1px solid gray;
}

.chat-autocomplete li {
    list-style: none;
}

.chat-autocomplete button {
    background-color: white;
    text-align: left;
    width: 100%;
    padding: 0;
    margin: 0;
    border: none;
}

.chat-autocomplete button.load-more {
    font-weight: bold;
}

.chat-autocomplete button:hover,
.chat-autocomplete button:focus {
    background-color: #e2e8ef;
    padding: 0;
    margin: 0;
    outline: none;
    border: none;
    box-shadow: none;

}

#chat_users .dropdown ul.dropdown-menu {
    position: absolute;
    left: unset;
    right: 0;
}

.ilChatroomUser img {
    border-radius: 50%;
}

.ilChatroomUser {
	border-bottom: 1px solid #e9e9e9;

	.media-body {
		white-space: nowrap;
	}

	.media-body {
		padding-top: 8px;
	}

        .media-object {
            border-radius: 50%;
        }

	.media-body h4, .media-body p {
		color: $il-text-light-color;
		font-size: $il-font-size-small;
		padding: 5px 3px 0 3px;
		line-height: 1em;
		margin: 0;
	}

	.media-body h4 {
		padding-top: 0;
		color: $il-text-light-color;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

        .ilChatroomDropdown {
            position: relative;

            .dropdown-menu {
                position: absolute;
            }
        }

	.dropdown-menu a {
		color: $il-text-color;
	}

	.dropdown-menu a:hover {
		color: $il-text-hover-color;
	}

	.arrow-down {
		width: 0;
		height: 0;
		border-left: 11px solid transparent;
		border-right: 11px solid transparent;
		border-top: 11px solid white;
		margin-top: -10px;
		margin-left: 100px;
	}

	.media:hover {
		background-color: $il-highlight-bg;
	}

	.dropdown-menu > li > button.btn {
	    padding-left: 10px;
	}

	.dropdown-backdrop {
		position: static;
	}

	.media {
		overflow: visible;
		padding: 0;
	}

	.media-left img {
		width: 30px;
		height: 30px;
	}

	.media-body, .media-left, .media-right {
		display: table-cell;
		vertical-align: top;
	}

	.media-left {
		padding-right: 10px;
	}

	.media {
		padding: 10px;
	}
}

.messageContainer .separator {
    text-align: center;
    background-color: #f9f9f9;
}

.hide-system-messages .messageContainer .separator.system-message {
    display: none;
}

.messageContainer .separator p {
    font-size: 0.75rem;
    padding-top: 8px;
    padding-bottom: 8px;
}

.messageContainer img {
    border-radius: 50%;
    width: 30px;
    height: 30px;
}

.messageContainer .message-body {
    display: flex;
    align-items: center;
}

.messageContainer .message-body > p {
    margin: 0 5px;
}

.messageContainer .message-body > .time-info {
    color: white;
    transition: color 0.5s;
    font-size: smaller;
}

.messageContainer .message-body > .time-info:hover {
    color: black;
}

.messageContainer .message-body > p {
    white-space: preserve;
}

.messageContainer .messageLine,
.messageContainer .messageLine .message-header {
    display: flex;
    margin-bottom: 5px;
}

.messageContainer .messageLine {
    flex-direction: column;
}

.messageContainer .messageLine.myself .message-header,
.messageContainer .messageLine.myself .message-body {
    flex-direction: row-reverse;
    text-align: right;
}

.messageContainer .messageLine .user {
    margin: 0 5px;
    font-size: 0.625rem;
    font-weight: 600;
}

.messageContainer .separator:not(:first-child) {
    margin-top: 10px;
}

#send-message-group .send-message-form {
    width: 100%;
    display: flex;
    align-items: flex-start;
}

#send-message-group .send-message-form textarea {
    resize: none;
    border: 1px solid;
    background: white;
    height: 25px;
    margin-right: 10px;
    flex-grow: 1;
}

#chat-shadow {
    height: 0;
    width: 0;
}

.chat.messageseparator {
	padding: 0;
	padding-right: 3px;
}

#submit_message_text {
	width: 80%;
	display: inline;
}

// #chat_users .il-item-title {
// 	display: inline-block;
// }

#chat_function_list .btn + .btn {
	margin-left: 0;
}
