a.messaging_button #messaging_notification {
	position: relative;
	top: -27px;
	right: -27px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: red;
	color: white;
  opacity: 0;
}

a.messaging_button #messaging_notification.active {
	opacity: 1;
}

div.new_marker {
	position: relative;
	top: 31px;
	left: -17px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: red;
	color: white;
	display: block;
  	opacity: 0;
}

li.new div.new_marker {
	opacity: 1;
}

/* ==========================================================================
    Messaging container
   ========================================================================== */

#messaging_container {
	position: fixed;
	background-color: #333333;
	width: 100%;
	height: 100%;
	min-height: 100vh;
  /* mobile viewport bug fix */
  min-height: -webkit-fill-available;
	top: 0px;
	right: -100%;
	-webkit-transition: all 0.5s ease-in-out;
	-ms-transition: all 0.5s ease-in-out;
	-moz-transition: all 0.5s ease-in-out;
	-o-transition: all 0.5s ease-in-out;
	transition: all 0.5s ease-in-out;
	z-index: 100000;
}

#messaging_container.open {
	right: -1px;
}

#messaging_container a.close {
	position: absolute;
	left: 20px;
	top: 15px;
}

#messaging_container a.close:hover {
	opacity: 0.6;
}

#messaging_container a.close i {
	font-size: 30px;
	color: #FFF;
}

#messaging_container.open a.close {
	display: block;
}

#messaging_container a.new_message {
	position: absolute;
	right: 20px;
	top: 15px;
}

#messaging_container a.new_message:hover {
	opacity: 0.6;
}

#messaging_container a.new_message i {
	font-size: 30px;
	color: #FFF;
}

#messaging_container h3 {
	position: absolute;
	top: 70px;
	left: 20px;
	font-family: "robotolight";
	font-size: 20px;
	text-transform: uppercase;
	color: #FFF;
}

#messaging_threads {
	position: absolute;
	top: 120px;
	width: 360px;
	left: 0px;
	height: 70%;
	height: calc(100% - 170px);
	overflow: auto;
}

#messaging_threads::-webkit-scrollbar {
  width: 7px;
}
 
#messaging_threads::-webkit-scrollbar-thumb {
  background-color: darkgrey;
  outline: 0;
  border-radius: 12px;
}

#messaging_threads a {
	text-decoration: none;
}

#messaging_threads a li {
	-webkit-transition: all 0.5s ease-in-out;
	-ms-transition: all 0.5s ease-in-out;
	-moz-transition: all 0.5s ease-in-out;
	-o-transition: all 0.5s ease-in-out;
	transition: all 0.5s ease-in-out;
	margin-bottom: 20px;
	margin-left: 20px;
}

#messaging_threads a li:hover {
	opacity: 0.6;
}

div.messaging_profile_container {
	float: left;
	margin-right: 20px;
}

div.messaging_profile_photo {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    behavior: url(PIE.htc);
    background-size: 50px 50px;
}

div.messaging_profile_initials {
    height: 50px;
    width: 50px;
    display: table-cell;
    text-align: center;
    vertical-align: middle;
    border-radius: 50%;
    background: #666;
    color: #FFF;
   	font-family: "robotolight";
    font-size: 18px;
    text-transform: uppercase;
}

#messaging_threads a li h5 {
	color: #FFF;
   	font-family: "robotolight";
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    width: calc(100% - 80px);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-top: 4px;
}

#messaging_threads a li div.delete {
	display: inline-block;
	color: #FFF;
	font-size: 14px;
	margin-left: 20px;
}

#messaging_threads a li h5.openthread {
	color: #ffc600;
}

#messaging_threads a li div.thread_body {
	color: #FFF;
  font-family: "robotolight";
  font-size: 14px;
 	margin-bottom: 5px;
 	width: 60%;
 	width: calc(100% - 74px);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#messaging_threads a li time {
	color: #FFF;
   	font-family: "robotolight";
    font-size: 12px;
    font-style: italic;
    display: none;
}

