.tdfw-chatbot {
	position: fixed;
	left: 16px;
	bottom: 104px;
	z-index: 99998;
	font-family: inherit;
	pointer-events: none;
}

.tdfw-chatbot__toggle {
	display: none !important;
	width: 54px;
	height: 54px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, #7c3aed, #4f46e5);
	color: #fff;
	box-shadow: 0 14px 30px rgba(25, 37, 71, 0.24);
	cursor: pointer;
	font-weight: 800;
	letter-spacing: 0.03em;
}

.tdfw-chatbot__toggle-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
}

.tdfw-chatbot__panel {
	position: absolute;
	left: 0;
	bottom: 0;
	width: min(360px, calc(100vw - 32px));
	height: min(560px, calc(100vh - 170px));
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 24px 70px rgba(15, 23, 42, 0.3);
	border: 1px solid rgba(15, 23, 42, 0.08);
	pointer-events: auto;
}

.tdfw-chatbot__panel[hidden] {
	display: none !important;
}

.tdfw-chatbot__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 18px;
	background: #173b72;
	color: #fff;
}

.tdfw-chatbot__header strong,
.tdfw-chatbot__header span {
	display: block;
}

.tdfw-chatbot__header span {
	margin-top: 2px;
	font-size: 12px;
	opacity: 0.82;
}

.tdfw-chatbot__close {
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 34px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	cursor: pointer;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 22px;
	font-weight: 400;
	line-height: 1;
	padding: 0;
	text-align: center;
	appearance: none;
	-webkit-appearance: none;
}

.tdfw-chatbot__close:hover,
.tdfw-chatbot__close:focus {
	background: rgba(255, 255, 255, 0.18);
	border-color: rgba(255, 255, 255, 0.45);
	outline: none;
}

.tdfw-chatbot__messages {
	flex: 1;
	overflow-y: auto;
	padding: 18px;
	background: #eef3fb;
}

.tdfw-chatbot__bubble {
	width: fit-content;
	max-width: 88%;
	margin: 0 0 10px;
	padding: 10px 13px;
	border-radius: 16px;
	font-size: 14px;
	line-height: 1.45;
}

.tdfw-chatbot__bubble--bot {
	background: #fff;
	color: #172033;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-bottom-left-radius: 5px;
}

.tdfw-chatbot__bubble--user {
	margin-left: auto;
	background: #2e59a7;
	color: #fff;
	border-bottom-right-radius: 5px;
}

.tdfw-chatbot__quick {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 10px 0 4px;
}

.tdfw-chatbot__quick--grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.tdfw-chatbot__quick--grid .tdfw-chatbot__quick-btn {
	border-radius: 12px;
	padding: 12px 10px;
	text-align: center;
	line-height: 1.25;
	min-height: 44px;
}

.tdfw-chatbot__quick-btn {
	border: 1px solid rgba(46, 89, 167, 0.45);
	border-radius: 999px;
	background: #fff;
	color: #173b72;
	padding: 8px 10px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 700;
}

.tdfw-chatbot__quick-btn:hover,
.tdfw-chatbot__quick-btn:focus {
	background: #173b72;
	border-color: #173b72;
	color: #fff;
	outline: none;
}

.tdfw-chatbot__hint {
	margin: 0;
	padding: 6px 18px 0;
	font-size: 12px;
	color: #64748b;
	text-align: center;
	background: #eef3fb;
}

.tdfw-chatbot__hint[hidden] {
	display: none;
}

.tdfw-chatbot__lead {
	margin: 12px 0 8px;
	padding: 14px;
	border-radius: 16px;
	background: #fff;
	border: 1px solid rgba(23, 59, 114, 0.12);
	box-shadow: 0 8px 24px rgba(23, 59, 114, 0.08);
}

.tdfw-chatbot__lead-label {
	display: block;
	margin-bottom: 10px;
	font-size: 12px;
	font-weight: 700;
	color: #173b72;
}

.tdfw-chatbot__lead-label span {
	display: block;
	margin-bottom: 4px;
}

.tdfw-chatbot__lead-input,
.tdfw-chatbot__lead-textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid rgba(15, 23, 42, 0.14);
	border-radius: 10px;
	padding: 10px 11px;
	font-size: 14px;
	font-family: inherit;
}

.tdfw-chatbot__lead-textarea {
	resize: vertical;
	min-height: 44px;
}

.tdfw-chatbot__lead-input:focus,
.tdfw-chatbot__lead-textarea:focus {
	border-color: #173b72;
	outline: none;
	box-shadow: 0 0 0 3px rgba(23, 59, 114, 0.12);
}

.tdfw-chatbot__lead-submit {
	width: 100%;
	margin-top: 12px;
	padding: 12px 14px;
	border: 0;
	border-radius: 12px;
	background: #f58220;
	color: #fff;
	font-size: 15px;
	font-weight: 800;
	cursor: pointer;
}

.tdfw-chatbot__lead-submit:hover,
.tdfw-chatbot__lead-submit:focus {
	background: #e07012;
	outline: none;
}

.tdfw-chatbot--lead .tdfw-chatbot__form {
	opacity: 0.45;
	pointer-events: none;
}

.tdfw-chatbot__form {
	display: flex;
	gap: 8px;
	padding: 12px;
	background: #fff;
	border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.tdfw-chatbot__input {
	flex: 1;
	min-width: 0;
	border: 1px solid rgba(15, 23, 42, 0.14);
	border-radius: 999px;
	padding: 10px 13px;
	font-size: 14px;
}

.tdfw-chatbot__input:focus {
	border-color: #173b72;
	outline: none;
	box-shadow: 0 0 0 3px rgba(23, 59, 114, 0.12);
}

.tdfw-chatbot__send {
	border: 0;
	border-radius: 999px;
	background: #f58220;
	color: #fff;
	padding: 0 16px;
	font-weight: 800;
	cursor: pointer;
}

.tdfw-chatbot__honey {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(1px, 1px, 1px, 1px) !important;
	white-space: nowrap !important;
}

@media (max-width: 360px) {
	.tdfw-chatbot__quick--grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 544px) {
	.tdfw-chatbot {
		left: 14px;
		bottom: 86px;
	}

	.tdfw-chatbot__panel {
		height: min(560px, calc(100vh - 135px));
	}
}
