.clearfix {
	clear: both;

	&::after {
		content: "";
		display: table;
		clear: both;
	}
}

*,
*::before,
*::after {
	.box-sizing(border-box);
}

*:not(input):not(textarea),
*:not(input):not(textarea)::before,
*:not(input):not(textarea)::after {
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

button {
	background: none;
	border-width: 0;
	padding: 0;
	text-align: left;
	cursor: pointer;
	text-transform: inherit;
	color: inherit;
	font-style: inherit;
}

.allow-text-selection {
	-webkit-user-select: text;
	-moz-user-select: text;
	-ms-user-select: text;
	user-select: text;
}

.text-right {
	text-align: right;
}

.no-scroll {
	overflow: hidden !important;
}

.page-settings,
.page-settings * {
	-webkit-user-select: text;
	-moz-user-select: text;
	-ms-user-select: text;
	user-select: text;
}

:focus {
	outline: 0 !important;
	outline-color: transparent;
	outline-style: none;
}

a {
	cursor: pointer;
	text-decoration: none;

	&:hover,
	&:active {
		text-decoration: none;
	}
}

code {
	border-radius: 4px;
	border-width: 1px;
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin: 5px 0;
	padding: 0.5em;
	vertical-align: middle;
	word-wrap: break-word;
	text-align: left;
	white-space: pre-wrap;
	unicode-bidi: embed;
	direction: ltr;
	font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

	&.inline {
		display: inline;
		padding: 0 0.5em;
		margin: 0 0.1em;
		line-height: 16px;
	}
}

code.hljs {
	overflow-y: hidden;
}

pre {
	display: inline-block;
	width: 100%;
}

blockquote {
	.clearfix;
	margin: 0.5em 0;

	&:first-child {
		margin-top: 0;
	}

	&:last-child {
		margin-bottom: 0;
	}
	padding-left: 10px;
	position: relative;

	&::before {
		content: ' ';
		width: 4px;
		position: absolute;
		border-radius: 2px;
		left: 0;
		top: -1px;
		bottom: -1px;
	}
}

.login-terms {
	font-size: smaller;
	width: 520px;
	padding: 10px;
	max-width: 100%;
	margin: auto;

	a {
		font-weight: bold !important;
		text-decoration: underline;
	}
}

.upload-preview {
	padding: 1rem;

	.upload-preview-file {
		height: 200px;
		background-size: contain;
		background-repeat: no-repeat;
		background-position: center center;
	}
}

.upload-preview-title {
	padding: 3px;
	border-radius: 0 0 5px 5px;
}

.flex-center {
	display: -webkit-flex;
	display: flex;
	-webkit-align-items: center;
	align-items: center;
}

.copyonly {
	float: left;
	display: inline-block;
	vertical-align: baseline;
	width: 0;
	height: 0;
	font-size: 0;
	-moz-box-orient: vertical;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.first-unread,
.cozy .first-unread,
.compact .first-unread {
	&.message,
	&.sequential.message {
		padding-top: 20px;
	}

	.body {
		&::before {
			content: "";
			display: block;
			position: absolute;
			right: 0;
			left: 0;
			top: 0;
			transition: background-color, 0.5s, linear;
			height: 16px;
		}

		&::after {
			content: attr(data-unread-text);
			display: block;
			position: absolute;
			right: 0;
			top: 0;
			text-transform: uppercase;
			font-size: 12px;
			line-height: 16px;
			padding: 0 5px;
			transition: color, 0.5s, linear;
			left: 0;
			text-align: center;
		}
	}
}

.text-center {
	text-align: center;
}

.connection-status > .alert {
	padding: 2px;
	position: absolute;
	width: 100%;
	z-index: 1000000;
	border-radius: 0;
}

.alert {
	padding: 15px;
	margin-bottom: 20px;
	border-width: 1px;
	border-radius: 4px;
}

.full-page .hidden {
	visibility: hidden !important;
	display: none !important;
}

.hidden {
	display: none !important;
}

.small-title {
	font-size: 13px;
	text-transform: uppercase;
	margin-bottom: 5px;
	font-weight: 600;
}

.fill-all {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
}

.scrollable {
	&:extend(.fill-all);
	overflow-y: scroll;
	-webkit-overflow-scrolling: touch;
}

.page-container {
	&:extend(.fill-all);
	overflow-y: hidden;

	.content {
		&:extend(.fill-all);
		padding: 25px 40px;
		overflow-y: scroll;
		margin-top: 60px;
		-webkit-overflow-scrolling: touch;
		.calc(height, ~'100% - 60px');

		fieldset {
			margin-bottom: 1em;
		}

		.rocket-form {
			fieldset {
				display: block;
				margin: 1em 0 1.5em;

				small {
					font-size: 11px;
				}
			}

			legend {
				margin: 12px 0;
				position: relative;
				width: 100%;
				display: block;
				font-weight: bold;

				h3 {
					margin-bottom: 5px !important;
				}
			}

			.logoutOthers {
				text-align: right;
			}

			.submit {
				margin-top: 20px;
				text-align: right;
			}

			&.request-password {
				margin: 0 auto;

				fieldset {
					margin-top: 20px;

					label {
						display: block;
						margin-top: 20px;
					}
				}

				.submit {
					text-align: center;
				}
			}
		}
	}

	table {
		overflow: hidden;
		margin-bottom: 30px;
		width: 100%;

		th,
		td {
			vertical-align: middle;
			padding: 0.6rem 0.7rem;
			text-align: left;
			border-width: 0 0 1px;
			user-select: text;
		}

		th {
			white-space: nowrap;
		}
	}
}

.input-line {
	.clearfix;
	display: block;
	margin-bottom: 12px;

	&:nth-last-child(1) {
		margin-bottom: 0;
	}

	&.search {
		i {
			position: absolute;
			top: 10px;
			left: 7px;
		}

		.icon-spin {
			right: 5px;
			left: auto;
			font-weight: 400;
			-webkit-animation-name: spin;
			-webkit-animation-duration: 2000ms;
			-webkit-animation-iteration-count: infinite;
			-webkit-animation-timing-function: linear;
			-moz-animation-name: spin;
			-moz-animation-duration: 2000ms;
			-moz-animation-iteration-count: infinite;
			-moz-animation-timing-function: linear;
			-ms-animation-name: spin;
			-ms-animation-duration: 2000ms;
			-ms-animation-iteration-count: infinite;
			-ms-animation-timing-function: linear;
			animation-name: spin;
			animation-duration: 2000ms;
			animation-iteration-count: infinite;
			animation-timing-function: linear;
		}

		input {
			padding-left: 30px;
		}
	}

	> label {
		display: block;
		margin-bottom: 4px;
	}

	> div {
		position: relative;

		.right {
			position: absolute;
			right: 10px;
			top: 10px;
			z-index: 10;
		}
	}

	> div.-autocomplete-container {
		position: absolute;
	}

	input[type='text'] {
		display: block;
	}

	&.double-col {
		> label {
			width: 30%;
			float: left;
			margin-bottom: 0;
			text-align: right;
			line-height: 15px;
			padding: 10px 20px 10px 0;
		}

		> div {
			float: left;
			width: 67%;

			label {
				display: inline-block;
				margin-right: 4px;
				line-height: 35px;

				&:nth-last-child(1) {
					margin-right: 0;
				}

				input {
					margin-right: 4px;
				}
			}
		}
	}
}

@-ms-keyframes spin {
	from {
		-ms-transform: rotate(0deg);
	}

	to {
		-ms-transform: rotate(360deg);
	}
}

@-moz-keyframes spin {
	from {
		-moz-transform: rotate(0deg);
	}

	to {
		-moz-transform: rotate(360deg);
	}
}

@-webkit-keyframes spin {
	from {
		-webkit-transform: rotate(0deg);
	}

	to {
		-webkit-transform: rotate(360deg);
	}
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(360deg);
	}
}

@-ms-keyframes spinh {
	from {
		-ms-transform: rotateY(0deg);
	}

	to {
		-ms-transform: rotateY(360deg);
	}
}

@-moz-keyframes spinh {
	from {
		-moz-transform: rotateY(0deg);
	}

	to {
		-moz-transform: rotateY(360deg);
	}
}

@-webkit-keyframes spinh {
	from {
		-webkit-transform: rotateY(0deg);
	}

	to {
		-webkit-transform: rotateY(360deg);
	}
}

@keyframes spinh {
	from {
		transform: rotateY(0deg);
	}

	to {
		transform: rotateY(360deg);
	}
}

.rocket-h2 {
	font-weight: 300;
	text-transform: uppercase;
	font-size: 20px;
	letter-spacing: -0.5px;
	margin: 18px 0;
}

.unselectable {
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.rocket-h3 {
	font-weight: 300;
	text-transform: uppercase;
	font-size: 16px;
	letter-spacing: -0.5px;
	margin: 18px 0;
}

html {
	overflow-y: scroll;
	height: 100%;

	&.noscroll {
		overflow: hidden;
	}
}

body {
	font-size: 0.875rem;
	height: 100%;
	width: 100%;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	line-height: 1rem;
	padding: 0;
	overflow: visible;
	position: relative;
}

// input & form styles

input,
button,
select,
textarea {
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
}

input:focus {
	outline: none;
	box-shadow: 0 0 0;
}

textarea,
select,
input[type='text'],
input[type='number'],
input[type='email'],
input[type='url'],
input[type='password'] {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	height: 35px;
	line-height: normal;
	border-width: 1px;
	border-radius: 5px;
	padding: 2px 8px;
	position: relative;
	width: 100%;
	outline: none;
	border-style: solid;
}

input.input-forward {
	width: 0;
	visibility: hidden;
	transition: width 0.5s ease-in;
}

input.input-forward.show {
	visibility: visible;
	.calc(width, ~'100% - 48px');
}

input.search {
	&::before {
		content: " ";
		width: 30px;
		height: 30px;
		display: block;
		position: absolute;
		top: 0;
		left: 0;
	}
}

form.inline {
	input[type='text'],
	input[type='number'],
	input[type='email'],
	input[type='url'],
	input[type='password'],
	select {
		width: auto;
	}
}

.search-form {
	position: relative;
}

.form-group {
	.input-group {
		padding: 2px 0;
	}
}

.form-horizontal .control-label {
	padding-top: 12px;
	font-weight: bold;
}

.-autocomplete-container {
	box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
	border-width: 0;
	border-radius: 0;
	width: 100%;
	top: auto !important;

	p {
		font-size: 14px;
		padding: 8px;
	}

	.loading-animation {
		position: relative;
		min-height: 60px;
	}
}

.-autocomplete-item {
	padding: 8px 5px;
	font-size: 12px;
	cursor: pointer;
}

label.required::after {
	content: ' *';
}

.btn-loading {
	pointer-events: none;
	cursor: not-allowed;
	box-shadow: none !important;
	border-width: 0;

	i {
		display: block;
	}

	div {
		display: none;
	}
}

// new layout buttons

.button {
	&:extend(.unselectable);
	border-width: 0;
	display: inline-block;
	padding: 9px 12px;
	font-weight: 500;
	font-size: 14px;
	text-align: center;
	text-transform: uppercase;
	word-spacing: 0;
	line-height: 16px;
	position: relative;
	border-radius: 4px;

	span {
		position: relative;
		z-index: 2;
	}

	&.button-block {
		display: block;
		margin-bottom: 4px;
		width: 100%;
	}

	&[disabled] {
		cursor: initial;
	}

	&.external-login {
		color: white;

		&.facebook {
			background-color: #325c99;
		}

		&.twitter {
			background-color: #02acec;
		}

		&.google {
			background-color: #dd4b39;
		}

		&.github {
			background-color: #4c4c4c;
		}

		&.gitlab {
			background-color: #373d47;
		}

		&.trello {
			background-color: #026aa7;
		}

		&.meteor-developer {
			background-color: #de4f4f;
		}

		&.wordpress {
			background-color: #1e8cbe;
		}

		&.linkedin {
			background-color: #1b86bc;
		}
	}
}

.buttons-group {
	display: -webkit-flex;
	display: -moz-flex;
	display: flex;
	margin-bottom: 4px;

	.button {
		margin-left: 4px;
	}

	.button:first-child {
		margin-left: 0;
		flex-grow: 1;
	}
}

.oauth-panel {
	.buttons-group {
		.button:first-child {
			flex-grow: 0;
		}
	}
}

.sec-header {
	margin: 16px 0;
	text-align: center;

	> * {
		display: inline-table;
		width: auto;
		vertical-align: middle;
		line-height: 35px;
	}

	label {
		margin-left: 20px;
	}
}

.burger {
	padding: 12px;
	visibility: hidden;
	display: none;
	cursor: pointer;
	margin-left: 7px;
	position: absolute;
	top: 5px;
	left: 0;
	will-change: transform;
	transition: transform 0.2s ease-out 0.1s;

	i {
		display: block;
		height: 2px;
		width: 20px;
		margin: 5px 0;
		opacity: 0.8;
		transition: transform 0.2s ease-out;
	}

	.unread-burger-alert {
		border-radius: 20px;
		position: absolute;
		min-width: 18px;
		height: 18px;
		line-height: 18px;
		text-align: center;
		font-weight: bold;
		font-size: 12px;
		top: 8px;
		right: 4px;
		z-index: 3;
		padding: 0 4px;
	}

	&.menu-opened {
		i {
			&:nth-child(1),
			&:nth-child(3) {
				opacity: 1;
				.transform-origin(50%, 50%, 0);
			}

			&:nth-child(1) {
				.transform(translate(-25%, 3px) rotate(-45deg) scale(0.5, 1));
			}

			&:nth-child(3) {
				.transform(translate(-25%, -3px) rotate(45deg) scale(0.5, 1));
			}
		}
	}
}

.arrow {
	display: block;
	width: 25px;
	height: 25px;
	z-index: 100;
	.calc(top, ~"50% - 13px");

	&::before,
	&::after {
		content: " ";
		display: block;
		width: 2px;
		height: 10px;
		position: absolute;
		.calc(top, ~"50% - 5px");
		.calc(left, ~"50% - 5px");
	}

	&::before {
		.transform(rotate(135deg) translateX(-4px));
		transition: transform 0.185s ease-out, background 0.15s ease-out;
	}

	&::after {
		.transform(rotate(-135deg) translateX(-4px));
		transition: transform 0.185s ease-out, background 0.15s ease-out;
	}

	&.left {
		&::before {
			.transform(rotate(45deg) translateY(-4px));
		}

		&::after {
			.transform(rotate(-45deg) translateY(4px));
		}
	}

	&.top {
		&::before {
			.transform(rotate(-135deg) translateX(2px) translateY(-2px));
		}

		&::after {
			.transform(rotate(135deg) translateX(-2px) translateY(-2px));
		}
	}

	&.bottom {
		&::before {
			.transform(rotate(-45deg) translateX(-2px) translateY(-2px));
		}

		&::after {
			.transform(rotate(45deg) translateX(2px) translateY(-2px));
		}
	}

	&.close {
		&::before {
			.transform(rotate(-135deg) translateX(0) translateY(0));
		}

		&::after {
			.transform(rotate(135deg) translateX(0) translateY(0));
		}
	}
}

.avatar {
	height: 100%;
	width: 100%;
	overflow: hidden;
	position: relative;
	border-radius: 4px;

	.emoji,
	.emojione {
		width: 100%;
		height: 100%;
		margin: 0;
	}

	.avatar-image {
		height: 100%;
		width: 100%;
		background-size: cover;
		background-repeat: no-repeat;
		background-position: center;
	}

	&[initials]::before {
		content: attr(initials);
		position: absolute;
		font-size: 22px;
		text-align: center;
		width: 100%;
		height: 100%;
		.flex-center;
		justify-content: center;
		text-transform: uppercase;
		font-weight: bold;
	}
}

#rocket-chat {
	display: block;
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	width: auto;
	height: auto;
	opacity: 1;
	visibility: visible;
	transition: opacity 0.2s ease-out;

	&.animated-hidden {
		visibility: hidden;
		opacity: 0;
	}

	> .alert {
		margin-bottom: 0;
		padding: 5px;
		position: absolute;
	}
}

.account-box {
	position: relative;
	height: 100%;
	cursor: pointer;
	width: 100%;

	.info {
		position: relative;
		height: 100%;
		padding: 10px 0 10px 18px;
		z-index: 100;

		.thumb {
			float: left;
			position: relative;
			width: 42px;
			padding: 0;
			height: 42px;

			&::after {
				content: " ";
				display: block;
				width: 8px;
				height: 8px;
				z-index: 10;
				position: absolute;
				border-radius: 4px;
				top: 18px;
				left: -14px;
			}

			.avatar-initials {
				line-height: 44px;
			}
		}

		.data {
			float: left;
			position: relative;
			padding: 0 25px 0 10px;
			height: 100%;
			.flex-center;
			flex-flow: row nowrap;
			.calc(width, ~"100% - 60px");
		}

		h4 {
			display: block;
			line-height: 18px;
			font-size: 16px;
			margin-top: 3px;
			font-weight: 400;
			overflow: hidden;
			text-overflow: ellipsis;
			position: relative;
			width: 130px;
			text-align: left;
			transition: color 0.15s ease-out;
		}
	}

	.options {
		position: fixed;
		top: @header-min-height;
		left: 0;
		padding-top: 15px;
		width: @rooms-box-width;
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		direction: rtl;
		.calc(height, ~'100% - ' @header-min-height + @footer-min-height);
		transition: transform 0.3s cubic-bezier(0.5, 0, 0.1, 1);
		z-index: 99;

		&.animated-hidden {
			.transform(translateY(-100%) translateY(-50px));
		}

		> .wrapper {
			direction: ltr;
		}

		.status {
			padding-left: 38px;
			position: relative;

			&::after {
				content: " ";
				display: block;
				width: 13px;
				height: 13px;
				border-width: 1px;
				border-radius: 50%;
				z-index: 5;
				position: absolute;
				left: 18px;
				.calc(top, ~"50% - 8px");
			}
		}

		span.soon {
			width: 100px;
			position: absolute;
			right: -30px;
			font-size: 10px;
			top: 17px;
		}

		i {
			width: 26px;
			display: inline-block;
			text-align: center;
			margin-left: 0 -1px 0 1px;
		}

		button,
		a {
			position: relative;
			display: table;
			width: 100%;
			padding: 15px 12px;
			line-height: 1;
			text-decoration: none;

			&:hover {
				text-decoration: none;
			}
		}

		.icon-logout {
			&::before {
				margin-right: 0;
			}
		}

		.icon-camera {
			&::before {
				margin-left: 1px;
			}
		}
	}
}

// rooms-box

.flex-nav {
	position: fixed;
	top: 0;
	left: 0;
	height: 100%;
	z-index: 3;
	overflow-y: auto;
	overflow-x: hidden;
	width: @rooms-box-width;
	transition: transform 0.15s cubic-bezier(0.5, 0, 0.1, 1);

	&.animated-hidden {
		.transform(translateX(-100%));

		header,
		footer,
		.content {
			.transform(translateX(-100%));
		}
	}

	header,
	footer,
	.content {
		transition: transform 0.425s cubic-bezier(0, 0.8, 0.05, 1);
	}

	> section {
		&:extend(.fill-all);
	}

	header {
		display: table;
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		z-index: 110;
		cursor: pointer;
		min-height: @header-min-height;
		height: @header-min-height;
		padding-left: 15px;

		> div {
			display: table-cell;
			vertical-align: middle;
			text-align: left;
		}

		h4 {
			line-height: 24px;
			font-size: 20px;
			margin-top: 2px;
			font-weight: 300;
			overflow: hidden;
			text-overflow: ellipsis;
			position: relative;
		}

		p {
			line-height: 18px;
			margin-top: 4px;
			font-weight: 400;
			font-size: 13px;
		}
	}

	footer {
		display: table;
		position: absolute;
		bottom: 0;
		left: 0;
		width: 100%;
		padding: 0 10px;
		z-index: 120;
		text-align: left;
		height: @footer-min-height;

		> div {
			display: table-cell;
			vertical-align: middle;
			text-align: left;
		}
	}

	.content {
		direction: rtl;
		position: absolute;
		top: @header-min-height;
		.calc(height, ~"100% - " @header-min-height + @footer-min-height);
		width: 100%;
		overflow-x: hidden;
		overflow-y: auto;
		display: block;
		-webkit-overflow-scrolling: touch;
		padding: 20px 10px;

		&.no-shadow {
			box-shadow: 0 0 0;
		}

		> .wrapper {
			direction: ltr;

			.flex-control {
				margin-bottom: 30px;

				.search {
					width: 100%;
					margin-bottom: 10px;
				}
			}
		}

		h4 {
			margin-bottom: 30px;
			font-weight: 400;
			text-transform: uppercase;
			font-size: 13px;
		}
	}

	.input-line {
		margin-bottom: 25px;

		&:nth-last-child(1) {
			margin-bottom: 0;
		}

		label {
			font-weight: 400;
			margin-bottom: 0;
		}

		input[type='text'],
		input[type='password'],
		select {
			padding: 0 8px 0 30px;
			box-shadow: 0 0 0;
			appearance: none;
			border-width: 1px;
			border-radius: 4px;
		}

		.inline-fields {
			input,
			label,
			select {
				display: inline-block;
			}
		}

		&.toggle {
			font-size: 0;

			> span {
				display: inline-block;
				width: calc(~"100% - 40px");
				font-size: 14px;
				vertical-align: top;
			}

			> div {
				width: 40px;
				display: inline-block;
			}
		}

		&.no-icon {
			input {
				padding: 0 8px;
			}
		}
	}

	.input-submit {
		margin: 35px 0 0 -4px;
	}

	.selected-users {
		padding: 20px 0 0;

		li {
			display: inline-block;
			padding: 5px;
			margin-right: 2px;
			margin-bottom: 2px;
		}

		i {
			cursor: pointer;
		}
	}
}

.side-nav {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	width: @rooms-box-width;
	height: auto;
	overflow: visible;
	z-index: 100;
	padding: 12px 0 0;
	will-change: transform;

	&::before {
		content: " ";
		height: 1px;
		width: 189px;
		left: 8px;
		position: absolute;
		top: 59px;
	}

	.rooms-list {
		direction: rtl;
		position: absolute;
		top: @header-min-height + @toolbar-height;
		bottom: @footer-min-height;
		width: 100%;
		overflow-x: hidden;
		overflow-y: auto;
		display: block;
		-webkit-overflow-scrolling: touch;

		> .wrapper {
			direction: ltr;
			padding-left: 8px;
			padding-bottom: 1em;
			position: relative;
		}
	}

	.more {
		display: block;
		width: 100%;
		font-size: 11px;
		padding: 4px 0 4px 10px;
		margin-top: 2px;
	}

	.input-error {
		font-size: 12px;
		padding: 0;
		text-align: left;
		margin-bottom: -20px;
		margin-top: -12px;

		strong {
			display: block;
			margin-bottom: 2px;
		}
	}

	.empty {
		font-size: 11px;
		padding: 2px 10px;
	}

	.header {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		z-index: 3;
		cursor: pointer;
		min-height: @header-min-height;
		height: @header-min-height;
	}

	> .arrow {
		position: absolute;
		top: 18px;
		right: 8px;
		z-index: 3;
		cursor: pointer;
	}

	.footer {
		position: absolute;
		bottom: 0;
		left: 0;
		width: 100%;
		padding: 10px 15px 0;
		text-align: right;
		min-height: @footer-min-height;
		height: @footer-min-height;
		z-index: 2;

		.logo {
			display: block;
			width: 100%;
			height: 100%;
			margin-top: -1px;

			&:hover {
				text-decoration: none;
			}
		}

		small {
			font-size: 11px;
			width: 100%;
			display: block;
			text-transform: lowercase;
			margin-bottom: 0;
			font-weight: 400;
			padding-right: 4px;
			margin-top: 2px;
		}

		img {
			display: inline-block;
			max-width: 222px;
			max-height: 43px;
		}
	}

	.search-form {
		> div {
			position: relative;
		}
	}

	h3 {
		position: relative;
		text-transform: uppercase;
		font-weight: 500;
		margin: 25px 0 0;
		line-height: 28px;
		padding-left: 10px;
	}

	.unread {
		min-width: 15px;
		padding: 0 2px;
		border-radius: 2px;
		text-align: center;
		position: absolute;
		right: 6px;
		font-size: 11px;
		top: 6px;
		line-height: 16px;
		font-weight: 800;
	}

	ul {
		position: relative;
		//left: 1px;

		li {
			white-space: nowrap;
			max-width: 100%;
			overflow: hidden;
			text-overflow: ellipsis;
			vertical-align: middle;

			.remove,
			.erase {
				position: absolute;
				display: block;
				right: -18px;
				top: 2px;
				opacity: 0;
				.transform(translateX(-10px));
				transition: opacity 0.15s ease 0.35s, transform 0.12s ease-out 0.35s;
			}

			&:hover {
				.opt {
					opacity: 1;
					.transform(translateX(0));
				}
			}

			&.has-unread {
				.opt {
					opacity: 0;
				}
			}

			&.has-alert {
				.name {
					font-weight: bold;
				}
			}
		}

		a {
			display: block;
			border-radius: 2px 0 0 2px;
			padding: 6px 25px 7px 6px;
			font-size: 15px;
			position: relative;
			line-height: 16px;
			white-space: nowrap;
			max-width: 100%;
			overflow: hidden;
			text-overflow: ellipsis;
			vertical-align: middle;
			text-decoration: none;

			&:hover {
				text-decoration: none;
			}

			.archived {
				font-style: italic;
			}
		}

		.opt {
			position: absolute;
			right: 0;
			width: 50px;
			padding-right: 10px;
			text-align: right;
			opacity: 0;
			display: block;
			top: 7px;
			transition: opacity 0.12s ease;

			i {
				margin: 0 1px;
			}

			.icon-cancel-circled::before {
				margin-left: 2px;
			}

			.icon-logout {
				margin-left: 1px;
			}

			&.fixed {
				opacity: 1;
				.transform(translateX(0));
			}
		}

		i {
			font-size: 14px;
			width: 16px;
			display: inline-block;
		}

		input[type="text"] {
			width: 100%;
			font-size: 12px;
		}
	}

	.unread-rooms {
		position: absolute;
		z-index: 1;
		width: 100%;
		text-align: center;
		line-height: 24px;
		text-transform: uppercase;
		font-weight: bold;
		display: -webkit-flex;
		display: flex;
		align-items: center;
		-webkit-align-items: center;
		justify-content: center;
		-webkit-justify-content: center;

		&.top-unread-rooms {
			top: @header-min-height + @toolbar-height;
		}

		&.bottom-unread-rooms {
			bottom: @footer-min-height;
		}

		i {
			margin-left: 5px;
			font-size: 12px;
		}
	}

	.unread-rooms-mode {
		max-height: 0;
		opacity: 0;
		overflow: hidden;

		&.has-unread {
			transition: max-height 1s ease-in, opacity 0.5s linear;
			max-height: 5000px;
			opacity: 1;
		}
	}
}

.toolbar {
	position: absolute;
	width: 100%;
	z-index: 2;
	top: @header-min-height;
	height: @toolbar-height;
}

.toolbar-wrapper {
	margin: 10px 8px;
	display: flex;
}

.toolbar-search {
	position: relative;
	width: 100%;
}

.toolbar-search__icon {
	position: absolute;
	top: 0;
	left: 0;
	line-height: 35px;
	width: 35px;
	text-align: center;
}

.toolbar-search__icon--cancel {
	left: auto;
	right: 0;
	opacity: 0;
	transition: opacity 0.3s;
	cursor: pointer;
}

.toolbar-search__input {
	padding: 6px 35px !important;

	&:focus + .toolbar-search__icon--cancel {
		opacity: 1;
	}
}

.toolbar-search__buttons {
	display: flex;
	align-items: center;
	margin-left: 5px;

	i {
		width: 25px;
		height: 25px;
		line-height: 25px;
		text-align: center;
		cursor: pointer;
	}
}

.new-room-highlight a {
	-webkit-animation: highlight 2s infinite;
	-moz-animation: highlight 2s infinite;
	-o-animation: highlight 2s infinite;
	animation: highlight 2s infinite;
}

.fixed-title {
	position: absolute;
	.flex-center;
	flex-flow: row nowrap;
	padding: 0 10px 0 20px;
	border-width: 0 0 1px;
	z-index: 100;
	top: 0;
	left: 0;
	width: 100%;
	height: @header-min-height+1px;

	&.visible {
		h2 {
			overflow: visible;
		}
	}

	h2 {
		width: 100%;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
		font-size: 22px;
		font-weight: 500;
		line-height: 29px;

		.icon-at,
		.icon-hash,
		.icon-lock {
			margin-right: -7px;
		}

		.icon-star,
		.icon-star-empty {
			margin-right: -4px;
		}
	}

	.submit {
		display: flex;

		.button {
			white-space: nowrap;
			margin-left: 1rem;
		}
	}

	.animated-hidden {
		visibility: hidden;
		display: none;
	}

	input[type='text'] {
		.calc(width, ~'100% - 100px');
		vertical-align: top;
		margin-top: -4px;
		margin-left: -3px;
		font-size: 20px;
	}

	.icon-pencil {
		vertical-align: text-top;
		margin-top: -7px;
		display: inline-block;
		font-size: 16px;
	}
}

.cms-page {
	max-width: 800px;
	margin: 40px auto;
	padding: 20px;
	border-radius: 4px;
	box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);

	.cms-page-close {
		margin-bottom: 10px;
		text-align: right;
	}
}

