@font-face {
	font-family: 'Calibri';
	src: url('../fonts/Calibri-Bold.woff2') format('woff2'),
		url('../fonts/Calibri-Bold.woff') format('woff');
	font-weight: bold;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Calibri';
	src: url('../fonts/Calibri.woff2') format('woff2'),
		url('../fonts/Calibri.woff') format('woff');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

#azure-chat-widget,
#azure-float-button,
#azure-chat-widget * {
	font-family: 'Calibri', sans-serif;
	font-size: 16px;

	@media screen and (max-width: 767px) {
		font-size: 14px;
	}
}

#azure-float-button {
	background-color: #004985;
	position: fixed;
	bottom: 20px;
	right: 20px;
	cursor: pointer;
	z-index: 9999;
	border: none;

	color: #fff;
	height: 62px;
	min-width: 62px;
	width: 190px;
	padding: 0 1.5rem;

	border-width: 1px;
	border-style: solid;
	border-color: #004985;
	border-radius: 50px;
	box-shadow: 0px 10px 5px rgb(0 0 0 / 10%);

	display: flex;
	flex-direction: row;
	gap: 8px;
	justify-content: space-between;
	align-items: center;

	transition-property: box-shadow, background-color, border-radius, transform;
	transition-duration: 140ms;
	transition-timing-function: ease-in-out;

	.button-label {
		font-size: 1rem;
		margin-top: 0;
		margin-bottom: 0;
	}

	.floating-btn-icon {
		background-color: #fff;
		width: 35px;
		height: 35px;
		border-radius: 50%;
		overflow: hidden;
	}

	svg.button-icon {
		width: 30px;
		height: 30px;
		fill: #fff;
		position: relative;
		top: 5px;
	}

	&:hover {
		background-color: #0462b0;
		border-color: #0462b0;

		box-shadow: 0 25px 12px rgba(0, 0, 0, 0.15);
		transform: scale(1.01);
		cursor: pointer;
		text-decoration: none;
	}
}

.hidden {
	display: none !important;
}

#azure-chat-widget {
	position: fixed;
	bottom: 90px;
	right: 20px;
	width: 380px;
	border-radius: 16px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	z-index: 9999;

	transform: translateY(30px);
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;

	max-height: 80vh;
	height: auto;

	@media screen and (max-width: 767px) {
		max-height: 80vh;
		width: 90vw;
	}
}

#azure-chat-widget.show {
	transform: translateY(0);
	opacity: 1;
	visibility: visible;
}

#azure-chat-header {
	background-color: #004985;
	color: #ffffff;
	.header-top {
		/* padding: 15px 30px 15px; */
		padding: 15px;
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-weight: 600;
		position: relative;

		@media screen and (max-width: 767px) {
			padding: 15px;
			font-weight: normal;
			flex-flow: column wrap;
			gap: 10px;
		}

		.chat-header-left,
		.chat-header-right {
			display: flex;
			align-items: center;
			gap: 10px;

			.chat-title {
				span {
					font-size: 16px;
				}
			}
		}

		.chat-header-right {
			gap: 15px;

			#header-toggle-icon {
				cursor: pointer;
			}
		}

		.chat-avatar {
			width: 35px;
			height: 35px;
			border-radius: 50%;

			svg {
				/* border-radius: 50%; */
				top: 3px;
				position: relative;
				width: 35px;
				height: 35px;
			}

			@media screen and (max-width: 767px) {
				/* width: 30px;
				height: 30px; */
				/* display: none; */
				border-radius: 50%;
			}
		}
	}

	.header-bottom {
		padding: 15px 30px 30px;
		display: flex;
		flex-flow: column wrap;
		align-items: start;
		gap: 5px;

		@media screen and (max-width: 767px) {
			padding: 10px 15px 15px;
			text-align: center;
		}

		.header-buttons {
			display: flex;
			justify-content: end !important;
			flex-flow: row wrap;
			align-items: center;
			width: 100%;
		}
	}
}

.back-to-chat {
	padding: 0px !important;
	background-color: transparent;
	background-image: none;
	border: none;
	cursor: pointer;
	display: flex;

	svg {
		width: 20px;
		height: 20px;

		path {
			fill: #fff;
		}
	}

	&:hover {
		background-color: transparent !important;
	}
}

/* .back-to-chat, */
.reset-btn {
	background: #ffffff;
	color: #333333;
	border: none;
	padding: 6px 10px;
	margin-right: 5px;
	border-radius: 5px;
	cursor: pointer;
	transition: all 0.2s;
}

/* .back-to-chat:hover,
.back-to-chat:focus, */
.reset-btn:hover,
.reset-btn:focus {
	background: #eeeeee !important;
	color: #333333 !important;
}
.buttons-align {
	justify-content: space-between !important;
}
.header-bottom:has(.buttons-align) {
	padding-top: 0 !important;
}

.default-avatar {
	font-weight: bold;
	color: #333;
	font-size: 20px;
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100%;

	background-color: #fff;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	overflow: hidden;

	@media screen and (max-width: 767px) {
		width: 35px;
		height: 35px;

		svg {
			width: 30px;
			height: 30px;
		}
	}
}

/* #azure-chat-close {
	cursor: pointer;
	font-size: 18px;
} */

#azure-support-icon {
	cursor: pointer;
	font-size: 16px;
	font-weight: normal;
	background-color: transparent;
	/* border-radius: 50px; */

	display: flex;
	flex-flow: row wrap;
	align-items: center;
	gap: 1px;

	position: relative;
	/* animation: pulseGlow 2s infinite; */

	@media screen and (max-width: 767px) {
		svg {
			/* display: none; */
		}
	}
}

