.chat-list {
    max-height: 250px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px 10px 0px 10px;

    li {
    	margin-bottom: 10px;

    	&.unread {
    		background-color: #dcf9ff;
    	}

    	a {
    		color: inherit;

    		.status {
    			background-color: inherit;
    			vertical-align: inherit;
    			position: relative;
			    left: -10px;
			    top: 10px;
			    font-size: 12px;

    			&.online {
					color: #060;
				}

				&.away {
					color: #cc0;
				}

				&.dnd {
					color: #900;
				}

				&.offline {
					color: gray;
				}
    		}
    	}
    }

    img {
	    border-radius: 50%;
	    width: 32px;
	    height: 32px;
	}

	.user-icon {
		width: 32px;
	    height: 32px;
	    line-height: 32px;
	}


}

.chats .listview .lv-footer {
	margin-top: 0px;
    min-height: inherit;
}

#messages-main {
	position: relative;

	&:before,
	&:after {
		content: " ";
		display: table;
	}

	&:after {
		clear: both;
	}

	.ms-block {
		padding: 0px 20px 0;
	}

	.ms-menu {
		position: absolute;
		overflow: auto;
		left: 0;
		background: #FFF;
		border-right: 1px solid #EEE;
		height: 100%;
		width: 300px;
		-webkit-transition: all;
		-o-transition: all;
		transition: all;
		-webkit-transition-duration: 250ms;
		transition-duration: 250ms;

		@media (max-width: @screen-xs-max) {
			height: ~"calc(100% - 58px)";
		    -webkit-transform: translate3d(-240px, 58px, 0);
		    transform: translate3d(-240px, 58px, 0);
		    opacity: 0;
		    filter: alpha(opacity=0);
		    z-index: 1;

		    &.toggled {
			    -webkit-transform: translate3d(0, 58px, 0);
			    transform: translate3d(0, 58px, 0);
			    opacity: 1;
			    filter: alpha(opacity=100);
			}
		}

		.lv-item {
		  	padding-left: 15px;
		  	padding-right: 15px;
		  	border-top: 1px solid #f8f8f8;

			&.bg-primary {
			  	background: #F2F2F2;;

			  	.lv-small {
			  		color: #000;
			  	}
			}

			&:not(.bg-primary):hover {
			  	background: #F2F2F2;
			  	cursor: pointer;
			}

			.lv-avatar {
				width: 40px;
				height: 40px;
				line-height: 40px;

				.user-icon {
					font-size: 2rem;
				}

				> img {
					width: 40px;
					height: 40px;
				}
			}

			.status {
				width: 12px;
				height: 12px;
				position: absolute;
			    left: 45px;
			    top: 35px;
			    border: 1px solid #fff;
			}

			.leave {
				opacity: .5;
			}
		}
	}

	.ms-body {
		@media (min-width: @screen-sm-min) {
			padding-left: 300px;
		}

		@media (max-width: @screen-xs-max) {
			overflow: hidden;
		}
	}

	.ms-user {

		&:before,
		&:after {
			content: " ";
			display: table;
		}

		&:after {
			clear: both;
		}

		> img {
			border-radius: 50%;
			width: 40px;
			float: left;
		}

		> div {
			overflow: hidden;
			padding: 7px 5px 7px 15px;
			font-size: 11px;
		}		
	}

	#ms-compose {
		position: fixed;
		bottom: 120px;
		z-index: 1;
		right: 30px;
		box-shadow: 0 0 4px rgba(0, 0, 0, 0.14), 0 4px 8px rgba(0, 0, 0, 0.28);
	}

	.lvh-label {
		color: #818181;
		display: inline-block;
		margin: 0;
		font-size: 14px;
		font-weight: normal;
		padding: 0 6px;
		line-height: 33px;
		vertical-align: middle;
		float: left;
	}

	.c-black {
		color: #000;
	}

	.lv-body.chat-content {
		padding-left: 0px;
	}

	ul.chats-list {
		padding-left: 0px;
		height: auto !important;
	}

	.ms-reply {
		position: relative;
		margin: 0 !important;

		textarea {
			width: 100%;
			font-size: 13px;
			border: 0;
			padding: 10px 8px;
			resize: none;
			height: 40px;
		}

		button {
		  	position: absolute;
		  	top: 0;
		  	right: 0;
		  	border: 0;
		  	height: 100%;
		  	width: 60px;
		  	font-size: 25px;
		  	background: #F5F5F5;
		  	color: @material-primary;

		  	&:hover {
			  	background: #f2f2f2;
			}
		}
	}

	.lv-avatar {
		width: 32px;
		height: 32px;
		border-radius: 50%;
		color: #FFF;
		text-align: center;
		line-height: 32px;
		font-size: 13px;
		margin-right: 15px;
		padding: 0 !important;
		text-transform: uppercase;

		> img {
			width: 32px;
			height: 32px;
			border-radius: 50%;
			vertical-align: top;
		}

		.user-icon {
			width: inherit;
			height: inherit;
			line-height: inherit;
			font-size: 1.5rem;
		}
	}

	.lv-message {
		.lv-item {
			padding: 1px 10px;

			&.right {
				text-align: right;

				.lv-avatar {
					margin-right: 0;
					margin-left: 15px;
				}

				.ms-item {
					background: #eee;
				}

				[component="chat/message/body"] {

					.chat-edit {
						position: absolute;
					    left: 50px;
					    padding: 4px;
					    font-size: 12px;
					}
				}
			}

			&:not(.right) {
				.ms-item {
				  	background: #00BCD4;
				  	color: #fff;
				}

				[component="chat/message/body"] {
					.chat-edit {
						position: absolute;
					    right: 50px;
					    padding: 4px;
					    font-size: 12px;
					}
				}
			}

		}
	}

	.ms-item {
		padding: 5px 10px 7px;
		border-radius: 2px;
		display: inline-block;

		@media (min-width: @screen-sm-min) {
			max-width: 70%;
		}
	}

	.ms-date {
		display: block;
		color: #B3B3B3;
		margin: 0px 0px 2px 0px;

		> i {
			font-size: 11px;
			line-height: 100%;
		}
	}

	.listview {
		.lv-header-alt {
			padding: 12px;
		}

		.lv-footer {
			padding: 5px 10px;
		}

		&.lv-message .lv-body {
			min-height: 315px;
			overflow-x: auto;
			padding: 10px;
		}
	}

	.lv-actions {
		font-size: 18px;
		padding: 5px;
		color: #999;

		&:hover {
			cursor: pointer;
			color: #333;
		}
	}

	.lv-item.media .ms-item > p {
		margin: 0px;
	}

	[data-break="true"] {
		margin-top: 5px;
	}

	[component="chat/message/body"] {
		.chat-controls {
			position: absolute;
		    left: 70px;
		    display: none;
		}
	}

	[component="chat/message"] {
		&:hover {
			.chat-controls {
	    		display: block;
	    	}
	    }
	}

	.users-tag-container {
		display: inline-block;

		.bootstrap-tagsinput {
			margin-bottom: 0px;
		}
	}
	
	.since-bar {
		display: block;
		margin: 10px 20px;
		
		.selected {
			font-weight: bold;
		}
	}
	
	
	.form-group {
		margin-bottom: 0px;
	}
	
	
	/* chat search */
	
	.ms-search-menu {
		position: absolute;
		overflow: auto;
		left: 0;
		top: 0;
		background: #FFF;
		border-right: 1px solid #EEE;
		height: 100%;
		width: 300px;
		-webkit-transition: all;
		-o-transition: all;
		transition: all;
		-webkit-transition-duration: 250ms;
		transition-duration: 250ms;

		
		height: ~"calc(100% - 58px)";
	    -webkit-transform: translate3d(-240px, 58px, 0);
	    transform: translate3d(-240px, 58px, 0);
	    opacity: 0;
	    filter: alpha(opacity=0);
	    z-index: 2;

	    &.toggled {
		    -webkit-transform: translate3d(0, 58px, 0);
		    transform: translate3d(0, 58px, 0);
		    opacity: 1;
		    filter: alpha(opacity=100);
		}
		
		.lv-item {
		  	padding-left: 15px;
		  	padding-right: 15px;
		  	border-top: 1px solid #f8f8f8;

			&.bg-primary {
			  	background: #fff;

			  	.lv-small {
			  		color: #000;
			  	}
			}

			&:not(.bg-primary):hover {
			  	background: #F2F2F2;
			  	cursor: pointer;
			}

			.lv-avatar {
				width: 40px;
				height: 40px;
				line-height: 40px;

				.user-icon {
					font-size: 2rem;
				}

				> img {
					width: 40px;
					height: 40px;
				}
			}

			.status {
				width: 12px;
				height: 12px;
				position: absolute;
			    left: 45px;
			    top: 35px;
			    border: 1px solid #fff;
			}

			.leave {
				opacity: .5;
			}
		}
		
		ul.chats-search-list {
			padding-left: 0;
		}
	}
	
	/* end chat search */

}  /* end #messages-main */