// MAIN CONTENT + MAIN PAGES //

.main-content {
	position: fixed;
	top: 0;
	bottom: 0;
	left: @rooms-box-width;
	right: 0;
	width: auto;
	height: auto;
	will-change: transform;
	transition: right 0.25s cubic-bezier(0.5, 0, 0.1, 1);

	&.main-modal {
		left: 0;
		margin-right: 0;
	}

	.container-fluid {
		padding-top: 0;
	}

	.history-date {
		margin-bottom: 20px;
	}
}

.page-settings {
	.content {
		h2 {
			margin-bottom: 2rem;
		}

		h3 {
			margin-bottom: 1rem;
		}
		padding: 20px 0;

		> .info {
			max-width: auto;
			line-height: 24px;
			padding-left: 20px;
			font-size: 16px;
			font-weight: 500;
		}
	}

	.section {
		border: 1px solid #dddddd;
		border-radius: 4px;
		background-color: #ffffff;
		padding: 20px;
		margin: 20px;

		&.section-collapsed {
			.section-content {
				display: none;
			}
		}
	}

	.section-title {
		display: flex;
		font-size: 24px;
		font-weight: 600;
		line-height: 40px;

		.section-title-text {
			flex-grow: 1;
		}

		.section-title-right {
			line-height: 0;
		}
	}

	.section-content {
		border: none !important;
		border-radius: 0 !important;
		padding: 20px 0 0 !important;

		.input-line {
			border-bottom: 1px solid #eeeeee;
			padding: 20px 0;
			margin-bottom: 0;
			display: flex;
			align-items: flex-start;

			&:last-child {
				border-bottom: none;
				padding-bottom: 0;
			}

			&:first-child {
				padding-top: 0;
			}

			.horizontal {
				display: flex;
			}

			.flex-grow-1 {
				flex-grow: 1;
			}
		}

		.reset-setting {
			margin-left: 20px;
		}

		.setting-label {
			text-align: left;
			font-weight: 500;
			font-size: 16px;
			line-height: 20px;
			width: 25%;
		}

		.settings-description {
			padding: 5px;
			line-height: 20px;
		}

		.settings-alert {
			border-width: 1px;
			font-weight: bold;
			padding: 5px;
		}

		.color-editor {
			width: 150px;
			position: relative;
		}

		.selected-rooms {
			.remove-room {
				cursor: pointer;
			}
		}
	}

	.settings-description {
		.allow-text-selection;
	}

	.rocket-form {
		max-width: none;
		width: 100%;
		padding: 0;
	}

	.settings-file-preview {
		display: flex;
		align-items: center;

		input[type=file] {
			position: absolute !important;
			width: 100%;
			top: 0;
			left: 0;
			height: 100%;
			opacity: 0;
			z-index: 10000;
			cursor: pointer;

			* {
				cursor: pointer;
			}
		}

		.preview {
			height: 50px;
			width: 100px;
			border-radius: 4px;
			overflow: hidden;
			box-shadow: 0 0 1px rgba(0, 0, 0, 0.5) inset;
			background-size: contain;
			background-position: center center;
			background-repeat: no-repeat;

			&.no-file {
				display: flex;
				align-items: center;
				justify-content: center;
				font-size: 24px;
			}
		}
	}
}

