/* Chat widget styles */
.chat-widget {
	position: fixed;
	right: 1.5rem;
	bottom: 1.5rem; /* reduced gap from bottom */
	z-index: 70;
	pointer-events: none; /* disabled when closed */
}

.chat-card {
	width: 340px;
	max-width: calc(100vw - 2rem);
	background: rgb(var(--bg-card));
	border: 1px solid rgba(var(--border-color), 0.15);
	border-radius: 12px;
	box-shadow: 0 12px 30px rgba(0,0,0,0.25);
	overflow: hidden;
	transform: translateY(12px);
	opacity: 0;
	transition: all 0.2s ease;
}

.chat-widget.open {
	pointer-events: auto;
}

.chat-widget.open .chat-card {
	transform: translateY(0);
	opacity: 1;
}

.chat-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 14px;
	background: #1e40af; /* blue-800 */
	color: #fff;
}

.chat-title {
	font-weight: 600;
}

.chat-sub {
	font-size: 12px;
	opacity: 0.85;
}

.chat-close {
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 20px;
	cursor: pointer;
}

.chat-body {
	padding: 14px;
}

.chat-greet {
	margin: 0 0 8px 0;
	max-width: 80%;
	align-self: flex-start;
	padding: 8px 10px;
	border-radius: 12px 12px 12px 4px;
	font-size: 13px;
	line-height: 1.4;
	background: #e0f2fe; /* light blue for Altanor intro */
	color: #0f172a;
}

/* Removed unused .chat-reply and .chat-quick-title */

.chat-quick-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.chat-quick {
	padding: 6px 10px;
	font-size: 13px;
	border-radius: 9999px;
	border: 1px solid rgba(var(--border-color), 0.3);
	background: rgba(var(--text-main), 0.04);
	color: rgb(var(--text-main));
	cursor: pointer;
}

.chat-quick:hover {
	background: rgba(var(--primary-blue), 0.12);
	border-color: rgba(var(--primary-blue), 0.35);
}

.chat-quick-secondary {
	background: transparent;
	border-style: dashed;
	border-color: rgba(var(--border-color), 0.4);
	color: rgb(var(--text-muted));
}

.chat-quick-secondary:hover {
	background: rgba(var(--text-main), 0.02);
	border-color: rgba(var(--primary-blue), 0.4);
}

.chat-input-row {
	display: flex;
	gap: 8px;
	padding-top: 6px;
}

.chat-input {
	flex: 1;
	height: 40px;
	border-radius: 6px;
	border: 1px solid rgba(var(--border-color), 0.35);
	background: rgba(var(--bg-main), 1);
	color: rgb(var(--text-main));
	padding: 0 12px;
}

.chat-send {
	width: 44px;
	height: 40px;
	border-radius: 6px;
	border: none;
	background: #1e40af;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.chat-send:hover {
	background: #1a35a0;
}

.chat-conversation {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 10px;
}

#chatMessages {
	display: flex;
	flex-direction: column;
	gap: 6px; /* little gap between conversation lines */
	max-height: 260px;
	overflow-y: auto;
	padding-right: 4px;
}

.chat-bubble {
	max-width: 80%;
	padding: 8px 10px;
	border-radius: 10px;
	font-size: 13px;
	line-height: 1.4;
}

.chat-bubble-bot {
	align-self: flex-start;
	background: #eef2ff; /* soft indigo for Altanor */
	color: #0f172a;
	border-radius: 12px 12px 12px 4px;
	border: 1px solid #e0e7ff;
}

.chat-bubble-user {
	align-self: flex-end;
	background: #1e40af; /* brand blue for client */
	color: #fff;
	border-radius: 12px 12px 4px 12px;
}

@media (max-width: 640px) {
	.chat-widget {
		right: 1rem;
		bottom: 1rem; /* reduced gap for mobile */
	}

	.chat-card {
		width: 92vw;
	}
}
