/* The following CSS is based on work by Renan Mayrinck (https://codepen.io/RenanMayrinck/pen/NjmRqL), licensed under CC BY 3.0 (https://creativecommons.org/licenses/by/3.0). Modifications have been made. */

* {
	margin: 0px;
	padding: 0px;
	max-width: 100vw;
	box-sizing: border-box;
}

html,
body {
	width: 100%;
	overflow-x: hidden;
}

.tg-container {
	display: none;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	overflow: hidden;
	max-width: 90%;
	margin: 0 auto;
	box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.5);
	border-radius: 15px;
	font-family: 'Open Sans', 'Roboto', 'Ubuntu', sans-serif;
	font-size: 16px;
	margin-bottom: 48px;
}

.mainApp {
	width: 100%;
	max-width: 100%;
	height: 100%;
	max-height: 100%;
	overflow: hidden;
	display: flex;
}

.hiddenMsg {
	display: none;
}

a {
	text-decoration: none;
}

button {
	cursor: pointer;
}

button,
input[type="search"],
input[type="text"] {
	border: none;
	outline: none;
}

.me {
	position: relative;
	width: calc(100% - 50px);
	height: 140px;
	background: #419fd9;
	padding: 15px 25px;
	margin-bottom: 15px;
}

.me .image {
	width: 70px;
	height: 70px;
	background: #FFF url(https://thispersondoesnotexist.com/image) no-repeat center;
	background-size: cover;
	border-radius: 100%;
	cursor: pointer;
}

/* configuration screen */

/* dark overlay element */

/* ----------------- */
/* MAIN APP ELEMENTS */
/* ----------------- */

.leftPanel {
	position: relative;
	display: inline-block;
	left: 0px;
	width: 320px;
	height: 100vh;
	float: left;
	background: #FFF;
	border-right: 1px solid #DDD;
}

.tg-header {
	width: 100%;
	height: 70px;
	background: #FFF;
}

.trigger {
	float: left;
	width: 32px;
	height: 32px;
	margin: 20px 15px;
	margin-bottom: 0px;
	color: #BBB;
	cursor: pointer;
	opacity: 0.6;
	background: none;
}

.trigger:hover {
	opacity: 1;
}

.trigger>svg {
	width: 24px;
	height: 24px;
	fill: #888;
}

.searchChats {
	width: calc(100% - 85px);
	height: 40px;
	background: #EEE;
	float: left;
	padding: 8px;
	margin-top: 14px;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
}

.searchChats:focus {
	color: #444;
	border: 2px solid #419fd9;
	background: rgb(243, 243, 243);
}

.chats {
	width: 100%;
	height: calc(100vh - 70px);
	float: left;
	overflow-x: hidden;
	overflow-y: auto;
}

.chatButton {
	float: left;
	width: 100%;
	height: 80px;
	background: #FFF;
	color: #555;
	cursor: pointer;
	overflow: hidden;
}

.chatButton:hover {
	color: #555;
	background: #EEE;
}

.chatButton:first-of-type .chatInfo .message {
	max-width: calc(320px - 105px);
}

.chatButton:nth-child(6) .chatInfo .message {
	max-width: calc(320px - 105px);
}

.active,
.active:hover {
	color: #FFF;
	background: var(--nadiyno-blue);
}

.chatInfo {
	float: left;
	width: calc(100% - 60px);
}

.chatInfo p {
	float: left;
}

.chatInfo .image {
	position: absolute;
	width: 55px;
	height: 55px;
	background-size: cover;
	border-radius: 100%;
	margin: 13px 13px;
}


.chatInfo .name {
	float: left;
	font-weight: 600;
	margin-left: 80px;
	margin-top: 18px;
}

.verified {
	position: relative;
	top: 5px;
	margin-left: 5px;
	color: var(--nadiyno-blue);
}

.chatInfo .message {
	float: left;
	clear: left;
	margin-left: 80px;
	margin-top: 7px;
	white-space: nowrap;
	text-overflow: ellipsis;
	max-width: calc(320px - 140px);
	display: block;
	overflow: hidden;
}

.chats {
	overflow: hidden;
}