.page-static {
	.content {
		> div {
			margin-bottom: 25px;

			&:nth-last-child(1) {
				margin-bottom: 0;
			}
		}

		p {
			margin-bottom: 12px;

			&:nth-last-child(1) {
				margin-bottom: 0;
			}
		}

		.section {
			h1 {
				font-size: 20px;
				margin-top: 40px;
				padding: 0 0 0 10px;
				font-weight: 500;
			}

			&:first-of-type > h1 {
				margin-top: 0;
			}

			.section-content {
				border-width: 1px;
				padding: 20px;
				border-radius: 4px;

				.section-helper {
					padding: 20px 20px 40px;

					pre {
						display: inline;
					}
				}
			}
		}

		h1,
		h2,
		h3,
		h4 {
			font-weight: 300;
			text-transform: uppercase;
			margin-bottom: 12px;
		}
	}
}

.page-home {
	.fixed-title {
		h2 {
			overflow: visible;
		}
	}

	.logo {
		display: block;
		margin: 10px 0;
		max-width: 325px;
	}

	.info {
		max-width: 680px;
		line-height: 20px;
	}

	.social {
		h4 {
			margin-bottom: 8px;
		}

		nav {
			margin-left: -4px;
		}
	}
}

.page-list {
	.search {
		margin-bottom: 12px;
	}

	.results {
		padding: 10px 0;
		border-width: 0 0 1px;
		margin-bottom: 10px;
		font-weight: 300;

		p {
			font-size: 12px;
			text-transform: uppercase;
		}
	}

	.list {
		a {
			display: block;
			padding: 3px;
			margin-bottom: 5px;

			.info {
				h3 {
					margin-bottom: 5px;
				}

				ul {
					margin-left: 3px;
				}
			}
		}

		.room-info {
			padding: 3px;
			margin-bottom: 5px;
			cursor: pointer;

			h3 {
				margin-bottom: 5px;
			}
		}

		.user-image {
			float: right;
			margin-left: 12px;
		}
	}
}

