/* Chats
-------------------------------------------------- */

#chats {
	display: flex;
	position: relative;
	height: calc(100% - 48px);
	overflow: hidden;
	padding: 0;
}
#chats > nav {
	flex: 0 1 37%;
	height: 100%;
	width: 440px;
	max-width: 440px;
	min-width: 300px;
	padding: 24px;
}
#chats > nav .filter {
	border: 1px solid #F3F5F7;
	border-radius: 10px;
	margin-bottom: 24px;
	height: 48px;
	width: 100%;
	padding: 8px 52px 8px 22px;
	color: #344767;
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-weight: var(--fw300);
	line-height: 32px;
	letter-spacing: -0.28px;
	background-color: #FFF;
	background-image: url(../img/ico-search.svg);
	background-position: calc(100% - 16px) center;
	background-repeat: no-repeat;
}
#chats > nav .filter::-webkit-search-cancel-button {
	-webkit-appearance: none;
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-left: 10px;
	background:
		linear-gradient(45deg, rgba(25,55,102,0) 0%,rgba(25,55,102,0) 44.5%,#193766 45%,#193766 55%,rgba(25,55,102,0) 55.5%,rgba(25,55,102,0) 100%),
		linear-gradient(135deg, transparent 0%,transparent 44.5%,#193766 45%,#193766 55%,transparent 55.5%,transparent 100%);
	cursor: pointer;
}
#chats > nav .filter:focus {
	outline: #046CC3 solid 1px;
}
#chats > nav .chats-list {
	margin-right: -14px;
	height: calc(100% - 72px);
	overflow-y: auto;
	scroll-behavior: smooth;
	padding-right: 14px;
}
#chats > nav .chat-summary {
	display: flex;
	border: 1px solid transparent;
	border-radius: 10px;
	margin-bottom: 4px;
	padding: 16px;
	cursor: pointer;
}
#chats > nav .chat-summary.active {
	border-color: #046CC3;
	cursor: default;
}
#chats > nav .chat-summary .photo {
	flex: 0 0 48px;
	border-radius: 50%;
	height: 48px;
	width: 48px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-image: url(../img/ico-user.svg);
}
#chats > nav .chat-summary .middle {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	flex: 1 1 auto;
	overflow: hidden;
	padding: 2px 0 2px 12px;
}
#chats > nav .chat-summary .name {
	color: #17335E;
	font-size: 16px;
	font-weight: var(--fw500);
	line-height: normal;
}
#chats > nav .chat-summary .text {
	color: #90A3BF;
	font-size: 14px;
	font-weight: var(--fw300);
	line-height: 21px;
	letter-spacing: -0.28px;
	max-width: 100%;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