.status {
	width: 60px;
	height: 100%;
	position: relative;
	float: right;
}

.status .fixed {
	position: absolute;
	right: 10px;
	bottom: 10px;
	display: none;
}

div[class~="normal"]>.fixed {
	display: none;
}

div[class~="normal"]>.count {
	right: 10px;
	bottom: 7px;
}

div[class~="onTop"]>.fixed {
	display: block;
	width: 24px;
	height: 24px;
	fill: var(--nadiyno-yellow);
}

div[class~="onTop"]>.count {
	right: 49px;
	bottom: 7px;
	background: var(--nadiyno-yellow);
	color: var(--nadiyno-blue);
}

.status .count {
	position: absolute;
	right: 49px;
	bottom: 7px;
	width: auto;
	height: auto;
	padding: 7px;
	border-radius: 20px;
	color: #222;
	background: rgba(0, 0, 0, 0.12);
}

.status .date {
	position: absolute;
	right: 12px;
	top: 12px;
	font-size: 12px;
}

.status .read {
	position: absolute;
	right: 53px;
	top: 6px;
}

.rightPanel {
	float: left;
	width: calc(100% - 321px);
	height: 100vh;
	background: #999;
}

.rightPanel .topBar {
	position: relative;
	width: 100%;
	height: 70px;
	background: #FFF;
}

.go-back {
	float: left;
	width: 44px;
	height: 44px;
	margin-left: 12px;
	margin-top: 12px;
	background: var(--nadiyno-blue);
	border: none;
	border-radius: 100%;
}

.go-back>svg {
	float: left;
	width: 24px;
	height: 24px;
	margin-left: calc(50% - 13px);
	fill: #fff;
}

.leftSide {
	display: inline-block;
	clear: none;
	float: left;
}

.leftSide .chatName {
	float: left;
	width: 320px;
	margin-left: 16px;
	margin-top: 13px;
	color: #444;
	font-weight: 600;
	cursor: default;
}

.chatName>span {
	font-size: 12px;
	font-weight: 500;
	color: var(--nadiyno-yellow);
	margin-left: 12px;
}

.leftSide .chatStatus {
	float: left;
	clear: left;
	margin-left: 16px;
	margin-top: 2px;
	font-size: 12px;
	color: var(--nadiyno-blue);
	font-weight: 300;
	cursor: default;
}

.rightSide {
	display: inline-block;
	clear: none;
	float: right;
	margin-right: 20px;
}

.tbButton,
.otherTools .toolButtons {
	width: 50px;
	height: 50px;
	margin-top: 10px;
	background: #FFF;
	color: #888;
	border-radius: 100%;
}

.tbButton:hover,
.otherTools .toolButtons:hover {
	color: #555;
	background: #DDD;
}


/* THE CONVERSATION HISTORY CSS */

.convHistory {
	float: left;
	position: relative;
	width: 100%;
	height: calc(100vh - 140px);
	background: #333;
	overflow-x: hidden;
	overflow-y: auto;
}

.userBg {
	background: url("../img/question.png") 50% center;
	background-repeat: no-repeat;
	background-color: var(--nadiyno-blue);
}

.msg {
	position: relative;
	width: auto;
	min-width: 100px;
	max-width: 45%;
	height: auto;
	padding: 25px;
	padding-bottom: 35px;
	margin: 20px 15px;
	margin-bottom: 0px;
	background: #FFF;
	border-radius: 7px;
	clear: both;
	overflow-wrap: break-word;
}

.msg:nth-last-child(1) {
	margin-bottom: 20px;
}

.msg .timestamp {
	display: block;
	position: absolute;
	right: 10px;
	bottom: 6px;
	color: #AAA;
	user-select: none;
}

.msg-pic {
	max-width: 100%;
	margin-bottom: 15px;
}

.messageReceived {
	float: left;
	background: #FFF;
}

.messageSent {
	float: right;
	background: var(--nadiyno-yellow);
}

.messageSent>.timestamp,
.messageSent>.readStatus {
	bottom: 10px;
	right: 40px;
	color: #997706;
	user-select: none;
}

.messageSent>.readStatus {
	position: absolute;
	bottom: 10px;
	right: 12px;
}