.image-to-download {
	border-radius: 6px;
	border: 1px dashed;
	padding: 20px 15px;
	margin-bottom: 5px;
	text-transform: uppercase;
	text-align: center;
	cursor: pointer;
	height: 200px;
	display: flex;
	display: -webkit-flex;
	flex-direction: column;
	-webkit-flex-direction: column;
	align-items: center;
	-webkit-align-items: center;
	justify-content: center;
	-webkit-justify-content: center;
	width: 200px;

	i {
		font-size: 24px;
	}
}

.room-not-found {
	display: flex;
	display: -webkit-flex;
	flex-direction: column;
	-webkit-flex-direction: column;
	align-items: center;
	-webkit-align-items: center;
	justify-content: center;
	-webkit-justify-content: center;
	font-size: 30px;

	div {
		line-height: 40px;
		text-align: center;
	}

	i {
		font-size: 100px;
		padding-bottom: 30px;
	}
}

.container-bars {
	position: absolute;
	top: 55px;
	z-index: 100;
	font-weight: bold;
	display: flex;
	flex-direction: column;
	border-radius: 4px;
	overflow: hidden;
	font-size: 1em;
	left: 10px;
	right: 10px;
	box-shadow:
		0 1px 1px 0 rgba(0, 0, 0, 0.2),
		0 2px 10px 0 rgba(0, 0, 0, 0.16);
	transition: transform 0.4s ease, visibility 0.3s ease, opacity 0.3s ease;
	.transform(translateY(-10px));
	opacity: 0;
	visibility: hidden;

	&.show {
		opacity: 1;
		visibility: visible;
		.transform(translateY(0px));
	}

	> div {
		line-height: 28px;
		padding: 0 10px;
	}

	.upload-progress {
		height: 28px;
		position: relative;

		.upload-progress-progress {
			position: absolute;
			left: 0;
			height: 100%;
			width: 0%;
			z-index: 1;
			transition: width, 1s, ease-out;
		}

		.upload-progress-text {
			padding: 0 10px;
			position: absolute;
			left: 0;
			right: 0;
			height: 100%;
			z-index: 2;

			> a {
				float: right;
				text-transform: uppercase;
				cursor: pointer;
			}
		}

		button {
			float: right;
			font-weight: bold;
			text-transform: uppercase;
		}
	}

	.unread-bar {
		text-transform: uppercase;
		text-align: center;

		> button.mark-read {
			float: right;

			&:hover {
				cursor: pointer;
			}
		}

		.unread-count {
			display: none;
		}

		> button.jump-to {
			float: left;

			.jump-to-small {
				display: none;
			}

			&:hover {
				cursor: pointer;
			}
		}
	}
}

.flex-tab-main-content {
	flex-grow: 1;
	position: relative;
	z-index: 1;
}

.room-container {
	height: 100%;
}

// change to page-messages

.messages-container {
	position: relative;
	height: 100%;
	top: 0;
	left: 0;
	z-index: 1;

	.room-topic {
		font-size: 14px;
		opacity: 0.4;
		margin-left: 10px;
	}

	.edit-room-title {
		margin-left: 4px;
		font-size: 16px;
	}

	.wrapper {
		position: absolute;
		width: 100%;
		height: 100%;
		top: 0;
		left: 0;
		overflow-y: auto;
		overflow-x: hidden;
		word-wrap: break-word;
		-webkit-overflow-scrolling: touch;
	}

	.footer {
		position: absolute;
		padding: 8px 20px 0;
		border-width: 1px 0 0;
		z-index: 100;
		bottom: 0;
		left: 0;
		width: 100%;
		min-height: @footer-min-height;
	}

	.message-form {
		margin-bottom: 18px;

		> .message-input {
			border-width: 1px;
			overflow: hidden;
			border-radius: 5px;
			position: relative;
			display: flex;

			.input-message-container {
				position: relative;
				width: 100%;

				.inner-left-toolbar {
					position: absolute;
					left: 13px;
					top: 9px;
				}
			}

			> .message-buttons {
				flex: 0 0 35px;
				text-align: center;
				border: 0;
				cursor: pointer;
				display: flex;
				align-items: center;
				justify-content: center;
				position: relative;
				transition: background-color 0.1s linear, color 0.1s linear;

				i {
					font-size: 18px;
				}

				input {
					position: absolute;
					top: 0;
					left: 0;
					right: 0;
					bottom: 0;
					overflow: hidden;
					opacity: 0;
					cursor: pointer;
					width: 100%;
				}

				input::-webkit-file-upload-button {
					cursor: pointer;
				}
			}
		}

		textarea {
			display: block;
			margin: 0;
			padding-top: 9px;
			padding-bottom: 9px;
			padding-left: 49px;
			border-radius: 0;
			overflow-y: auto;
			max-height: 155px;
			resize: none;
			line-height: 16px;
			border-width: 0 1px 0 0;
		}

		.users-typing {
			float: left;
			height: 23px;
			font-size: 12px;
			padding: 3px;
			display: inline-block;
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
			max-width: 100%;
			z-index: 10;
		}

		.formatting-tips {
			float: right;
			height: 25px;
			font-size: 11px;
			padding: 3px;
			display: -webkit-flex;
			display: flex;
			align-items: center;
			overflow: hidden;
			position: absolute;
			right: 20px;
			opacity: 0.5;
			white-space: nowrap;
			transition: opacity 0.2 linear;

			> * {
				margin: 0 3px;
			}

			&:hover {
				opacity: 1;
			}

			q {
				padding: 0 0 0 3px;
				border-width: 0 0 0 3px;

				&::before {
					content: none !important;
				}
			}

			code {
				line-height: 13px;
				overflow: hidden;
				vertical-align: top;
				font-size: 10px;
				white-space: nowrap;
			}

			.hidden-br {
				display: inline-block;
			}

			.icon-level-down::before {
				transform: rotate(90deg);
			}
		}

		.stream-info {
			font-size: 12px;
			height: 25px;
			padding: 3px;
			float: left;
		}

		.editing-commands {
			display: none;
			text-transform: lowercase;

			.editing-commands-cancel {
				float: left;
				height: 23px;
				font-size: 11px;
				padding: 3px;
			}

			.editing-commands-save {
				float: right;
				height: 23px;
				font-size: 11px;
				padding: 3px;
			}
		}

		&.editing {
			.formatting-tips,
			.users-typing {
				display: none;
			}

			.editing-commands {
				display: block;
			}

			.stream-info {
				display: none;
			}
		}
	}

	.add-user-search {
		height: 100%;
		overflow: hidden;
		display: inline-block;
		vertical-align: top;
		width: 100%;
	}

	&.admin {
		.message:hover:not(.system) .message-action {
			display: inline-block;
		}
	}
}