#ms-menu-trigger {
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	float: left;
	margin: 1px 0 0 -7px;

	@media (min-width: @screen-sm-min) {
		display: none;
	}

	.line-wrap .line {
		background-color: #717171;
	}
}

.m-t-20 {
    margin-top: 20px !important;
}

.ms-body.expanded-chat ul {
	margin-bottom: 0px;
}


.chat-modal {

	@media (max-width: @screen-xs-max) {
		width: 100%;
		height: 100%;
		top: 0 !important;
		left: 0 !important;
		
		.modal-dialog {
			height: 100%;
			margin: 0px;
		}
		
		.modal-content {
			height: 100%;
			border-radius: 0px;
		}

		.chat-footer {
			padding-top: 15px;
			border-top: 1px solid #ddd;
		    margin-left: -15px;
		    margin-right: -15px;
		}
	}

	.lv-item {
		padding-left: 20px;
		padding-right: 20px;

		&.bg-primary {
			background: #fff;
		}

		&:not(.active):hover {
			background: #fff;
			cursor: pointer;
		}
	}

	.lv-message .lv-item {

		padding: 1px 0px;

		&.right {
			text-align: right;

			.ms-item {
				background: #eee;
			}

			.lv-avatar {
				margin-right: 0;
				margin-left: 15px;
			}

			[component="chat/message/body"] {
				.chat-edit {
					position: absolute;
				    left: 5px;
				    padding: 4px;
				    font-size: 12px;
				}
			}
		}

		&:not(.right) {
			.ms-item {
				background: #00BCD4;
				color: #fff;
			}

			[component="chat/message/body"] {
				.chat-edit {
					position: absolute;
				    right: 5px;
				    padding: 4px;
				    font-size: 12px;
				}
			}
		}

		.ms-item {
			padding: 7px 12px 9px;
  			border-radius: 2px;
			display: inline-block;

			p {
				margin-bottom: 0px;
			}
		}

		.ms-date {
			display: block;
			color: #B3B3B3;
			margin: 0px 0px 2px 0px;
		}

		.lv-avatar > img {
			width: 35px;
			height: 35px;
			border-radius: 50%;
			vertical-align: top;
		}

		&[data-break="true"] {
			margin-top: 10px;
		}
		
	}

	.lv-avatar {
		width: 35px;
		height: 35px;
		border-radius: 50%;
		color: #FFF;
		text-align: center;
		line-height: 34px;
		font-size: 15px;
		margin-right: 15px;
		padding: 0 !important;
		text-transform: uppercase;

		> img {
			width: 35px;
			height: 35px;
			border-radius: 50%;
			vertical-align: top;
		}

		.user-icon {
			font-size: 1.5rem;
		}
	}

	.timeago {
		display: inline-block;
	}

	.chat-content {
		height: 250px;
	 	overflow-y: auto;
		resize: none;
		word-wrap: break-word;
		padding: 0px;
		margin-top: 10px;
	}

	.status {
		font-size: 14px;
	}

	[component="chat/message/body"] {
		.chat-controls {
			position: absolute;
		    left: 25px;
		    display: none;
		}
	}

	[component="chat/message"] {
		&:hover {
			.chat-controls {
	    		display: block;
	    	}
	    }
	}

	.modal-header {
	    padding: 5px 20px;

	    .close {
	        margin-top: 10px;
	        padding: 0px 10px;
	        font-size: 18px;
	    }
	}
}

[component="chat/search/list"] {
	padding: 0px;
	overflow-x: hidden;
	overflow-y: auto;
	margin-bottom: 0px;
	
	li {
		padding: 10px 15px;
		
		.user-icon, img {
			width: 40px;
			height: 40px;
			line-height: 40px;
			border-radius: 50%;
			font-size: 2rem;
			display: inline-block;
			text-align: center;
			color: #eee;
			font-weight: normal;
		}
		
		.status {
			background-color: inherit;
			vertical-align: inherit;
			position: relative;
			left: -10px;
			top: 10px;
			font-size: 12px;
			
			&.online {
				color: #060;
			}

			&.away {
				color: #cc0;
			}

			&.dnd {
				color: #900;
			}

			&.offline {
				color: gray;
			}
		}
		
		&:hover {
			cursor: pointer;
		}
	}
}