@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0');

/* @font-face {
	font-family: 'Material Symbols Outlined';
	font-style: normal;
	font-weight: 400;
	src: url('../fonts/material-symbols/material-symbols-outlined-latin-400-normal.woff2') format('woff2'),
		url('../fonts/material-symbols/material-symbols-outlined-latin-400-normal.woff') format('woff');
} */

.material-symbols-outlined {
	font-family: 'Material Symbols Outlined' !important;
	/* font-weight: normal;
	font-style: normal;
	font-size: 24px;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	display: inline-block;
	white-space: nowrap;
	word-wrap: normal;
	direction: ltr;
	-webkit-font-feature-settings: 'liga';
	-moz-font-feature-settings: 'liga';
	-ms-font-feature-settings: 'liga';
	font-feature-settings: 'liga';
	-webkit-font-smoothing: antialiased; */
}

.chatbot-container * {
	--brand-color: #b31a69;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: "Poppins", sans-serif;
}

.chatbot-toggler {
	position: fixed;
	right: 40px;
	bottom: 35px;
	height: 50px;
	width: 50px;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	outline: none;
	color: var(--primary-text-color);
	background: var(--primary-bg-color);
	border-radius: 50%;
	cursor: pointer;
	transition: all 0.2s ease;
}

.chatbot-toggler span {
	position: absolute;
}

.show-chatbot .chatbot-toggler {
	transform: rotate(90deg);
}

.show-chatbot .chatbot-toggler span:first-child,
.chatbot-toggler span:last-child {
	opacity: 0;
}

.show-chatbot .chatbot-toggler span:last-child {
	opacity: 1;
}

.chatbot {
	position: fixed;
	right: 40px;
	bottom: 100px;
	width: 420px;
	height: 500px;
	transform: scale(0.5);
	opacity: 0;
	pointer-events: none;
	overflow: hidden;
	background: var(--chatbox-bg-color);
	border-radius: 10px;
	transform-origin: bottom right;
	box-shadow: 0 0 128px 0 rgba(0, 0, 0, 0.1),
		0 32px 64px -48px rgba(0, 0, 0, 0.5);
	transition: all 0.1s ease;
	z-index: 10;
	display: flex;
	flex-direction: column;
}

.show-chatbot .chatbot {
	transform: scale(1);
	opacity: 1;
	pointer-events: auto;
}

.chatbot header {
	background: var(--primary-bg-color);
	padding: 16px 20px;
	text-align: center;
	position: relative;
	border-bottom: 1px solid #bbb;
}