.message-popup-position {
	position: relative;
}

.message-popup {
	position: absolute;
	z-index: 101;
	bottom: 0;
	left: 0;
	right: 0;
	overflow: hidden;
	box-shadow:
		0 -1px 10px 0 rgba(0, 0, 0, 0.2),
		0 1px 1px rgba(0, 0, 0, 0.16);
	border-radius: 5px;

	&.popup-down {
		bottom: auto;
		top: 0;
	}

	&.search-results-list {
		top: 0;
		height: calc(~"100vh -" @header-min-height + @toolbar-height + @footer-min-height);
		overflow-y: auto;
		box-shadow: none;
		border-radius: 0;
		padding: 25px 0 0 8px;
		direction: rtl;
		text-align: left;

		.popup-item {
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
			padding-left: 6px;
			position: relative;
			direction: ltr;
			height: 30px;

			i::before {
				margin-right: 0;
			}
		}

		.room-title {
			line-height: 30px;
			font-size: 15px;
		}

		.bold {
			font-weight: 700;
		}

		.unread {
			top: 8px;
		}

		.loading-animation {
			position: relative;
		}
	}
}

.message-popup-title {
	border-width: 0 0 1px;
	padding: 0 20px;
	line-height: 32px;
	font-size: 14px;
	font-weight: 300;
}

.popup-item {
	padding: 0 20px;
	line-height: 32px;
	cursor: pointer;
	user-select: none;
}

.popup-user-avatar {
	width: 24px;
	display: inline-block;
	height: 24px;
	background-size: contain;
	border-radius: 3px;
	margin: -7px 4px;
}

.popup-user-status {
	border-width: 1px;
	width: 10px;
	height: 10px;
	display: inline-block;
	border-radius: 10px;
}

.popup-slash-command-description {
	float: right;
}

.messages-box {
	position: relative;
	margin: 60px 20px 0 0;
	overflow: hidden;
	width: 100%;
	.calc(height, ~'100% - 120px');

	.message-cog-container {
		.message-action {
			&.jump-to-search-message {
				display: none !important;
			}
		}
	}

	.wrapper.has-more-next {
		padding-bottom: 24px;
	}

	ul {
		padding: 21px 0 10px;
	}

	.start {
		text-align: center;
		margin-top: 12px;
	}

	.new-message {
		.unselectable;
		margin: 0 -65px;
		position: absolute;
		border-radius: 20px;
		width: 130px;
		height: 30px;
		text-align: center;
		line-height: 30px;
		font-size: 0.8em;
		cursor: pointer;
		bottom: 8px;
		left: 50%;
		z-index: 16;
		transition: transform 0.3s ease-out;
		.transform(translateY(0));

		&.not {
			.transform(translateY(150%));
		}
	}

	.jump-recent {
		z-index: 15;
		position: absolute;
		text-align: right;
		height: 24px;
		line-height: 24px;
		font-size: 0.8em;
		padding-right: 20px;
		bottom: 0;
		left: 20px;
		right: 20px;
		border-top-left-radius: 4px;
		border-top-right-radius: 4px;
		transition: transform 0.3s ease-out;
		.transform(translateY(0));

		&.not {
			.transform(translateY(150%));
		}

		button {
			.unselectable;
			cursor: pointer;
		}
	}

	.editing {
		.body {
			border-radius: 4px;
		}
	}

	&.selectable .message {
		cursor: pointer;
	}
}

.ticks-bar {
	width: 10px;
	position: absolute;
	right: 2px;
	height: 100%;
	z-index: 10;
	pointer-events: none;

	.tick {
		height: 2px;
		width: 100%;
		top: 50%;
		position: absolute;
		border-radius: 2px;
	}
}

.message {
	padding: 8px 20px 4px 70px;
	position: relative;
	line-height: 20px;
	min-height: 40px;

	&.highlight {
		-webkit-animation: highlight 3s;
		-moz-animation: highlight 3s;
		-o-animation: highlight 3s;
		animation: highlight 3s;
	}

	&:nth-child(1) {
		margin-top: 0;
	}

	&.new-day {
		margin-top: 60px;

		&::before {
			content: attr(data-date);
			display: block;
			position: absolute;
			top: -30px;
			left: 0;
			font-size: 12px;
			font-weight: 600;
			text-align: center;
			.calc(left, ~"50% - 70px");
			z-index: 10;
			padding: 0 10px;
			min-width: 140px;
		}

		&::after {
			content: " ";
			display: block;
			position: absolute;
			top: -20px;
			left: 0;
			border-width: 1px 0 0;
			width: 100%;
		}
	}

	.message-action {
		display: none;
		cursor: pointer;
	}

	&:hover:not(.system) .message-action {
		display: block;
	}

	.message-cog-container {
		cursor: pointer;
		position: relative;
		display: none;
	}

	@keyframes dropdown-in {
		0% {
			display: none;
			opacity: 0;
		}

		1% {
			display: block;
			opacity: 0;
			transform: scale(0);
		}

		100% {
			opacity: 1;
			transform: scale(1);
		}
	}

	.message-dropdown {
		position: absolute;
		top: -5px;
		left: -2px;
		z-index: 1000;
		display: none;
		border-radius: 4px;
		overflow: hidden;
		box-shadow:
			0 1px 1px 0 rgba(0, 0, 0, 0.2),
			0 2px 10px 0 rgba(0, 0, 0, 0.16);
		transition: transform 0.15s ease-in-out, opacity 0.15s ease-in-out;
		animation: dropdown-in 0.15s ease-in-out;

		ul {
			display: flex;
			display: -webkit-flex;
			padding: 0;
			font-size: 14px;

			li {
				display: block;
				padding: 0 8px;
				font-weight: 400;
				line-height: 26px;
				cursor: pointer;

				&:first-child {
					padding-left: 6px;
					border-width: 0 1px 0 0;
				}

				&:last-child {
					padding-right: 13px;
				}
			}
		}
	}

	.user {
		display: inline-block;
		font-weight: 600;
		margin-right: 5px;
	}

	.thumb {
		position: absolute;
		left: 20px;
		display: block;
		width: 40px;
		height: 40px;

		&:not(.thumb-small) {
			.avatar {
				width: 40px;
				height: 40px;
			}
		}

		&.thumb-small {
			position: initial;
			width: 20px;
			height: 20px;
			display: inline-block;
			vertical-align: bottom;

			.avatar {
				width: 20px;
				height: 20px;
			}
		}
	}

	.info {
		font-size: 12px;

		.edited {
			border-left: 1px dotted;
			padding-left: 3px;
			margin-left: 3px;
		}

		.is-bot,
		.role-tag {
			padding: 1px 4px;
			border-radius: 2px;
		}
	}

	.private {
		margin-left: 10px;
	}

	&.sequential {
		min-height: 20px;
		padding-top: 4px;
		padding-bottom: 4px;
		margin-top: 0;

		.user {
			display: none;
		}

		.thumb:not(.thumb-small) {
			display: none;
		}

		.info {
			position: absolute;
			text-align: right;
			left: 5px;
			width: 60px;

			.time,
			.role-tag {
				display: none;
			}

			.edited {
				display: block;
				border-left: 0;
				margin-left: 0;
				padding-left: 0;
				white-space: nowrap;
			}

			.private {
				display: none;
			}

			.message-action {
				float: left;
				margin-left: 1px;
			}
		}

		.body {
			margin-top: 0;
		}

		&:hover {
			.edited {
				display: none;
			}
		}
	}

	&.system {
		.body {
			font-style: italic;

			em {
				font-weight: 600;
			}

			.attachment {
				font-style: normal;
			}
		}
	}

	.avatar-initials {
		line-height: 40px;
	}

	button {
		font-weight: 400;

		&:hover {
			text-decoration: underline;
		}
	}

	.body {
		opacity: 1;
		transition: opacity 1s linear;
		margin-top: 2px;

		.inline-image {
			background-size: contain;
			background-repeat: no-repeat;
			background-position: center left;
			display: inline-block;
			line-height: 0;
			box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
			border-radius: 3px;
			overflow: hidden;

			img {
				max-height: 200px;
				max-width: 100%;
				opacity: 0;
			}
		}

		> h1 {
			font-size: 3em;
			line-height: 1em;
		}

		> h2 {
			font-size: 2.5em;
			line-height: 1em;
		}

		> h3 {
			font-size: 2em;
			line-height: 1em;
		}

		> h4 {
			font-size: 1.5em;
			line-height: 1em;
		}

		blockquote.sandstorm-grain {
			img {
				width: 50px;
			}

			label {
				cursor: pointer;
			}

			button {
				display: block;
			}
		}
	}

	&.temp .body {
		opacity: 0.5;
	}

	.message-alias {
		font-weight: 400;
		padding-left: 2px;
	}
}

.attachment-description {
	margin-top: 10px;
	line-height: 1;
}

body:not(.is-cordova) {
	.message:hover:not(.system) .message-cog-container {
		display: inline-block;
	}

	.message {
		.body,
		.user.user-card-message,
		.time {
			-webkit-user-select: text;
			-moz-user-select: text;
			-ms-user-select: text;
			user-select: text;

			* {
				-webkit-user-select: text;
				-moz-user-select: text;
				-ms-user-select: text;
				user-select: text;
			}
		}
	}
}

.cozy {
	.message {
		padding: 4px 20px 4px 70px;

		.body {
			margin-top: 0;
		}
	}
}

.compact {
	.message {
		min-height: 26px;
		padding: 5px 15px 0 37px;

		&:not(.system) .message-cog-container {
			display: inline-block;
		}

		.body {
			display: inline;

			.inline-image img {
				max-height: 100px;
			}

			.inline-video {
				max-height: 150px;
			}

			.attachment {
				.attachment-title > a {
					font-size: 0.9em;
				}

				.attachment-author img {
					border-radius: 2px;
				}
			}

			blockquote iframe {
				height: 150px;
				width: 266px;
			}
		}

		.info {
			.avatar-image {
				border-radius: 2px;
			}

			.role-tag {
				display: none;
			}
		}

		.thumb {
			height: 20px;
			width: 20px;
			left: 10px;

			.avatar {
				width: 20px;
				height: 20px;
			}
		}

		&.sequential {
			.thumb:not(.thumb-small),.user {

				/* stylelint-disable-line */
				display: inline-block;
			}

			.info {
				position: relative;
				text-align: right;
				left: 0;

				.time,
				.edited {
					display: inline-block;
				}
			}
		}
	}
}

