@charset "utf-8";
/* Chatbot overlay styles */
.chatbot-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.4);
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 1000;
	animation: fadeIn 0.3s ease-in-out;
}

.chatbot-overlay.active {
	display: flex;
}

.chat-container {
	--chat-width: 	450px;
	--chat-height: 	650px;
	--chat-border: 	20px;
	--hd-size: 		18px;
	--font-size: 	15px;
	--btn-size: 	15px;
	--link-btn-size:14px;
}
.chat-container {
	width: var(--chat-width);
	height: var(--chat-height);
	animation: slideIn 0.3s ease-out;
	position: relative;
}
.chat-box {
	width: var(--chat-width);
	height: var(--chat-height);
	background: white;
	border-radius: var(--chat-border);
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.chat-header {
	background: linear-gradient(135deg, #1976D2, #1565C0);
	color: white;
	padding: 1em;
	text-align: center;
	font-size: var(--hd-size);
	font-weight: bold;
	position: relative;
}

.close-chat {
	position: absolute;
	top: -1.5em;
	right: -1em;
	background: #1565C0;
	border: none;
	color: white;
	font-size: 1.3em;
	cursor: pointer;
	width: 1.5em;
	height: 1.5em;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background-color 0.3s ease;
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.close-chat:hover {
	background:#C00;
}

.chat-messages {
	flex: 1;
	padding: 2em 1em 1em;
	overflow-y: auto;
	background: #f8f9fa;
}

.message {
	margin-bottom: 1em;
	animation: fadeIn 0.3s ease-in;
}

.bot-message {
	background: #e3f2fd;
	padding: 1em;
	border-radius: 1em;
	border-left: 4px solid #2196F3;
	margin-bottom: 1em;
	font-size: var(--font-size);
	line-height: 1.5;
}

.options-container {
	display: flex;
	flex-direction: column;
	gap: 1em;
	margin-top: 1em;
}

.option-button {
	background: #2196F3;
	color: white;
	border: none;
	padding: 12px 16px;
	border-radius: 25px;
	cursor: pointer;
	font-size: var(--font-size);
	transition: all 0.3s ease;
	text-align: left;
}

.option-button:hover {
	background: #1976D2;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.user-response {
	background: #4CAF50;
	color: white;
	padding: 12px 16px;
	border-radius: 18px;
	margin: 10px 0;
	font-size: var(--font-size);
	display: inline-block;
	border-bottom-right-radius: 4px;
	animation: fadeIn 0.3s ease-in;
}

.options-container.hidden {
	display: none;
}

.info-message {
	background: #fff3cd;
	border: 1px solid #ffeaa7;
	color: #856404;
	padding: 15px;
	border-radius: 10px;
	margin: 10px 0;
	font-size: var(--hd-size);
}

.link-btns { margin:1em 0; }
.link-button {
	background: #4CAF50;
	color: white;
	border: none;
	padding: 10px 16px;
	border-radius: 20px;
	cursor: pointer;
	font-size: var(--link-btn-size);
	margin: 5px 5px 5px 0;
	text-decoration: none;
	display: inline-block;
	transition: background-color 0.3s ease;
}

.link-button:hover {
	background: #45a049;
}

.restart-button {
	background: #ff9800;
	color: white;
	border: none;
	padding: 10px 20px;
	border-radius: 20px;
	cursor: pointer;
	font-size: var(--link-btn-size);
	margin-top: 15px;
	transition: background-color 0.3s ease;
}

.restart-button:hover {
	background: #f57c00;
}

.typing-indicator {
	display: none;
	padding: 10px 16px;
	background: #e9ecef;
	border-radius: 18px;
	margin-bottom: 15px;
	width: fit-content;
}

.typing-dots {
	display: inline-flex;
	align-items: center;
}

.typing-dots span {
	height: 0.5em;
	width: 0.5em;
	background: #666;
	border-radius: 50%;
	display: inline-block;
	margin: 0 2px;
	animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

/* Floating chat button 
.floating-chat-btn {
	width: 60px;
	height: 60px;
	background: url(../images/icon/chatbot.png) no-repeat center;
	cursor: pointer;
	transition: all 0.3s ease;
}*/
.floating-chat-btn {
	position: relative;
	width: 60px;
	height: 45px;
	background: #009EE2;
	border-radius: 15px;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 5px;
	box-shadow: 0 4px 20px rgba(66, 133, 244, 0.3);
	cursor: pointer;
	transition: all 0.3s ease;
}

.floating-chat-btn::after {
	content: '';
	position: absolute;
	bottom: -6px;
	left: 12px;
	width: 0;
	height: 0;
	border-left: 9px solid transparent;
	border-right: 9px solid transparent;
	border-top: 9px solid #009EE2;
	transition: all 0.3s ease;
}

.dot {
	width: 7px;
	height: 7px;
	background-color: white;
	border-radius: 50%;
	animation: pulse 1.5s ease-in-out infinite;
}

.dot:nth-child(1) {
	animation-delay: 0s;
}

.dot:nth-child(2) {
	animation-delay: 0.2s;
}

.dot:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.7;
		transform: scale(0.9);
	}
}

.floating-chat-btn:hover {
	background: #238C00;
	transform: scale(1.1);
}
.floating-chat-btn:hover::after { border-top-color:#238C00; }

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
	from { opacity: 0; transform: scale(0.8); }
	to { opacity: 1; transform: scale(1); }
}

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

/* Responsive design */
@media (max-width: 1000px) {
	.chat-container {
		--chat-width: 	420px;
		--chat-height: 	80vh;
		--chat-border: 	18px;
		--hd-size: 		17px;
		--font-size: 	14px;
		--btn-size: 	14px;
		--link-btn-size:13px;
	}
	
	.floating-chat-btn {
		width: 50px;
		height: 38px;
		border-radius: 14px;
		gap: 4px;
	}
	.floating-chat-btn::after {
		bottom: -5px;
		left: 10px;
		border-width: 8px;
	}
	.dot {
		width: 6px;
		height: 6px;
	}
}

/* Responsive design */
@media (max-width: 500px) {
	.chat-container {
		--chat-width: 	90vw;
		--chat-height: 	80vh;
		--chat-border: 	16px;
		--hd-size: 		15px;
		--font-size: 	13px;
		--btn-size: 	13px;
		--link-btn-size:12px;
	}
	
	.close-chat { right: -0.3em; top:-1.8em; }
	
	.chat-triggers {
		flex-direction: column;
		align-items: center;
	}
	
	.floating-chat-btn {
		width: 40px;
		height: 33px;
		border-radius: 13px;
		gap: 3px;
	}
	.floating-chat-btn::after {
		bottom: -4px;
		left: 8px;
		border-width: 7px;
	}
	.dot {
		width: 5px;
		height: 5px;
	}
}