#chats > nav .chat-summary .right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: space-between;
	flex: 0 0 50px;
	padding: 2px 0;
}
#chats > nav .chat-summary .time {
	display: block;
	color: #90A3BF;
	font-size: 14px;
	font-weight: var(--fw300);
	line-height: 21px;
	letter-spacing: -0.28px;
	text-align: right;
}
#chats > nav .chat-summary .badge:empty {
	display: none;
}
#chats > nav .chat-summary .badge {
	border-radius: 13px;
	display: block;
	width: 20px;
	height: 20px;
	color: #FFF;
	font-size: 10px;
	font-weight: var(--fw500);
	line-height: 20px;
	letter-spacing: -0.2px;
	text-align: center;
	background: #046CC3;
}
#chats > .content {
	flex: 1 1 63%;
	background-color: #FFF;
}
#chats > .content.inactive {
	background-color: #F6FCFF;
}
#chats > .content.inactive > * {
	visibility: hidden;
}
#chats .customer {
	display: flex;
	align-items: center;
	padding: 24px;
}
#chats .customer .photo {
	flex: 0 0 56px;
	border-radius: 50%;
	height: 56px;
	width: 56px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-image: url(../img/ico-user.svg);
}
#chats .customer .name {
	flex: 1 1 auto;
	padding: 18px 16px;
	color: #17335E;
	font-size: 16px;
	font-weight: var(--fw500);
	line-height: normal;
}
#chats .customer .btn-customer {
	flex: 0 0 36px;
	height: 36px;
	width: 36px;
	background: url(../img/chevron-right-lg.svg) center center no-repeat;
	cursor: pointer;
}
#chats .chat-wrapper {
	position: relative;
	border-bottom-left-radius: 20px;
	height: calc(100% - 104px);
	overflow: hidden;
	background-color: #EAF8FF;
}
#chats .chat-flow {
	display: flex;
	flex-direction: column;
	height: calc(100% - 72px);
	overflow-y: auto;
	/* scroll-behavior: smooth; */
	padding: 16px;
	background-color: #EAF8FF;
}
#chats .chat-wrapper.write-mode .chat-flow {
	height: calc(100% - 122px);
}
#chats .msg-customer,
#chats .msg-pt {
	display: flex;
	margin-bottom: 24px;
	max-width: 70%;
}
#chats .msg-pt {
	flex-direction: row-reverse;
	align-self: flex-end;
}
#chats .msg-customer .photo,
#chats .msg-pt .photo {
	flex: 0 0 36px;
	border-radius: 50%;
	height: 36px;
	width: 36px;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-image: url(../img/ico-user.svg);
}
#chats .msg-customer .content {
	flex: 1 1 auto;
	padding-left: 12px;
}
#chats .msg-pt .content {
	flex: 1 1 auto;
	padding-right: 12px;
}
#chats .msg-customer .name,
#chats .msg-pt .name {
	display: flex;
	color: #17335E;
	font-size: 14px;
	font-weight: var(--fw500);
	line-height: 21px;
}
#chats .msg-pt .name {
	flex-direction: row-reverse;
}
#chats .msg-customer .time,
#chats .msg-pt .time {
	display: inline-block;
	padding-left: 12px;
	color: #90A3BF;
	font-size: 14px;
	font-weight: var(--fw300);
	line-height: 21px;
	letter-spacing: -0.28px;
	text-align: right;
}
#chats .msg-pt .time {
	padding-right: 12px;
	padding-left: 0;
}
#chats .msg-customer .text,
#chats .msg-pt .text {
	display: inline-block;
	margin-top: 12px;
	border-radius: 0px 5px 5px 5px;
	padding: 6px 12px;
	color: #193766;
	font-size: 14px;
	font-weight: var(--fw400);
	line-height: 21px;
	letter-spacing: -0.28px;
	background: rgba(4, 108, 195, 0.30);
}
#chats .msg-pt .text {
	border-radius: 5px 0px 5px 5px;
	background: rgba(0, 196, 255, 0.30);
}
#chats .text.emoji {
	font-size: 32px;
	line-height: 32px;
}
#chats .input {
	position: relative;
	margin: 0 16px 16px;
	border-radius: 10px;
	height: 48px;
	padding: 12px;
	background-color: #FFF;
}
#chats .chat-wrapper.write-mode .input {
	height: 98px;
}
#chats #message {
	border: none;
	border-radius: 0;
	height: 100%;
	width: calc(100% - 36px);
	padding: 0;
	color: #193766;
	font-size: 14px;
	font-weight: var(--fw400);
	line-height: 21px;
	letter-spacing: -0.28px;
	resize: none;
}
#chats #send {
	position: absolute;
	top: 8px;
	right: 8px;
	border-radius: 5px;
	height: 32px;
	padding: 6px;
	line-height: 20px;
}
#chats .input > span {
	display: none;
}
#chats .input.disabled {
	color: #65748d;
	font-size: 14px;
	font-style: italic;
	line-height: 24px;
	text-align: center;
	background: #d6e9f2;
}
#chats .input.disabled textarea,
#chats .input.disabled #send {
	display: none;
}
#chats .input.disabled > span {
	display: inline-block;
}



/* Mobile
-------------------------------------------------- */

@media only screen and (max-width: 1024px) {
	
	#chats {
		height: auto;
	}
	#chats > nav {
		flex: 1 1 100%;
		bottom: 70px;
		height: auto;
		max-width: none;
	}
	#chats.show-chat > nav {
		display: none;
	}
	#chats > nav .chat-summary {
		padding: 16px 0;
	}
	#chats > .content {
		position: absolute;
		top: 0;
		left: 100%;
		flex: 1 1 100%;
		height: 100vh;
		width: 100vw;
		transition: left ease-in-out 0.2s;
	}
	#chats.show-chat > .content {
		position: relative;
		left: 0;
		height: auto;
	}
	#chats .chat-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		position: fixed;
		z-index: 1000;
		width: 100%;
		padding: 8px 24px 16px;
		background: #FFF;
	}
	#chats .chat-header .go-back {
		position: relative;
		top: auto;
		left: auto;
	}
	#chats .customer {
		flex-direction: column;
		padding: 0;
	}
	#chats .chat-header .photo {
		flex-basis: 36px;
		height: 36px;
		width: 36px;
	}
	#chats .chat-header .name {
		padding: 8px 0 0 0;
		font-size: 14px;
	}
	#chats .chat-header .go-customer {
		display: block;
		height: 24px;
		width: 24px;
		background: url(../img/ico-customer.svg) center center no-repeat;
	}
	#chats .chat-wrapper {
		height: auto;
	}
	#chats .chat-flow {
		height: auto;
		min-height: calc(100vh - 84px);
		padding-top: 140px;
		padding-bottom: 60px;
	}
	#chats .msg-customer,
	#chats .msg-pt {
		max-width: calc(100% - 48px);
	}
	#chats .input {
		position: relative;
		bottom: 0;
		left: 0;
		z-index: 1000;
		margin: 0;
		width: 100%;
	}
	#chats .input.fixed {
		position: fixed;
	}
	#chats .input.disabled {
		background-color: #FFF;
	}
	
}