// FLEX-TAB and FLEX-TAB views
.main-content-flex {
	display: flex;
	height: 100%;
}

.flex-tab-container {
	display: flex;
	z-index: 2;
	border-width: 0 0 0 1px;

	.flex-tab {
		position: relative;
		display: none;
		width: @flex-tab-width;
		overflow-x: visible;

		.control {
			.header {
				text-align: center;
				padding: 5px 30px 20px;
				margin: 5px 0 15px;

				h2 {
					font-size: 20px;
					line-height: 25px;
					font-weight: 300;
				}
			}

			.button {
				min-height: 36px;
				margin: 0 1px;
			}

			.more {
				position: absolute;
				left: 0;
				top: 0;
				height: 60px;
				width: 30px;
				border-width: 0 0 1px;
				cursor: pointer;
				.transform(translateX(-27px));
				transition: transform 0.25s ease-out 0.475s, background 0.075s ease-out 0.5s;

				i {
					.transform-origin(50%, 50%, 0);
					transition: transform 0.3s ease-out;
					height: 12.5px;
					vertical-align: top;
					margin-top: 1px;
				}
			}

			.search-form {
				width: 100%;

				.icon-plus {
					position: absolute;
					top: 11px;
					left: 8px;
					font-size: 13px;
				}
			}

			.info-tabs {
				position: absolute;
				top: 0;
				text-align: right;
				height: 60px;
				right: 20px;

				a {
					float: left;
					display: inline-block;
					padding: 0 15px;
					height: 60px;
					line-height: 60px;
					vertical-align: middle;
					border-width: 0 0 0 1px;

					&:last-child {
						border-width: 0 1px 0 0;
					}
				}
			}
		}

		.content {
			&:extend(.fill-all);
			overflow-x: hidden;
			overflow-y: auto;
			top: auto;
			-webkit-overflow-scrolling: touch;

			> div {
				transition: transform 0.45s cubic-bezier(0.5, 0, 0, 1), opacity 0.125s ease-out 0.1s;
			}

			> .animated-hidden {
				.transform(translateX(100%));
				opacity: 0;
			}

			> .animated {
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
			}

			> .title {
				height: @header-min-height;

				h2 {
					padding: 0 20px;
					font-size: 20px;
					line-height: @header-min-height;
					font-weight: 300;
				}
			}
		}

		footer {
			position: absolute;
			bottom: 0;
			left: 0;
			width: 100%;
			padding: 9px 15px 0;
			z-index: 100;
			text-align: right;
			height: @footer-min-height;
		}

		.social {
			text-align: center;

			h4 {
				font-weight: 300;
				position: absolute;
				width: 100%;
				top: -12px;
				left: 0;
				font-size: 13px;
			}

			.share {
				border-radius: 50%;
				min-height: 40px;
				line-height: 20px;

				&::before {
					border-radius: 50%;
				}

				span {
					display: none;
				}
			}
		}
	}

	.flex-tab-bar {
		min-width: 40px;
		z-index: 1;

		.tab-button {
			position: relative;
			cursor: pointer;
			text-align: center;

			button {
				height: 38px;
			}

			.counter {
				position: absolute;
				font-size: 9px;
				width: 13px;
				height: 13px;
				border-radius: 50%;
				line-height: 13px;
				font-weight: bold;
				right: 4px;
				top: 4px;
				text-align: center;
			}

			&.active {
				border-width: 0 3px 0 0;

				button {
					margin-left: 3px;
				}

				.counter {
					margin-right: -3px;
				}
			}
		}
	}

	&.opened {
		.flex-tab {
			display: block;
		}
	}
}

.list-view {
	-webkit-overflow-scrolling: touch;
	overflow-y: auto;
	overflow-x: hidden;
	z-index: 10;
	padding: 20px;

	.list {
		display: flex;
		flex-flow: column nowrap;
		position: relative;
		width: 100%;

		.message {
			padding: 8px 0 4px 50px;
		}
	}

	> .title {
		margin: 0 0 20px;

		h2 {
			font-size: 20px;
			line-height: 25px;
			font-weight: 300;
		}

		p {
			font-size: 12px;
			margin-top: 4px;
		}

		b {
			font-weight: 600;
		}

		.see-all {
			float: right;
			border-width: 0;
			text-decoration: underline;
			cursor: pointer;

			&:hover {
				text-decoration: none;
			}
		}
	}

	.show-more-users {
		margin: 1em auto 0;
		display: block;
	}

	&.uploaded-files-list {
		a {
			&.file-name {
				color: #008ce3;
				padding: 10px 5px;
				border-bottom: 1px solid #eaeaea;
				display: block;
				border-width: 0 0 1px;

				&:hover {
					color: #006db0;
					text-decoration: underline;
				}

				p {
					overflow: hidden;
					text-overflow: ellipsis;
					white-space: nowrap;
				}
			}
		}

		i {
			float: left;
			margin-right: 10px;

			&.file-delete {
				float: right;
				padding-top: 10px;
			}

			&.file-download {
				float: right;
				padding-top: 11px;
			}
		}
	}
}

.user-view {
	z-index: 15;
	overflow-y: auto;
	overflow-x: hidden;

	.about {
		width: 100%;
		margin-bottom: 20px;
	}

	.thumb {
		width: 100%;
		height: 350px;
		padding: 20px;
	}

	nav {
		padding: 0 20px;

		.back {
			float: right;
		}
	}

	.info {
		white-space: normal;
		padding: 0 20px;

		h3 {
			-webkit-user-select: text;
			-moz-user-select: text;
			-ms-user-select: text;
			user-select: text;
			font-size: 24px;
			margin: 8px 0;
			line-height: 27px;
			text-overflow: ellipsis;
			width: 100%;
			overflow: hidden;
			white-space: nowrap;

			i::after {
				content: " ";
				display: inline-block;
				width: 8px;
				height: 8px;
				border-radius: 4px;
				vertical-align: middle;
			}
		}

		p {
			-webkit-user-select: text;
			-moz-user-select: text;
			-ms-user-select: text;
			user-select: text;
			line-height: 18px;
			font-size: 12px;
			font-weight: 300;
		}

		.role-tag {
			padding: 1px 4px;
			border-radius: 2px;
		}
	}

	.stats {
		li {
			margin-bottom: 3px;
			display: inline-block;
			padding: 4px 6px;
			border-right: 2px;
			border-radius: 2px;
		}
	}

	.box {
		position: relative;
		margin-bottom: 25px;
		font-size: 13px;

		h4 {
			&:extend(.small-title);
			margin-bottom: 6px;
		}

		&::after {
			content: " ";
			height: 1px;
			width: 100%;
			bottom: -10px;
			left: 0;
			position: absolute;
		}
	}

	.tags {
		li {
			display: inline-block;
			padding: 4px;
			border-right: 2px;
		}
	}

	.links {
		i {
			margin-right: 5px;
			font-size: 13px;
		}

		a {
			white-space: nowrap;
			max-width: 100%;
			overflow: hidden;
			text-overflow: ellipsis;
			display: block;
			border-radius: 2px;
			padding: 0 5px;
			line-height: 22px;
			position: relative;
			transition: background 0.18s ease, color 0.18s ease;

			&::before {
				content: attr(data-stats);
				position: absolute;
				right: 5px;
				top: 0;
				font-size: 11px;
				opacity: 0;
			}

			&:hover {
				padding-right: 34px;
				text-decoration: none;

				&::before {
					opacity: 1;
				}
			}

			span {
				font-weight: 300;
			}
		}
	}

	.contact-code {
		margin: -5px 0 10px 0;
		font-size: 12px;
	}

	.channels {
		h3 {
			font-size: 24px;
			margin-bottom: 8px;
			line-height: 22px;
		}

		p {
			line-height: 18px;
			font-size: 12px;
			font-weight: 300;
		}

		a {
			white-space: nowrap;
			max-width: 100%;
			overflow: hidden;
			text-overflow: ellipsis;
			display: block;
			border-radius: 2px;
			padding: 0 5px;
			line-height: 22px;
			position: relative;
			transition: background 0.18s ease, color 0.18s ease;

			&::before {
				content: attr(data-stats);
				position: absolute;
				right: 5px;
				top: 0;
				font-size: 11px;
				opacity: 0;
			}

			span {
				font-weight: 300;
			}
		}
	}

	.edit-form {
		padding: 20px 20px 0;
		white-space: normal;

		h3 {
			font-size: 24px;
			margin-bottom: 8px;
			line-height: 22px;
		}

		p {
			line-height: 18px;
			font-size: 12px;
			font-weight: 300;
		}

		> .input-line {
			margin-top: 20px;

			#password {
				width: 70%;
			}
		}

		nav {
			padding: 0;

			&.buttons {
				margin-top: 2em;
			}
		}

		.form-divisor {
			text-align: center;
			margin: 2em 0;
			height: 9px;

			> span {
				padding: 0 1em;
			}
		}
	}

	.room-info-content > div {
		margin: 0 0 20px;
	}
}

@user-image-square: 20px;

.user-image {
	margin: 4px;
	height: @user-image-square;
	width: @user-image-square;
	cursor: pointer;
	font-size: 12px;
	position: relative;
	display: inline-table;

	&:hover,
	&.selected {
		.avatar {
			&::after {
				.transform(scaleX(1))
			}
		}
	}

	.avatar {
		overflow: visible;

		&::before {
			font-size: 10px;
		}

		&::after {
			content: " ";
			height: 6px;
			width: 6px;
			position: absolute;
			z-index: 1;
			left: -12px;
			top: 8px;
			border-radius: 3px;
		}

		.avatar-initials {
			line-height: @user-image-square;
		}
	}

	p {
		display: none;
	}

	.lines & {
		width: 100%;
		margin: 0;

		&::after {
			display: none;
		}

		button {
			.clearfix;
			padding: 5px 0;
			height: 30px;
			display: block;

			> div {
				float: left;
				width: @user-image-square;
				height: @user-image-square;
			}
		}

		p {
			float: left;
			display: block;
			line-height: @user-image-square;
			font-size: 15px;
			font-weight: 400;
			overflow: hidden;
			text-overflow: ellipsis;
			position: relative;
			padding-left: 10px;
			.calc(width, ~"100% - 45px");
		}
	}

	button {
		display: block;
		width: 100%;
		height: 100%;
	}
}