@media only screen and (min-width: 800px) {

	#messaging_container {
		width: 400px;
		right: -400px;
	}

}

/* ==========================================================================
    Thread container
   ========================================================================== */

#thread_container {
	position: fixed;
	background-color: #444444;
	width: 100%;
	height: 100%;
	min-height: 100vh;
	/* mobile viewport bug fix */
	min-height: -webkit-fill-available;
	top: 0px;
	right: -100%;
	-webkit-transition: all 0.5s ease-in-out;
	-ms-transition: all 0.5s ease-in-out;
	-moz-transition: all 0.5s ease-in-out;
	-o-transition: all 0.5s ease-in-out;
	transition: all 0.5s ease-in-out;
	z-index: 110000;
}

#thread_profile div.messaging_profile_photo, #thread_profile div.messaging_profile_initials {
	height: 75px;
  width: 75px;
  background-size: 75px 75px;
}

#thread_messages div.messaging_profile_photo, #thread_messages div.messaging_profile_initials {
		height: 36px;
    width: 36px;
    background-size: 36px 36px;
}

#thread_header {
	position: absolute;
	top: 70px;
	left: 20px;
}

#thread_header #thread_profile {
	position: relative;
	display: inline-block;
	margin-right: 10px;
}

#thread_header h3 {
	display: inline-block;
	color: #FFF;
 	font-family: "robotolight";
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  vertical-align: top;
  margin-top: 20px;
  width: 150px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#thread_container.open {
	right: -1px;
}

#thread_container.back {
	right: -1px;
}

#thread_container a.back {
	position: absolute;
	left: 20px;
	top: 15px;
}

#thread_container a.back:hover {
	opacity: 0.6;
}

#thread_container a.back i {
	font-size: 30px;
	color: #FFF;
}

#thread_container.open a.back {
	display: block;
}

#thread_messages {
	position: relative;
	margin-top: 170px;
	width: 80%;
	left: 20px;
	width: calc(100% - 60px);
	height: 80%;
	height: calc(100% - 280px);
	margin-bottom: 50px;
	overflow-x: hidden;
	overflow-y: auto;
	padding-right: 20px;
}

#thread_messages::-webkit-scrollbar {
  width: 7px;
}
 
#thread_messages::-webkit-scrollbar-thumb {
  background-color: darkgrey;
  outline: 0;
  border-radius: 12px;
}

#thread_messages li {
	display: table;
	clear: both;
}

#thread_messages li.users {
	float: right;
}

#thread_messages li div.thread_body {
	padding: 10px;
	background-color: #555;
	display: block;
	margin-bottom: 20px;
	margin-left: 50px;
	border-radius: 12px;
	border: 0;
	color: #FFF;
   	font-family: "robotolight";
    font-size: 14px;
}

#thread_messages li div.thread_body h5 {
	font-size: 10px;
	margin-bottom: 5px;
}

#thread_messages li div.thread_body p {
	margin-bottom: 10px;
}

#thread_messages li div.thread_body time {
	float: right;
	font-size: 10px;
}

#message_input_container {
	position: relative;
	width: 100%;
}

#thread_container>input {
	width: 80%;
	width: calc(100% - 100px);
	margin-left: 20px;
	color: #666;
 	font-family: "robotolight";
  font-size: 15px;
  border-radius: 12px;
  border: 0;
  padding: 4px;
  padding-left: 10px;
  padding-right: 10px;
  display: inline-block;
  margin-right: 10px;
}

#thread_container a.send_message {
	position: relative;
	display: inline-block;
}

#thread_container a.send_message:hover {
	opacity: 0.6;
}

#thread_container a.send_message i {
	font-size: 24px;
	color: #56c69e;
	top: -10px;
}

#list_users_button {
	font-family: "Roboto", sans-serif;
	font-size: 12px;
	color: #FFF;
	position: absolute;
	top: 114px;
	left: 108px;
}

