/* TMGI Lead Agent Chat Widget Styles */

#tmgi-lead-widget {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	position: fixed;
	bottom: 25px;
	right: 25px;
	z-index: 999999;
	display: block;
}

/* Floating Bubble */
#tmgi-chat-bubble {
	display: flex;
	align-items: center;
	gap: 10px;
	background-color: #0f172a;
	color: #ffffff;
	border: 2px solid #d97706;
	border-radius: 50px;
	padding: 12px 20px;
	cursor: pointer;
	box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.3), 0 4px 6px -4px rgba(15, 23, 42, 0.3);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	outline: none;
	user-select: none;
}

#tmgi-chat-bubble:hover {
	transform: translateY(-4px) scale(1.02);
	background-color: #1e293b;
	box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.4), 0 8px 10px -6px rgba(15, 23, 42, 0.4);
}

.tmgi-bubble-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	animation: tmgi-bounce 2s infinite;
}

.tmgi-bubble-text {
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0.5px;
	white-space: nowrap;
}

/* Chat Window Container */
#tmgi-chat-window {
	position: absolute;
	bottom: 75px;
	right: 0;
	width: 380px;
	height: 580px;
	background-color: #ffffff;
	border-radius: 16px;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
	border: 1px solid #e2e8f0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	transform: scale(0.9) translateY(20px);
	pointer-events: none;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Open / Closed Widget states */
.tmgi-widget-open #tmgi-chat-window {
	opacity: 1;
	transform: scale(1) translateY(0);
	pointer-events: auto;
}

.tmgi-widget-open #tmgi-chat-bubble {
	opacity: 0;
	transform: scale(0.8) translateY(20px);
	pointer-events: none;
}

/* Header */
.tmgi-chat-header {
	background-color: #0f172a;
	padding: 16px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 3px solid #d97706;
}

.tmgi-header-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.tmgi-avatar {
	position: relative;
	width: 40px;
	height: 40px;
	background-color: #d97706;
	color: #ffffff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.5px;
}

.tmgi-status-dot {
	position: absolute;
	bottom: 0;
	right: 0;
	width: 10px;
	height: 10px;
	background-color: #22c55e;
	border: 2px solid #0f172a;
	border-radius: 50%;
}

.tmgi-header-info h3 {
	margin: 0;
	color: #ffffff;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
}

.tmgi-header-info p {
	margin: 2px 0 0 0;
	color: #94a3b8;
	font-size: 12px;
	line-height: 1;
}

#tmgi-chat-close {
	background: transparent;
	border: none;
	color: #94a3b8;
	font-size: 28px;
	cursor: pointer;
	padding: 0;
	line-height: 1;
	transition: color 0.2s ease;
}

#tmgi-chat-close:hover {
	color: #ffffff;
}

/* Progress bar container */
.tmgi-progress-container {
	height: 4px;
	background-color: #e2e8f0;
	width: 100%;
}

.tmgi-progress-bar {
	height: 100%;
	background-color: #d97706;
	width: 0;
	transition: width 0.3s ease;
}

/* Form / Scrollable Body */
.tmgi-chat-body {
	flex: 1;
	padding: 24px;
	overflow-y: auto;
	background-color: #f8fafc;
	display: flex;
	flex-direction: column;
}

#tmgi-lead-form {
	display: flex;
	flex-direction: column;
	height: 100%;
	justify-content: space-between;
}

/* Wizard Steps styling */
.tmgi-step {
	display: none;
	flex-direction: column;
	animation: tmgi-fade-in 0.3s ease-in-out forwards;
}

.tmgi-step-active {
	display: flex;
}

.tmgi-question {
	color: #0f172a;
	font-size: 16px;
	font-weight: 600;
	margin-top: 0;
	margin-bottom: 20px;
	line-height: 1.4;
}

/* Input Fields styling */
.tmgi-step input[type="text"],
.tmgi-step input[type="tel"],
.tmgi-step input[type="email"],
.tmgi-step textarea {
	width: 100%;
	padding: 12px 16px;
	border: 1.5px solid #cbd5e1;
	border-radius: 8px;
	font-size: 15px;
	color: #0f172a;
	background-color: #ffffff;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
	transition: all 0.2s ease;
	box-sizing: border-box;
}

.tmgi-step input:focus,
.tmgi-step textarea:focus {
	border-color: #d97706;
	outline: none;
	box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.tmgi-step textarea {
	resize: none;
}

/* Service Options Grid */
.tmgi-options-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
	max-height: 270px;
	overflow-y: auto;
	padding-right: 4px;
}