.user-profile {
	white-space: normal;
	overflow: hidden;

	.thumb {
		float: left;
		width: 75px;

		img {
			width: 60px;
			height: 60px;
		}
	}

	.info {
		display: block;
		margin-left: 75px;

		h3 {
			font-size: 14px;
			margin-bottom: 8px;
			font-weight: 600;
		}

		p {
			font-size: 12px;
			margin-bottom: 6px;
		}

		a {
			&:hover {
				text-decoration: none;
			}
		}
	}
}

.profile-buttons {
	margin-top: 1em;
}

.rocket-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1000;
	visibility: hidden;

	&.fluid {
		.modal {
			height: 100%;

			main {
				position: absolute;
				overflow-y: scroll;
				.calc(height, ~'100% - 112px');
			}
		}
	}

	&.opened {
		.animation(fadeIn .1s ease-out forwards);

		.modal {
			.animation(modalEnter .35s cubic-bezier(.5, 0, .1, 1) forwards .1s);
		}
	}

	&.closed {
		.animation(fadeOut .2s ease-out forwards);

		.modal {
			.animation(modalExit .25s cubic-bezier(.5, 0, .1, 1) forwards);
		}
	}

	&.overflow {
		.modal {
			overflow: visible;

			main {
				overflow: visible;
				position: relative;
			}
		}
	}

	.wrapper {
		display: table;
		height: 100%;
		width: 100%;
		position: relative;
	}

	.window {
		display: table-cell;
		vertical-align: middle;
		text-align: center;
		width: 100%;
		height: 100%;
		position: relative;
	}

	fieldset {
		margin-bottom: 8px;
	}

	legend {
		z-index: 2;
		display: block;
		margin-bottom: 18px;
		position: relative;
		text-transform: uppercase;
		font-size: 13px;

		i {
			margin-right: 4px;
		}

		&::before {
			content: " ";
			width: 100%;
			height: 1px;
			position: absolute;
			top: 19px;
			left: 0;
			z-index: 1;
		}
	}

	.modal {
		display: block;
		max-width: 800px;
		margin: 0 auto;
		width: 90%;
		position: relative;
		overflow: hidden;
		text-align: left;
		border-radius: 4px;
		box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.15);
		padding: 56px 0;
		opacity: 0;

		header {
			height: 55px;
			position: absolute;
			top: 0;
			width: 100%;
			z-index: 1;
			font-size: 14px;
			text-align-last: right;
			padding: 0 25px;
			box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);

			h3 {
				display: inline-block;
				margin: 0;
				text-align: left;
				font-size: 18px;
				font-weight: 600;
				line-height: 55px;
				text-overflow: ellipsis;
				overflow: hidden;
			}

			.close {
				position: absolute;
				width: 20px;
				height: 26px;
				right: 20px;
				top: 16px;
				opacity: 1;

				i {
					font-size: 24px;
				}
			}
		}

		main {
			display: block;
			width: 100%;
			height: 100%;
			overflow-y: auto;
			overflow-x: hidden;
			padding: 20px 25px;
		}

		footer {
			height: 55px;
			position: absolute;
			bottom: 0;
			width: 100%;
			z-index: 1;
			padding: 11px 25px 0;
			text-align: right;
			box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.15);
		}
	}
}

.avatarPrompt {
	header {
		p {
			font-size: 14px;
			line-height: 22px;
			font-weight: 300;
		}
	}

	img {
		width: 200px;
	}
}

.select-arrow {
	position: absolute;
	bottom: 11px;
	right: 4px;
	color: #a9a9a9;
}

#login-card {
	width: 100%;
	max-width: 520px;
	padding: 20px;
	margin: 20px auto;
	box-shadow:
		0 1px 1px 0 rgba(0, 0, 0, 0.2),
		0 2px 10px 0 rgba(0, 0, 0, 0.16);
	border-radius: 4px;
	position: relative;
	z-index: 1;

	header {
		padding: 18px 0 23px;

		p {
			margin: 8px 0 0;
			font-size: 14px;
			line-height: 22px;
			font-weight: 300;
		}
	}

	h2 {
		&:extend(.rocket-h2);
		line-height: 24px;
		margin: 0;
	}

	h3 {
		&:extend(.rocket-h3);
	}

	img {
		width: 200px;
	}

	a {
		margin: 4px 0;
		display: inline-block;
	}

	.options {
		display: none;
		width: 100%;
		font-size: 10px;
	}

	.submit,
	.register,
	.forgot-password,
	.back-to-login {
		margin-top: 12px;
	}

	.input-line {
		margin: 0 0 14px;
		position: relative;

		&::before {
			content: " ";
			width: 100%;
			height: 40px;
			position: absolute;
			top: 7px;
			left: 0;
			cursor: text;
		}

		&.active {
			&::before {
				visibility: hidden;
			}
		}

		input,
		select {
			box-shadow: 0 0 0;
			position: relative;
			padding: 4px 8px;
			font-size: 18px;
			border-width: 0 0 1px;
			font-weight: 400;
			border-radius: 0;

			&:focus {
				border-color: #13679a !important;
			}
		}

		label {
			margin-left: 8px;
			display: block;
			font-size: 12px;
			text-align: left;
			color: #a9a9a9;
			transition: all 0.3s;
		}

		.input-error {
			text-align: left;
			color: #b40202;
			padding-left: 8px;
			font-weight: bold;
			font-size: 14px;
		}
	}
}

.social-login {
	margin-bottom: 16px;
	margin-left: -4px;
	flex-wrap: wrap;

	h3 {
		&:extend(.rocket-h3);
		margin-top: 0;
		margin-bottom: 12px;
	}

	.button {
		line-height: 22px;
		font-size: 18px;
		flex-grow: 1;
		margin-bottom: 4px;

		&:first-child {
			margin-left: 4px;
		}
	}
}

.full-page {
	.flex-center;
	flex-flow: row nowrap;
	text-align: center;
	margin: auto;
	width: 100%;
	min-height: 100%;
	z-index: 101;

	.wrapper {
		text-align: center;
		z-index: 10;
		position: relative;
		width: 100%;
		padding: 20px;
	}

	.logo {
		display: block;

		> img {
			display: inline-block;
			position: relative;
			top: 0;
			right: 0;
			z-index: 20;
			padding: 10px;
			max-width: 100%;
			max-height: 150px;
		}
	}

	a {
		font-weight: 300;
	}

	.cell {
		display: table-cell;
		vertical-align: middle;
		text-align: center;
	}

	header {
		display: block;
		position: relative;
		z-index: 1;
	}

	.text {
		font-weight: 300;
		margin: 0 auto 25px;
		max-width: 580px;
		position: relative;
		z-index: 1;

		.button {
			font-weight: 400;
			padding: 16px 20px;
			margin-top: 20px;
		}

		h1 {
			font-weight: 600;
			text-transform: uppercase;
			font-size: 24px;
			letter-spacing: -0.5px;
			margin-bottom: 20px;
			display: none;
		}

		h2 {
			&:extend(.rocket-h2);
		}

		h3 {
			&:extend(.rocket-h3);
		}

		p {
			margin: 18px 0;
			font-size: 16px;
			line-height: 24px;
			font-weight: 400;
		}
	}

	footer {
		padding: 20px 0 0;
		position: relative;
		z-index: 1;

		h4 {
			text-transform: uppercase;
			margin-bottom: 8px;
			font-size: 12px;
			font-weight: 300;
		}

		div.switch-language {
			margin-top: 20px;
		}
	}

	a.meteor {
		position: fixed;
		right: 30px;
		bottom: 20px;
		width: 100px;
		height: 50px;
		background: url(images/meteor.png) no-repeat center center;
		background-size: 100% auto;
		text-indent: -9999em;
	}

	.share {
		border-radius: 50%;
		min-height: 40px;
		line-height: 20px;

		&::before {
			border-radius: 50%;
		}

		span {
			display: none;
		}
	}
}

#particles-js {
	&:extend(.fill-all);
	position: fixed;
}

.mention-link {
	border-radius: 4px;

	&.mention-link-me,
	&.mention-link-all {
		font-weight: bold;
		padding: 0 4px 2px;
	}
}

.highlight-text {
	border-radius: 4px;
	padding: 2px;
}

.avatar-suggestions {
	display: flex;
	flex-flow: column nowrap;
}

.avatar-suggestion-item {
	margin: 5px 0;
	text-align: left;
	.flex-center;
	flex-flow: row nowrap;
	width: 100%;
	padding: 12px;
	border-width: 1px;
	border-radius: 4px;
	transition: background-color 0.15s ease-out, border-color 0.15s ease-out;

	&:first-child {
		margin-top: 10px;
	}

	.avatar {
		height: 55px;
		max-height: 55px;
		min-height: 55px;
		width: 55px;
		max-width: 55px;
		min-width: 55px;
		background-size: cover;
		font-size: 40px;
		text-align: center;
		position: relative;
	}

	.question-mark {
		&::before {
			position: absolute;
			left: 0;
			top: 0;
			width: 100%;
			height: 100%;
			margin: 0;
			line-height: 55px;
		}
	}

	.action {
		text-align: right;
		padding-left: 20px;
	}

	.button {
		min-width: 120px;
		cursor: pointer;
		text-align: center;
	}

	.input-line {
		display: flex;
		align-items: center;
	}

	#avatarurl {
		margin-right: 20px;
	}

	input[type=file] {
		position: absolute !important;
		width: 100%;
		top: 0;
		left: 0;
		height: 100%;
		opacity: 0;
		z-index: 10000;
		cursor: pointer;

		* {
			cursor: pointer;
		}
	}

	.avatar-file-input::-webkit-file-upload-button {
		visibility: hidden;
	}
}

.statistics-table {
	margin-bottom: 30px;
	width: 100%;

	th,
	td {
		text-align: left;
		padding: 6px 8px;
	}

	th {
		text-align: right;
		width: 30%;
	}

	td {
		width: 70%;
	}
}

.rocket-team {
	display: block;

	li {
		display: inline-block;
	}

	a {
		display: inline-block;
		width: 50px;
		height: 50px;
		border-radius: 50%;
		background-size: 100%;
		background-position: 50% 50%;
		margin-right: 5px;
	}
}

#fullscreendiv:-webkit-full-screen {
	position: fixed;
	width: 100%;
	height: 100%;
	top: 0;
	background: none;
}