#list_users_button.active {
	display: none;
}

#group_users {
	position: absolute;
	top: 120px;
	left: 108px;
	width: 260px;
	background-color: #a1a1a1;
	z-index: 100000;
	border-radius: 8px;
	padding: 10px;
	display: none;
}

#group_users.active {
	display: block;
}

#group_users li {
	display: block;
	font-family: "Roboto", sans-serif;
  font-size: 12px;
  color: #000;
  margin-bottom: 5px;
}

#close_group_users {
	position: absolute;
	top: 128px;
	right: 40px;
	z-index: 100001;
	display: none;
}

#close_group_users.active {
	display: block;
}

#close_group_users:hover i {
	opacity: 0.6;
}

#close_group_users i {
	font-size: 20px;
  color: #000;
}

@media only screen and (min-width: 800px) {

	#thread_container {
		width: 400px;
		right: -400px;
	}

	#thread_messages {
		margin-bottom: 60px;
		height: calc(100% - 280px);
	}

	#thread_header h3 {
		width: 280px;
	}

}

/* ==========================================================================
    New message container
   ========================================================================== */

#new_message_container {
	position: fixed;
	background-color: #444444;
	width: 100%;
	height: 100%;
	min-height: 100vh;
  /* mobile viewport bug fix */
  min-height: -webkit-fill-available;
	top: 0px;
	right: -100%;
	-webkit-transition: all 0.5s ease-in-out;
	-ms-transition: all 0.5s ease-in-out;
	-moz-transition: all 0.5s ease-in-out;
	-o-transition: all 0.5s ease-in-out;
	transition: all 0.5s ease-in-out;
	z-index: 105000;
}

#new_message_container.open {
	right: -1px;
}

#new_message_container a.new_message_close {
	position: absolute;
	left: 20px;
	top: 15px;
}

#new_message_container a.new_message_close:hover {
	opacity: 0.6;
}

#new_message_container a.new_message_close i {
	font-size: 30px;
	color: #FFF;
}

#new_message_container.open a.new_message_close {
	display: block;
}

#new_message_container h3 {
	position: absolute;
	top: 70px;
	left: 20px;
	font-family: "robotolight";
	font-size: 20px;
	text-transform: uppercase;
	color: #FFF;
}

#new_message_container h4 {
	position: absolute;
	top: 110px;
	left: 20px;
	font-family: "robotolight";
	font-size: 18px;
	text-transform: uppercase;
	color: #FFF;
	font-style: italic;
}

#user_list {
	position: relative;
	margin-top: 170px;
	width: 80%;
	left: 20px;
	width: calc(100% - 60px);
	height: 80%;
	height: calc(100% - 380px);
	margin-bottom: 50px;
	overflow: auto;
	padding-right: 20px;
}

#user_list::-webkit-scrollbar {
  width: 7px;
}
 
#user_list::-webkit-scrollbar-thumb {
  background-color: darkgrey;
  outline: 0;
  border-radius: 12px;
}

#user_list li {
	display: block;
	cursor: pointer;
	margin-bottom: 10px;
}

#user_list li h5 {
	font-family: "robotolight";
	font-size: 16px;
	color: #FFF;
	padding-top: 15px;
}

#user_list li:hover {
	opacity: 0.5;
}

#user_list li.selected {
	opacity: 0.2;
}

#user_list_counter  {
	font-family: "robotolight";
	font-size: 16px;
	color: #FFF;
	margin-left: 20px;
}

a.new_message_next {
	position: absolute;
	display: none;
	right: 20px;
	bottom: 138px;
}

a.new_message_next:hover {
	opacity: 0.6;
}

a.new_message_next i {
	font-size: 30px;
	color: #FFF;
}

@media only screen and (min-width: 800px) {

	#new_message_container {
		width: 400px;
		right: -400px;
	}

	#user_list {
		height: calc(100% - 280px);
	}

	a.new_message_next {
		bottom: 38px;
	}

}
