/* Chat window styling */
#chat-window {
	height: 420px;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 10px;
	border-bottom: 1px solid #ccc;
	width: 100%;
	box-sizing: border-box;
	word-wrap: break-word;
	font-size: .875em;
}

#chat-header {
	background-color: #2A598E;
	color: white;
	padding: 10px;
	text-align: center;
	font-size: 18px;
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-radius: 5px 5px 0px 0px;
}

#chat-header button {
	/* position: absolute;
	top: 5px;
	right: 10px; */
	background: transparent;
	border: none;
	color: white;
	font-size: 20px;
	cursor: pointer;
}

#chat-header button:hover {
	color: #ddd;
}

#clear-btn {
	position: absolute;
	top: 5px;
	left: 10px;
	background-color: transparent;
	color: white;
	border: none;
	font-size: 20px;
	cursor: pointer;
	display: none;
	right: unset !important;
}

#clear-btn:hover {
	color: #ddd;
}

.user-msg,
.bot-msg {
	display: flex;
	align-items: center;
	margin: 10px 0;
	width: 100%;
	word-wrap: break-word;
	white-space: normal;
}

.user-msg {
	justify-content: flex-start;
	text-align: right;
	flex-flow: row-reverse;
}

.bot-msg {
	justify-content: flex-start;
	text-align: left;
}

.message-text {
	max-width: 85%;
	padding: 8px 16px;
	color: white;
	border-radius: 15px;
	word-wrap: break-word;
	position: relative;
}

.user-msg .message-text {
	border-radius: 10px 10px 0 10px;
}

.bot-msg .message-text {
	border-radius: 10px 10px 10px 0;
}

.bot-msg .message-text::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: -8px;
	width: 15px;
	height: 15px;
}

.bot-msg .message-text::before,
.user-msg .message-text::after,
.user-msg .message-text::after,
.user-msg .message-text::before {
	content: "";
	position: absolute;
	bottom: 0;
}

.bot-msg .message-text::before {
	left: -15px;
	width: 15px;
	height: 20px;
	z-index: 9;
	border-radius: 0px 0px 20px 0px;
}

.user-msg .message-text::after {
	right: -8px;
	width: 15px;
	height: 15px;
}

.user-msg .message-text::before {
	right: -15px;
	width: 15px;
	height: 20px;
	z-index: 9;
	border-radius: 0 0 0 20px;
}

.user-msg .message-text,
.user-msg .message-text::after {
	background-color: #005F8D;
}

.bot-msg .message-text,
.bot-msg .message-text::after {
	background-color: #007BB5;
}

.bot-msg .message-text::before,
.user-msg .message-text::before {
	background: #f4f4f4;
}

.user-msg .icon {
	font-size: 20px;
	margin-left: 10px;
	z-index: 10;
}

.bot-msg .icon {
	font-size: 20px;
	margin-right: 10px;
	z-index: 10;
	/* align-self: flex-end; */
}

.message-text>h3 {
	margin: 5px 0;
}

.message-text p {
	margin: 5px 0;
}

.message-text ul {
	padding-left: 12px;
	margin-top: 5px;
}

.message-text>ul>li {
	margin: 10px 0px;
}

.message-text a {
	color: white;
}

#chat-footer {
	padding: 10px;
}

#input-container {
	display: flex;
	align-items: flex-start;
	padding: 3px;
	border-top: 1px solid #ccc;
	background-color: white;
	border-radius: 20px;
	border: 1px solid #ccc;
	box-sizing: border-box;
	position: relative;
}

#input-container textarea {
	width: calc(100% - 33px);
	padding: 10px;
	border: none;
	outline: none;
	border-radius: 20px;
	box-sizing: border-box;
	font-size: 16px;
	resize: none;
	min-height: 44px;
	max-height: 44px;
}

#send-btn {
	font-size: 22px;
	color: #1B4174;
	cursor: pointer;
	background: transparent;
	border: none;
	outline: none;
	margin-left: 10px;
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
}

@media (max-width: 400px) {
	#chat-window {
		height: 390px;
	}

	#input-container textarea {
		width: calc(100% - 33px);
	}
}

#chat-window .message {
	box-sizing: border-box;
	padding: 0.5rem 1rem;
	margin: 1rem;
	border-radius: 1.125rem 1.125rem 1.125rem 0;
	min-height: 2.25rem;
	width: -webkit-fit-content;
	width: -moz-fit-content;
	width: fit-content;
	max-width: 66%;
	box-shadow: 0 0 2rem rgba(0, 0, 0, 0.075), 0rem 1rem 1rem -1rem rgba(0, 0, 0, 0.1);
}

#chat-window .message .typing {
	display: inline-block;
	width: 0.5rem;
	height: 0.5rem;
	margin-right: 0rem;
	box-sizing: border-box;
	background: #fff;
	border-radius: 50%;
}

#chat-window .message .typing.typing-1 {
	-webkit-animation: typing 3s infinite;
	animation: typing 3s infinite;
}

#chat-window .message .typing.typing-2 {
	-webkit-animation: typing 3s 250ms infinite;
	animation: typing 3s 250ms infinite;
}

#chat-window .message .typing.typing-3 {
	-webkit-animation: typing 3s 500ms infinite;
	animation: typing 3s 500ms infinite;
}

@-webkit-keyframes typing {

	0%,
	75%,
	100% {
		transform: translate(0, 0.25rem) scale(0.9);
		opacity: 0.5;
	}

	25% {
		transform: translate(0, -0.25rem) scale(1);
		opacity: 1;
	}
}

@keyframes typing {

	0%,
	75%,
	100% {
		transform: translate(0, 0.25rem) scale(0.9);
		opacity: 0.5;
	}

	25% {
		transform: translate(0, -0.25rem) scale(1);
		opacity: 1;
	}
}


.user-avatar {
	display: flex;
	align-items: center;
}

.user-avatar-image {
	display: inline-block;
	height: 40px;
	width: 40px;
	font-size: 1rem;
	line-height: 2.75rem;
	text-align: center;
	background-color: #efefef;
	border: 2px solid #fff;
	border-radius: 10px;
	box-sizing: border-box;
	overflow: hidden;
}

.user-avatar-image img {
	height: 100%;
	width: 100%;
	-o-object-fit: cover;
	object-fit: cover;
	-o-object-position: center;
	object-position: center;
	vertical-align: baseline;
}

.user-name {
	font-size: 16px;
	font-weight: bold;
	margin-left: 10px;
}

.chat-controls button {
	background: none;
	border: none;
	color: white;
	font-size: 20px;
	cursor: pointer;
}

.chat-preview {
		background-color: #f4f4f4;
		border-radius: 5px 0;
		box-shadow: 0 4px 10px rgba(0,0,0,0.2);
	}