.dropzone {
	height: 100%;

	.dropzone-overlay {
		display: none;
	}

	&.over .dropzone-overlay {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		right: 0;
		z-index: 1000000;
		font-size: 42px;
		display: flex;
		align-items: center;
		justify-content: center;

		> div {
			padding: 40px;
			border-radius: 10px;
			pointer-events: none;
			line-height: 1.3em;
			text-align: center;
		}
	}
}

.is-cordova {
	.flex-tab {
		.control {
			padding-left: 50px;
		}

		button.more {
			width: 60px;
			.transform(translateX(-57px));
		}
	}

	.connection-status > .alert {
		border-width: 0 0 1px;
	}
}

.touch {
	.footer {
		padding-left: 10px;
		padding-right: 10px;
	}
}

.webrtc-video {
	&.webrtc-video-overlay,
	.main-video,
	.state-overlay::before,
	.videos .video-item {
		color: #ffffff;
	}

	&.webrtc-video-overlay {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		top: 0;
		z-index: 1000;
		display: flex;
		flex-direction: column;
		justify-content: center;

		.main-video {
			.webrtc-video-element {
				max-width: 100%;
				width: auto;
			}
		}
	}

	.main-video {
		text-align: center;

		.webrtc-video-element {
			width: 100%;
			min-height: 299px;
		}

		> div {
			margin-top: -28px;
			position: relative;
			line-height: 25px;
			margin-bottom: 2px;
			text-align: center;
			font-weight: bold;
		}
	}

	.video-flip {
		transform: scaleX(-1);
		filter: FlipH;
	}

	.videos {
		display: -webkit-flex;
		display: -moz-flex;
		display: flex;
		flex-wrap: wrap;
		-webkit-flex-wrap: wrap;
		-moz-flex-wrap: wrap;
		justify-content: center;
		-webkit-justify-content: center;
		-moz-justify-content: center;

		.video-item {
			position: relative;
			margin-right: 3px;
			line-height: 0;
			width: 93px;
			overflow: hidden;
			text-align: center;

			&.state-overlay::before {
				content: attr(data-state-text);
				position: absolute;
				top: 0;
				left: 0;
				bottom: 0;
				right: 0;
				display: flex;
				justify-content: center;
				align-items: center;
				font-size: 12px;
				font-weight: bold;
			}

			.webrtc-video-element {
				height: 70px;
				max-width: 100px;
			}

			> div {
				line-height: 16px;
				font-size: 12px;
				text-align: center;
				text-overflow: ellipsis;
				overflow: hidden;
				padding: 0 2px;
				margin-top: -16px;
				position: relative;
				font-weight: bold;
			}

			.video-muted-overlay {
				position: absolute;
				bottom: 16px;
				left: 0;
				top: 16px;
				right: 0;
				text-align: center;
				font-size: 24px;
				display: flex;
				display: -webkit-flex;
				display: -moz-flex;
				align-items: center;
				-webkit-align-items: center;
				-moz-align-items: center;
				justify-content: center;
				-webkit-justify-content: center;
				-moz-justify-content: center;
			}
		}
	}
}

.webrtc-video-element {
	background-color: #000000;
}

.alert-icon {
	font-size: 80px;
	display: block;
	margin-bottom: 20px;
}

.colorpicker-input {
	text-indent: 34px;
}

.colorpicker-swatch {
	height: 33px;
	width: 33px;
	top: 1px;
	left: 1px;
	border-radius: 5px 0 0 5px;
	overflow: hidden;
	border-width: 0 1px 0 0;
	display: block;
	position: absolute;
}

.inline-video {
	height: auto;
	width: 100%;
	max-width: 480px;
	max-height: 270px;
}

.attention-message {
	padding-top: 50px;
	font-size: 24px;

	i {
		display: block;
		margin-bottom: 20px;
		font-size: 40px;
	}

	span {
		display: block;
	}
}

.load-more {
	position: relative;
	padding: 1rem 0;
	height: 10px;
}

.search-messages-list {
	.message-cog-container {
		.message-action {
			display: none !important;

			&.jump-to-star-message {
				display: block !important;
			}
		}
	}

	.no-results {
		text-align: center;
	}
}

.terminal {
	position: absolute;
	top: 0;
	bottom: 0;
	margin: 0;
	right: 0;
	left: 0;
	overflow-y: scroll;
	border: none !important;
	padding: 8px 10px !important;
	font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	font-weight: 500;
	margin-bottom: 0 !important;
	background-color: #444444 !important;
	color: #ffffff;
}

.terminal-line {
	word-break: break-all;
}

.terminal-time {
	color: #7f7f7f;
}

.code-colors {
	background-color: #f8f8f8;
	border-color: #cccccc;
	color: #333333;
}

.new-logs {
	margin: 0 -65px;
	position: absolute;
	border-radius: 20px;
	width: 130px;
	height: 30px;
	text-align: center;
	line-height: 30px;
	font-size: 0.8em;
	cursor: pointer;
	bottom: 8px;
	left: 50%;
	transition: transform 0.3s ease-out;
	.transform(translateY(0));

	&.not {
		.transform(translateY(150%));
	}
}

.powered-by {
	margin-top: 1em;
}

.code-error-box {
	.title {
		padding: 5px;
		font-size: 16px;
		font-weight: bold;
		margin-top: 5px;
	}

	.script-error {
		font-size: 12px;
		font-weight: bold;
		padding: 6px;
		border-left: 3px solid;
	}
}

.code-mirror-box {
	.title {
		display: none;
	}

	.button-fullscreen {
		display: initial;
	}

	.button-restore {
		display: none;
	}

	.buttons {
		text-align: right;
		margin-top: 10px;
	}

	&.code-mirror-box-fullscreen {
		height: auto;
		position: fixed;
		top: 61px;
		bottom: 0;
		z-index: 100;
		width: auto;
		right: 40px;
		left: 260px;
		display: flex;
		flex-direction: column;
		align-items: stretch;

		.buttons {
			border-width: 0;
		}

		.title {
			display: initial;
			padding-left: 10px;
			font-size: 16px;
			line-height: 30px;
		}

		.button-fullscreen {
			display: none;
		}

		.button-restore {
			display: initial;
		}

		.CodeMirror {
			flex-grow: 1;
			display: flex;
			flex-direction: column;

			.CodeMirror-scroll {
				flex-grow: 1;
			}
		}
	}
}

.sweet-alert .sa-input-error {
	top: 19px;
}

.one-passsword {
	background-image: url('/images/onepassword-button.png');
	height: 40px;
	width: 40px;
	background-size: 23px;
	background-repeat: no-repeat;
	background-position: center;
	float: right;
	position: absolute;
	right: -8px;
	top: -5px;
	opacity: 0.6;
}

.collapse-switch {
	cursor: pointer;
}

// kinda hacky, needed in oembedFrageWidget.html

br.only-after-a {
	display: none;
}

a + br.only-after-a {
	display: block;
}

.hide-usernames {
	.message {
		.user.user-card-message {
			display: none;
		}
	}
}

.hide-avatars {
	.message {
		padding-left: 20px;

		.thumb.user-card-message:not(.thumb-small) {
			display: none;
		}

		.user.user-card-message {
			margin-left: -5px;
		}
	}
}

.messages-box:not(.compact) {
	.hide-avatars {
		.message {
			&.sequential {
				.info {
					position: static;
					width: auto;
					float: right;

					.message-cog-container {
						float: left;
					}

					.message-dropdown {
						left: auto;
						right: -2px;

						ul {
							flex-direction: row-reverse;

							li:first-child i::before {
								content: "\d7";
							}
						}
					}
				}
			}
		}
	}
}

.form-inline {
	input,
	select {
		display: inline-block;
		width: auto;
		vertical-align: middle;
	}

	label {
		display: inline-block;
		max-width: 100%;
	}

	.form-group {
		display: inline-block;
	}
}

.embedded-view {
	.flex-tab-bar {
		display: none;
	}

	.messages-container {
		border-width: 0;

		.messages-box {
			margin-top: 0;
		}

		.footer {
			min-height: 36px;
			padding: 0;

			.message-form {
				margin-bottom: 0;
			}

			.message-input {
				border-width: 0;
			}

			.stream-info {
				display: none;
			}

			.formatting-tips {
				display: none;
			}
		}
	}
}

.user-info.deactivated {
	text-decoration: line-through;
	opacity: 0.8;
}

// MEDIA QUERIES

@media all and(max-width: 1100px) {
	.flex-tab-container.opened {
		.flex-tab {
			position: absolute;
			right: 40px;
			border-width: 0 0 0 1px;
			height: 100%;
		}
	}
}

@media all and(min-width: 781px) {
	.main-content {
		transform: translateX(0) !important;
	}
}

@media all and(max-width: 780px) {
	#rocket-chat {
		.burger {
			visibility: visible;
			display: inline-block;
		}

		.main-content {
			left: 0;
			z-index: 120;
		}

		.fixed-title h2 {
			margin-left: 45px;
		}

		.messages-box {
			padding: 0 10px;
		}
	}

	.sweet-alert {
		h2 {
			font-size: 20px;
			line-height: 30px;
			margin: 10px 0;
		}

		button {
			margin-top: 6px;
			padding: 10px 22px;
		}
	}

	.code-mirror-box {
		&.code-mirror-box-fullscreen {
			left: 0;
		}
	}

	.container-bars {
		.unread-bar {
			.unread-count {
				display: inline-block;
			}

			.unread-count-since {
				display: none;
			}

			> button.jump-to {
				.jump-to-small {
					display: inline-block;
				}

				.jump-to-large {
					display: none;
				}
			}
		}
	}
}

@media all and(max-width: 500px) {
	.messages-container {
		.message-form {
			> .formatting-tips {
				display: none;
			}
		}
	}
}

@media all and(max-height: 480px) {
	#login-card {
		padding: 10px;
		margin: 10px auto;

		.input-line {
			margin-bottom: 6px;
		}

		.submit {
			margin: 0;
		}
	}

	.social-login {
		margin-bottom: 6px;
	}

	.message-form textarea {
		max-height: 100px !important;
	}
}

@media all and(max-width: 440px) {
	.flex-tab-container.opened {
		position: absolute;
		width: 100%;
		height: 100%;
		top: 0;
		left: 0;

		.flex-tab {
			position: relative;
			right: auto;
		}
	}
}

@media all and(max-height: 400px) {
	.upload-preview .upload-preview-file {
		height: 100px;
	}
}

@media all and(max-height: 260px) {
	.message-form textarea {
		max-height: 50px !important;
	}
}