.chatbot header .chatbot-info {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.chatbot header .chatbot-info span {
	background: var(--primary-text-color);
	color: var(--primary-bg-color);
	padding: 5px;
	border-radius: 50%;
	font-size: 32px;
}

.chatbot header .chatbot-info .merchant-logo {
	/* background: #fff; */
	/* padding: 5px; */
	/* border-radius: 50%; */
	width: 42px;
	height: 42px;
	object-fit: contain;
}

.chatbot header .chatbot-info div {
	text-align: left;
}

.chatbot header .chatbot-info div h2 {
	color: var(--primary-text-color);
	font-size: 1.2rem;
	line-height: 24px;
}

.chatbot header .chatbot-info .network-status {
	/* color: lightgray; */
	color: var(--primary-text-color);
	opacity: 0.8;
	font-size: 0.75rem;
}

.chatbot header .chatbot-info .network-status span {
	--network-status-color: rgb(161, 239, 44);
	display: inline-block;
	width: 3px;
	aspect-ratio: 1/1;
	background: var(--network-status-color);
	margin-right: 5px;
}

.chatbot header .close-btn {
	position: absolute;
	right: 20px;
	top: 50%;
	color: var(--primary-text-color);
	cursor: pointer;
	display: none;
	transform: translateY(-50%);
}

.chatbot .chatbox {
	flex-grow: 1;
	overflow-y: auto;
	padding: 30px 20px;
}

.chatbox .chat {
	display: flex;
}

.chatbox .incoming > span {
	height: 32px;
	width: 32px;
	align-self: flex-start;
	color: var(--primary-text-color);
	background: var(--primary-bg-color);
	text-align: center;
	line-height: 32px;
	border-radius: 50%;
	margin: 0 10px 7px 0;
}

.chatbox .incoming .merchant-logo {
	height: 32px;
	width: 32px;
	align-self: flex-start;
	/* background: var(--primary-bg-color); */
	/* border-radius: 50%; */
	margin: 0 10px 7px 0;
	object-fit: contain;
}

.chatbox .outgoing {
	margin: 20px 0;
	justify-content: flex-end;
}

.chatbox .chat p {
	max-width: 75%;
	white-space: pre-wrap;
	font-size: 0.95rem;
	padding: 12px 16px;
	border-radius: 10px 0 10px 10px;
	color: var(--primary-text-color);
	background: var(--primary-bg-color);
}

.chatbox .chat p.error {
	color: var(--error-chat-text-color);
	background: var(--error-chat-bg-color);
}

.chatbox .incoming p {
	color: var(--incoming-chat-text-color);;
	border-radius: 0 10px 10px 10px;
	background: var(--incoming-chat-bg-color);
}

.chatbot .chat-input {
	width: 100%;
	display: flex;
	gap: 5px;
	background: var(--incoming-chat-bg-color);
	padding: 5px 20px;
	border-top: 1px solid #bbb;
}

.chat-input textarea {
	height: 55px;
	width: 100%;
	max-height: 180px;
	border: none;
	outline: none;
	font-size: 0.95rem;
	resize: none;
	padding: 16px 15px 16px 0;
	background: inherit;
	color: var(--incoming-chat-text-color);
}

.chat-input textarea::placeholder {
	color: var(--incoming-chat-text-color);
	opacity: 0.7;
}

.chat-input span {
	align-self: flex-end;
	height: 55px;
	aspect-ratio: 1/1;
	line-height: 55px;
	text-align: center;
	font-size: 1.5rem;
	cursor: pointer;
	visibility: hidden;
	color: var(--primary-text-color);
	background: var(--primary-bg-color);
	border-radius: 50%;
}

.chat-input textarea:valid~span {
	visibility: visible;
}

.chatbot .chatbot-footer {
	background: var(--brand-color);
	padding: 5px 20px;
}

.chatbot .chatbot-footer div {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 5px;
	font-size: 0.8rem;
	color: lightgray;
}

.chatbot .chatbot-footer img {
	height: 16px;
}

.chatbot .chatbot-footer a {
	display: flex;
	align-items: center;
	gap: 2px;
	text-decoration: none;
	color: inherit;
}

@media(max-width: 490px) {
	.chatbot {
		right: 0;
		bottom: 0;
		width: 100%;
		height: 100%;
		border-radius: 0;
	}

	.chatbot header .close-btn {
		display: block;
	}
}

/* Modern Scrollbar for WebKit Browsers (Chrome, Safari, Edge) */
.chatbot .chatbox::-webkit-scrollbar {
	width: 10px;
	/* Width of the scrollbar */
}

.chatbot .chatbox::-webkit-scrollbar-track {
	background: var(--primary-text-color);
	/* Color of the track */
}

.chatbot .chatbox::-webkit-scrollbar-track:hover {
	opacity: 0.8;
	/* Color of the track on hover */
}

.chatbot .chatbox::-webkit-scrollbar-thumb {
	background: var(--primary-bg-color);
	/* Color of the scrollbar thumb */
	border-radius: 5px;
	/* Rounded corners for the thumb */
	border: 2px solid var(--primary-text-color);
	/* Border that creates padding around the thumb */
}

.chatbot .chatbox::-webkit-scrollbar-thumb:hover {
	
	/* Color of the scrollbar thumb on hover */
}

/* Remove scrollbar arrows */
.chatbot .chatbox::-webkit-scrollbar-button {
	display: none;
	/* Hide the arrows */
}

/* CSS for animated 3 dots */
@keyframes blink {
	0%, 100% {
		opacity: 0;
	}
	50% {
		opacity: 1;
	}
}

/* CSS for bouncing 3 dots */
@keyframes bounce {
	0%, 100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-5px);
	}
}

.chatbot-container .thinking-dots {
	display: flex;
	align-items: center;
	gap: 10px
}

.chatbot-container .thinking-dots span {
	display: inline-block;
	width: 10px;
	aspect-ratio: 1/1;
	border-radius: 50%;
	background: var(--primary-bg-color);
	animation: blink 1.4s infinite;
	/* animation: bounce 0.6s infinite ease-in-out; */
}

.chatbot-container .thinking-dots span:nth-child(2) {
	animation-delay: 0.2s;
}

.chatbot-container .thinking-dots span:nth-child(3) {
	animation-delay: 0.4s;
}