/* THE REPLY BAR CSS */

.replyBar {
	width: 100%;
	height: 70px;
	float: left;
	background: #fff;
}

.replyBar .attach {
	width: 70px;
	height: 70px;
	color: #777;
	background: #FFF;
	float: left;
}

.replyBar .attach:hover {
	color: #555;
	background: #DDD;
}

.replyBar .d45 {
	transform: rotate(45deg);
	font-size: 32px;
}

.replyBar .replyMessage {
	width: calc(100% - 220px);
	float: left;
	height: 70px;
	padding: 0px 8px;
	font-size: 16px;
}

.replyBar .otherTools {
	float: right;
	width: 120px;
	height: 70px;
}

.emojiBar {
	display: none;
	position: absolute;
	width: 325px;
	height: 200px;
	padding: 10px;
	right: 30px;
	bottom: 80px;
	border: 2px solid #DDD;
	border-radius: 3px;
	background: #FFF;
}

.emoticonType {
	width: 100%;
	height: 50px;
}

.emoticonType button {
	width: 105px;
	height: 36px;
	font-weight: 600;
	color: #555;
	background: none;
}

.emoticonType button:hover {
	color: #FFF;
	background: #419fd9;
}

.emojiList,
.stickerList {
	width: 100%;
	height: 150px;
	overflow-x: hidden;
	overflow-y: auto;
}

.emojiList .pick {
	width: 50px;
	height: 50px;
	background: transparent;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 70%;
	transition: all 0.15s ease-in-out;
}

.emojiList .pick:hover {
	background: #DDD;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 70%;
}

.stickerList .pick {
	width: 80px;
	height: 80px;
	background: transparent;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 65%;
	transition: all 0.15s ease-in-out;
}

.stickerList .pick:hover {
	background: #DDD;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 65%;
}


/* hidden, while not complete */
.stickerList {
	display: none;
}

/* CSS FOR THE EMOJI IMAGES, JUST SOME */

#smileface {
	background-image: url(https://emojipedia-us.s3.amazonaws.com/thumbs/120/apple/96/grinning-face_1f600.png);
}

#grinningface {
	background-image: url(https://emojipedia-us.s3.amazonaws.com/thumbs/120/apple/96/grinning-face-with-smiling-eyes_1f601.png);
}

#tearjoyface {
	background-image: url(https://emojipedia-us.s3.amazonaws.com/thumbs/120/apple/96/face-with-tears-of-joy_1f602.png);
}

#rofl {
	background-image: url(https://emojipedia-us.s3.amazonaws.com/thumbs/120/apple/96/rolling-on-the-floor-laughing_1f923.png);
}

#somface {
	background-image: url(https://emojipedia-us.s3.amazonaws.com/thumbs/120/apple/96/smiling-face-with-open-mouth_1f603.png);
}

#swfface {
	background-image: url(https://emojipedia-us.s3.amazonaws.com/thumbs/120/apple/96/smiling-face-with-open-mouth-and-smiling-eyes_1f604.png);
}

/* SOLVING RESPONSIVE DESIGN ISSUES */

@media screen and (max-width: 940px) {
	body {
		font-size: 14px;
	}

	.msg {
		width: 90%;
	}

	.leftSide {
		width: 120px;
		margin-top: 4px;
	}

	.chatName>span {
		display: none;
	}
}

@media screen and (max-width: 720px) {
	.leftPanel {
		width: 80px;
	}

	.trigger {
		margin-left: 22px;
	}

	.rightPanel {
		width: calc(100% - 81px);
	}

	.msg {
		width: auto;
		max-width: 60%;
	}

	.searchChats,
	.search,
	.chatButton>.name,
	.chatButton>.message,
	.chatButton>.status {
		display: none;
	}
}

@media screen and (max-width: 480px) {
	.go-back {
		display: block;
	}

	.msg {
		padding: 12px;
		padding-bottom: 36px;
		border-radius: 7px;
		clear: both;
		font-size: 14px;
	}
	.leftSide .chatStatus {
		font-size: 10px;
	}
}

@media screen and (max-width: 360px) {}