/* Custom Scrollbar for options container */
.tmgi-options-grid::-webkit-scrollbar,
.tmgi-chat-body::-webkit-scrollbar {
	width: 5px;
}
.tmgi-options-grid::-webkit-scrollbar-track,
.tmgi-chat-body::-webkit-scrollbar-track {
	background: transparent;
}
.tmgi-options-grid::-webkit-scrollbar-thumb,
.tmgi-chat-body::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 4px;
}

.tmgi-opt-btn {
	background-color: #ffffff;
	border: 1.5px solid #e2e8f0;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 14px;
	font-weight: 500;
	color: #334155;
	text-align: left;
	cursor: pointer;
	transition: all 0.2s ease;
}

.tmgi-opt-btn:hover {
	border-color: #d97706;
	background-color: #fffbeb;
	color: #d97706;
}

.tmgi-opt-btn.tmgi-selected {
	border-color: #d97706;
	background-color: #d97706;
	color: #ffffff;
}

/* Stacks options (vertical) */
.tmgi-options-stack {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.tmgi-opt-btn-stack {
	background-color: #ffffff;
	border: 1.5px solid #e2e8f0;
	border-radius: 8px;
	padding: 12px 16px;
	font-size: 14px;
	font-weight: 500;
	color: #334155;
	text-align: left;
	cursor: pointer;
	transition: all 0.2s ease;
}

.tmgi-opt-btn-stack:hover {
	border-color: #d97706;
	background-color: #fffbeb;
	color: #d97706;
}

.tmgi-opt-btn-stack.tmgi-selected {
	border-color: #d97706;
	background-color: #d97706;
	color: #ffffff;
}

/* Suggestion Chips */
.tmgi-chips-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.tmgi-chip-btn {
	background-color: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 20px;
	padding: 6px 14px;
	font-size: 13px;
	color: #475569;
	cursor: pointer;
	transition: all 0.2s ease;
}

.tmgi-chip-btn:hover {
	border-color: #d97706;
	color: #d97706;
	background-color: #fffbeb;
}

/* Disclaimer UI Box */
.tmgi-disclaimer-box {
	display: flex;
	background-color: #eff6ff;
	border: 1px solid #bfdbfe;
	color: #1e3a8a;
	border-radius: 8px;
	padding: 12px;
	margin-top: 15px;
	font-size: 13px;
	line-height: 1.4;
	align-items: flex-start;
}

/* Thank you Screen styling */
.tmgi-thank-you-screen {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 20px 0;
}

.tmgi-success-icon {
	width: 72px;
	height: 72px;
	background-color: #dcfce7;
	color: #15803d;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 20px;
}

.tmgi-thank-you-screen h4 {
	font-size: 22px;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 10px 0;
}

.tmgi-thank-you-screen p {
	font-size: 15px;
	color: #475569;
	margin: 0 0 20px 0;
	line-height: 1.5;
}

.tmgi-disclaimer-success {
	font-size: 13px;
	color: #d97706;
	background-color: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 8px;
	padding: 12px;
	margin-bottom: 25px;
	line-height: 1.4;
	font-weight: 500;
}

.tmgi-reset-btn {
	background-color: #0f172a;
	color: #ffffff;
	border: 2px solid #0f172a;
	padding: 12px 24px;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	width: 100%;
}

.tmgi-reset-btn:hover {
	background-color: #d97706;
	border-color: #d97706;
}

/* Footer / Navigation Area */
.tmgi-chat-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 25px;
	padding-top: 15px;
	border-top: 1px solid #e2e8f0;
}

.tmgi-nav-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.tmgi-disabled-btn {
	background-color: #f1f5f9;
	color: #94a3b8;
	border: 1px solid #e2e8f0;
	cursor: not-allowed;
}

.tmgi-primary-btn {
	background-color: #0f172a;
	color: #ffffff;
	border: 1.5px solid #0f172a;
}

.tmgi-primary-btn:hover {
	background-color: #d97706;
	border-color: #d97706;
}

/* Animations */
@keyframes tmgi-bounce {
	0%, 100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-5px);
	}
}

@keyframes tmgi-fade-in {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Mobile Screens Adaptation */
@media (max-width: 480px) {
	#tmgi-lead-widget {
		bottom: 15px;
		right: 15px;
	}

	#tmgi-chat-window {
		position: fixed;
		bottom: 0;
		right: 0;
		left: 0;
		top: 0;
		width: 100vw;
		height: 100vh;
		border-radius: 0;
		border: none;
	}
	
	.tmgi-chat-body {
		padding: 20px;
	}
	
	.tmgi-options-grid {
		max-height: calc(100vh - 290px);
	}
}
