/* AI Chatbot Widget - floating bubble and popup */

.abhcc-chatbot-root {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 999998;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	box-sizing: border-box;
}

.abhcc-chatbot-root *,
.abhcc-chatbot-root *::before,
.abhcc-chatbot-root *::after {
	box-sizing: border-box;
}

/* Bubble button */
.abhcc-chatbot-bubble {
	width: 172px;
	height: 172px;
	border-radius: 50%;
	border: none;
	background: #fff;
	background-color: #fff !important;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	/* Gentle attention animation for better UX */
	animation: abhcc-bubble-pulse 3.5s ease-in-out infinite;
}

.abhcc-chatbot-bubble-img {
	max-width: 100%;
	max-height: 100%;
	display: block;
}

.abhcc-chatbot-bubble:hover {
	transform: scale(1.05);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.abhcc-chatbot-bubble:focus {
	outline: 2px solid var(--abhcc-accent, #2563eb);
	outline-offset: 2px;
}

/* Chat window */
.abhcc-chatbot-window {
	position: absolute;
	bottom: 76px;
	right: 0;
	width: 350px;
	max-width: calc(100vw - 48px);
	height: 500px;
	max-height: calc(100vh - 120px);
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px) scale(0.96);
	transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.abhcc-chatbot-window.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

.abhcc-chatbot-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background: var(--abhcc-accent, #2563eb);
	color: #fff;
	flex-shrink: 0;
}

.abhcc-chatbot-header-title {
	font-weight: 600;
	font-size: 16px;
}

.abhcc-chatbot-close {
	background: transparent;
	border: none;
	color: inherit;
	cursor: pointer;
	padding: 4px !important; 
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	transition: background 0.15s ease;
}

.abhcc-chatbot-close:hover {
	background: rgba(255, 255, 255, 0.2);
}

.abhcc-chatbot-close:focus {
	outline: 2px solid rgba(255, 255, 255, 0.8);
	outline-offset: 2px;
}

/* Messages area */
.abhcc-chatbot-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #f8fafc;
	min-height: 0;
}

.abhcc-chatbot-msg {
	max-width: 88%;
	padding: 10px 14px;
	border-radius: 12px;
	word-wrap: break-word;
	white-space: pre-wrap;
}

.abhcc-chatbot-msg.user {
	align-self: flex-end;
	background: var(--abhcc-accent, #2563eb);
	color: #fff;
	border-bottom-right-radius: 4px;
}

.abhcc-chatbot-msg.bot {
	align-self: flex-start;
	background: #fff;
	color: #1e293b;
	border: 1px solid #e2e8f0;
	border-bottom-left-radius: 4px;
}

.abhcc-chatbot-msg.bot p {
	margin: 0 0 0.5em 0;
}

.abhcc-chatbot-msg.bot p:last-child {
	margin-bottom: 0;
}

.abhcc-chatbot-msg.bot a {
	color: var(--abhcc-accent, #2563eb);
	text-decoration: underline;
}

.abhcc-chatbot-msg.bot a:hover {
	text-decoration: none;
}

/* Quick option buttons (service selection) */
.abhcc-chatbot-quick-options {
	max-width: 100%;
	min-width: 0;
	overflow: hidden;
	min-height : 200px !important
}

.abhcc-quick-title {
	font-size: 12px;
	font-weight: 600;
	color: #475569;
	margin-bottom: 6px;
}

.abhcc-quick-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	min-width: 0;
}

.abhcc-quick-btn {
	border: 1px solid #e2e8f0;
	background: #fff;
	color: #0f172a;
	border-radius: 8px !important;
	padding: 6px 10px !important;
	font-size: 12px;
	line-height: 1.3;
	cursor: pointer;
	transition: transform 0.15s ease, border-color 0.15s ease;
	max-width: 100%;
	white-space: normal;
	word-break: break-word;
	min-width: 0;
}

.abhcc-quick-btn:hover {
	transform: translateY(-1px);
	border-color: var(--abhcc-accent, #2563eb);
}

.abhcc-quick-btn:focus {
	outline: 2px solid var(--abhcc-accent, #2563eb);
	outline-offset: 2px;
}

/* Lead form (discount / contact) inside chat */
.abhcc-chatbot-lead-wrap {
	max-width: 100%;
}

.abhcc-chatbot-lead-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 6px;
}

.abhcc-chatbot-lead-form .abhcc-lead-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.abhcc-chatbot-lead-form label {
	font-size: 13px;
	font-weight: 500;
	color: #475569;
}

.abhcc-chatbot-lead-form .abhcc-required {
	color: #dc2626;
}

.abhcc-chatbot-lead-form input {
	padding: 8px 10px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
}

.abhcc-chatbot-lead-form input:focus {
	outline: none;
	border-color: var(--abhcc-accent, #2563eb);
}

.abhcc-chatbot-lead-form .abhcc-lead-submit {
	margin-top: 4px;
	padding: 10px 16px;
	background: var(--abhcc-accent, #2563eb);
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.abhcc-chatbot-lead-form .abhcc-lead-submit:hover:not(:disabled) {
	opacity: 0.9;
}

.abhcc-chatbot-lead-form .abhcc-lead-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Typing indicator */
.abhcc-chatbot-typing {
	align-self: flex-start;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	border-bottom-left-radius: 4px;
	padding: 14px 18px;
	display: flex;
	gap: 4px;
	align-items: center;
}

.abhcc-chatbot-typing span {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #94a3b8;
	animation: abhcc-bounce 1.4s ease-in-out infinite both;
}

.abhcc-chatbot-typing span:nth-child(1) { animation-delay: 0s; }
.abhcc-chatbot-typing span:nth-child(2) { animation-delay: 0.2s; }
.abhcc-chatbot-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes abhcc-bounce {
	0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
	40% { transform: scale(1); opacity: 1; }
}

/* Subtle pulsing for the chat bubble to attract attention */
@keyframes abhcc-bubble-pulse {
	0% {
		transform: scale(1);
		box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	}
	20% {
		transform: scale(1.06);
		box-shadow: 0 6px 22px rgba(0, 0, 0, 0.32);
	}
	40% {
		transform: scale(1);
		box-shadow: 0 4px 16px rgba(0, 0, 0, 0.26);
	}
	100% {
		transform: scale(1);
		box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	}
}

/* Input area */
.abhcc-chatbot-input-wrap {
	display: flex;
	gap: 8px;
	padding: 12px 16px;
	background: #fff;
	border-top: 1px solid #e2e8f0;
	flex-shrink: 0;
	align-items: flex-end;
}

.abhcc-chatbot-input-wrap.abhcc-chatbot-input-hidden {
	display: none;
}

.abhcc-chatbot-input {
	flex: 1;
	min-height: 44px;
	max-height: 120px;
	padding: 10px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	resize: none;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.4;
	transition: border-color 0.15s ease;
}

.abhcc-chatbot-input:focus {
	outline: none;
	border-color: var(--abhcc-accent, #2563eb);
}

.abhcc-chatbot-input::placeholder {
	color: #94a3b8;
}

.abhcc-chatbot-send {
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	border: none;
	border-radius: 10px;
	background: var(--abhcc-accent, #2563eb);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.abhcc-chatbot-send:hover:not(:disabled) {
	opacity: 0.9;
	transform: scale(1.05);
}

.abhcc-chatbot-send:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.abhcc-chatbot-send:focus {
	outline: 2px solid var(--abhcc-accent, #2563eb);
	outline-offset: 2px;
}