#azure-helps-icon {
	cursor: pointer;
	/* width: 20px; */
	height: auto;
	text-align: center;
	font-size: 16px;
	font-weight: normal;
}

#azure-support-icon,
#azure-helps-icon {
	border: 1px solid #fff;
	border-radius: 5px;
	padding: 2px 5px;

	&:hover {
		border-color: #ddd;
		color: #ddd;
	}
}

/* @keyframes pulseGlow {
	0% {
		box-shadow: 0 0 0 0 rgba(0, 136, 255, 0.7);
	}
	70% {
		box-shadow: 0 0 15px 20px rgba(0, 136, 255, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(0, 136, 255, 0);
	}
} */

#chat-box,
#support-box,
#helps-box {
	flex: 1;
	padding: 12px;
	background: #f2f2f7;
	overflow-y: auto;
}

.support-content-wrap {
	display: flex;
	flex-flow: column wrap;
	gap: 15px;

	h3 {
		margin-top: 0;
		margin-bottom: 0;
		font-weight: 700 !important;
		color: #111;
	}
}

#support-box,
#chat-box,
#helps-box {
	display: none;
}

#chat-box.active,
#support-box.active,
#helps-box.active {
	display: flex;
	gap: 5px;
	flex-flow: row wrap;
}

#support-box {
	padding: 30px;
}

.user-msg-wrap,
.ai-msg-wrap,
.support-msg-wrap,
.helps-msg-wrap {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.user-msg,
.ai-msg,
.support-msg,
.helps-msg {
	max-width: 100%;
	/* margin: 10px 0; */
	padding: 10px 14px;
	border-radius: 16px;
	line-height: 1.5;
	font-size: 14px;
	position: relative;
	display: inline-block;
	clear: both;
}

.user-msg-wrap,
.support-msg-wrap,
.helps-msg-wrap {
	align-items: end;
	flex: 1;
	flex-basis: 100%;
}

.user-msg,
.support-msg,
.helps-msg {
	background: #004985;
	float: right;
	border-radius: 6px;
	right: 0;
	position: relative;
	color: #fff;
}

.user-msg-wrap img,
.ai-msg-wrap img,
.support-msg-wrap img,
.helps-msg-wrap img {
	width: 30px;
	height: 30px;
	border-radius: 50%;
}

.ai-msg-wrap {
	align-items: start;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.ai-msg {
	background: #ddd;
	float: left;
	border-radius: 6px;
	color: #111;

	left: 0;
	position: relative;

	white-space: normal;
	line-height: 1.5;
	font-size: 16px;
}

.ai-msg br {
	margin-bottom: 6px;
}

.ai-msg p {
	margin-top: 0px;
	margin-bottom: 10px;
}
.ai-msg a {
	color: #111 !important;
}
.ai-msg a:hover {
	color: #333 !important;
}
.ai-msg h1,
h2,
h3,
h4,
h5,
h6 {
	color: #ddd;
	font-size: 16px;
}

.ai-msg strong {
	font-weight: bold;
	display: block;
}

.ai-msg ul {
	padding-left: 20px;
	margin-bottom: 10px;
}

.ai-msg li::marker {
	color: #fff;
}

#azure-chat-input {
	display: flex;
	align-items: center;
	padding: 10px;
	border-top: 1px solid #ddd;
	background: #f2f2f7;
}

#azure-chat-input input,
#azure-chat-input textarea {
	flex: 1;
	border: none;
	padding: 10px;
	font-size: 14px;
	border-radius: 20px;
	background: #e1e1e1;
	outline: none;
}

#azure-chat-input button {
	background: none;
	border: none;
	margin-left: 10px;
	cursor: pointer;
}

#user-input {
	resize: none;
	overflow: hidden;
	line-height: 1.5;
}

.quick-replies {
	display: flex;
	flex-flow: row wrap;
	gap: 8px;
	margin-bottom: 8px;
}

.quick-reply-btn {
	background-color: #ffffff;
	border: 1px solid #ddd !important;
	color: #111111;
	border: none;
	border-radius: 6px;
	padding: 10px 14px;
	cursor: pointer;
	text-align: left;
	font-size: 14px;

	width: 100%;
}

.quick-reply-btn:hover,
.quick-reply-btn:active,
.quick-reply-btn:focus,
.quick-reply-btn:focus-visible {
	background-color: #004985 !important;
	color: #ffffff !important;
	border-color: #004985 !important;
}

.quick-replies.sub-options .quick-reply-btn {
	background-color: #ffffff;
	color: #0d1d53;
	border: 1px solid #c3d4ff;
}

.hidden {
	display: none;
}

.ai-msg-default-wrapper {
	display: flex;
	width: 100%;
	flex-flow: column wrap;
	margin-bottom: 2px;
}

.default-ai-message-space {
	padding-bottom: 50px;
	transition: padding-bottom 0.3s ease; /* smooth animation */
}

/* Loading Bubble */
.ai-msg.typing {
	display: flex;
	gap: 4px;
}

.ai-msg.typing .dot {
	width: 6px;
	height: 6px;
	background: #888;
	border-radius: 50%;
	animation: blink 1.2s infinite ease-in-out;
}

.ai-msg.typing .dot:nth-child(2) {
	animation-delay: 0.2s;
}
.ai-msg.typing .dot:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes blink {
	0%,
	80%,
	100% {
		opacity: 0;
	}
	40% {
		opacity: 1;
	}
}
