.faso-ai-chat {
	position: fixed;
	right: 22px;
	bottom: var(--faso-ai-chat-bottom-offset, 22px);
	z-index: 1000000;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #1f2937;
	pointer-events: none;
}

.faso-ai-chat--bottom_right {
	right: 22px;
	bottom: var(--faso-ai-chat-bottom-offset, 22px);
	left: auto;
	top: auto;
}

.faso-ai-chat--bottom_left {
	left: 22px;
	bottom: var(--faso-ai-chat-bottom-offset, 22px);
	right: auto;
	top: auto;
}

.faso-ai-chat--bottom_left .faso-ai-chat__launcher {
	left: 22px;
	right: auto;
}

.faso-ai-chat--bottom_left .faso-ai-chat__panel {
	left: 22px;
	right: auto;
}

.faso-ai-chat--top_right {
	right: 22px;
	top: 42px;
	left: auto;
	bottom: auto;
}

.faso-ai-chat--top_right .faso-ai-chat__launcher {
	top: calc(42px + env(safe-area-inset-top, 0px));
	bottom: auto;
}

.faso-ai-chat--top_right .faso-ai-chat__panel {
	top: calc(124px + env(safe-area-inset-top, 0px));
	bottom: auto;
}

.faso-ai-chat--top_left {
	left: 22px;
	top: 42px;
	right: auto;
	bottom: auto;
}

.faso-ai-chat--top_left .faso-ai-chat__launcher {
	left: 22px;
	right: auto;
	top: calc(42px + env(safe-area-inset-top, 0px));
	bottom: auto;
}

.faso-ai-chat--top_left .faso-ai-chat__panel {
	left: 22px;
	right: auto;
	top: calc(124px + env(safe-area-inset-top, 0px));
	bottom: auto;
}

.faso-ai-chat * {
	box-sizing: border-box;
}

.faso-ai-chat__launcher {
	position: fixed;
	right: 22px;
	bottom: calc(var(--faso-ai-chat-bottom-offset, 22px) + env(safe-area-inset-bottom, 0px));
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	width: 68px;
	height: 68px;
	border: 0;
	border-radius: 999px;
	background: #2f55e7;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	box-shadow: 0 14px 36px rgba(47, 85, 231, 0.35);
	cursor: pointer;
	pointer-events: auto;
	z-index: 1000001;
}

.faso-ai-chat__launcher-icon {
	display: block;
	font-size: 20px;
	line-height: 1;
}

.faso-ai-chat__launcher.has-image {
	width: 76px;
	height: 76px;
	padding: 0;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	box-shadow: 0 16px 36px rgba(70, 62, 190, 0.28);
	overflow: visible;
}

.faso-ai-chat__launcher-image {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 999px;
	object-fit: cover;
	background: #fff;
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.78);
}

.faso-ai-chat__panel {
	position: fixed;
	right: 22px;
	bottom: calc(var(--faso-ai-chat-bottom-offset, 22px) + 82px + env(safe-area-inset-bottom, 0px));
	display: none;
	width: min(420px, calc(100vw - 28px));
	max-height: min(680px, calc(100dvh - 126px));
	border: 1px solid rgba(37, 99, 235, 0.18);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
	overflow: hidden;
	pointer-events: auto;
	z-index: 1000002;
}

.faso-ai-chat[data-open="1"] .faso-ai-chat__panel {
	display: flex;
	flex-direction: column;
}

.faso-ai-chat[data-open="1"] .faso-ai-chat__launcher {
	display: none;
}

body.faso-ai-chat-open .hotline-phone-ring-wrap,
body.faso-ai-chat-open .hotline-phone-ring,
body.faso-ai-chat-open .float-contact,
body.faso-ai-chat-open .floating-contact,
body.faso-ai-chat-open .button-contact,
body.faso-ai-chat-open .call-now-button,
body.faso-ai-chat-open .zalo-container,
body.faso-ai-chat-open .zalo-chat-widget,
body.faso-ai-chat-open .fb_dialog {
	opacity: 0 !important;
	pointer-events: none !important;
}

.faso-ai-chat__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	min-height: 76px;
	padding: 14px 16px;
	background: linear-gradient(135deg, #2f86e9 0%, #2559df 100%);
	color: #fff;
}

.faso-ai-chat__brand {
	display: flex;
	align-items: center;
	gap: 11px;
	min-width: 0;
}

.faso-ai-chat__brand-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 42px;
	width: 42px;
	height: 42px;
	border-radius: 999px;
	background: #fff;
	object-fit: cover;
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
	font-size: 22px;
}

.faso-ai-chat__brand strong {
	display: block;
	overflow: hidden;
	font-size: 18px;
	line-height: 1.2;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.faso-ai-chat__brand small {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 3px;
	color: rgba(255, 255, 255, 0.92);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
}

.faso-ai-chat__brand small i {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: #4ade80;
	box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2);
}

.faso-ai-chat__header-actions {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 8px;
}

.faso-ai-chat__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	min-width: 46px;
	min-height: 46px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 13px;
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	font-family: inherit;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.faso-ai-chat__close:hover {
	background: rgba(255, 255, 255, 0.26);
}

.faso-ai-chat__body {
	flex: 1;
	min-height: 0;
	padding: 26px 18px 18px;
	background: linear-gradient(180deg, #fff 0%, #fff 36%, #f5f8ff 100%);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
}

.faso-ai-chat__intro {
	display: grid;
	justify-items: center;
	gap: 14px;
	margin: 16px auto 26px;
	text-align: center;
}

.faso-ai-chat__intro img,
.faso-ai-chat__intro > span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 92px;
	height: 92px;
	border-radius: 999px;
	background: linear-gradient(135deg, #1f6fe5, #244ad7);
	object-fit: cover;
	box-shadow: 0 18px 34px rgba(37, 99, 235, 0.24);
	font-size: 44px;
}

.faso-ai-chat__intro p {
	max-width: 350px;
	margin: 0;
	color: #2b2f38;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.38;
}

.faso-ai-chat__time {
	margin: 4px 0 16px;
	color: #64748b;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
}

.faso-ai-chat__bot-row {
	display: flex;
	align-items: flex-end;
	gap: 9px;
	margin-bottom: 14px;
}

.faso-ai-chat__bot-row img {
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	border-radius: 999px;
	object-fit: cover;
	box-shadow: 0 6px 14px rgba(37, 99, 235, 0.18);
}

.faso-ai-chat__form {
	display: grid;
	gap: 9px;
	margin-top: 12px;
	padding: 14px;
	border: 1px solid #e6ecf5;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.faso-ai-chat__form input,
.faso-ai-chat__form textarea,
.faso-ai-chat__composer input {
	width: 100%;
	border: 1px solid #d9e2ef;
	border-radius: 14px;
	padding: 12px 14px;
	background: #fff;
	color: #111827;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.4;
	outline: none;
	box-shadow: none;
}

.faso-ai-chat__form input:focus,
.faso-ai-chat__form textarea:focus,
.faso-ai-chat__composer input:focus {
	border-color: #2f55e7;
	box-shadow: 0 0 0 3px rgba(47, 85, 231, 0.12);
}

.faso-ai-chat__status {
	min-height: 18px;
	color: #64748b;
	font-size: 12px;
	line-height: 1.45;
}

.faso-ai-chat__status.is-error {
	color: #b91c1c;
}

.faso-ai-chat__status.is-ok {
	color: #047857;
}

.faso-ai-chat__form button,
.faso-ai-chat__composer button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #2563eb;
	border-radius: 15px;
	padding: 12px 16px;
	background: linear-gradient(135deg, #2f86e9, #2f55e7);
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.3;
	font-weight: 700;
	cursor: pointer;
	box-shadow: none;
}

.faso-ai-chat__messages {
	display: grid;
	gap: 10px;
}

.faso-ai-chat__bubble {
	max-width: 86%;
	margin-bottom: 10px;
	padding: 12px 15px;
	border-radius: 18px;
	font-size: 14px;
	line-height: 1.45;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.faso-ai-chat__bubble a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	overflow-wrap: anywhere;
	word-break: break-all;
}

.faso-ai-chat__bubble.is-bot a {
	color: #1f46d6;
}

.faso-ai-chat__bubble.is-bot {
	margin-right: auto;
	border-bottom-left-radius: 8px;
	background: #f0f3f8;
	border: 1px solid #edf1f7;
	color: #1f2937;
}

.faso-ai-chat__bubble.is-greeting {
	width: auto;
	max-width: calc(100% - 44px);
	margin-bottom: 0;
	text-align: left !important;
	text-align-last: left;
}

.faso-ai-chat__bot-row .faso-ai-chat__bubble {
	text-align: left !important;
	text-align-last: left;
}

.faso-ai-chat__bubble.is-user {
	margin-left: auto;
	border-bottom-right-radius: 8px;
	background: linear-gradient(135deg, #2f86e9, #2f55e7);
	color: #fff;
}

.faso-ai-chat__suggestions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: -2px 0 14px;
	padding-left: 44px;
}

.faso-ai-chat__suggestion {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	max-width: 100%;
	border: 1px solid #c7d7fe;
	border-radius: 999px;
	padding: 8px 12px;
	background: #fff;
	color: #1f46d6;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.25;
	text-align: left;
	cursor: pointer;
	box-shadow: 0 6px 16px rgba(37, 99, 235, 0.08);
}

.faso-ai-chat__suggestion:hover,
.faso-ai-chat__suggestion:focus {
	border-color: #2f55e7;
	background: #eef4ff;
	color: #1e3fc8;
	outline: none;
}

.faso-ai-chat__composer {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 52px;
	gap: 9px;
	padding: 14px 16px 16px;
	border-top: 1px solid #e6ecf5;
	background: #fff;
}

.faso-ai-chat__composer input {
	min-height: 52px;
	border-color: #2563eb;
	border-radius: 999px;
	padding-left: 18px;
	background: #f8fafc;
	font-size: 16px;
}

.faso-ai-chat__composer button {
	width: 52px;
	height: 52px;
	min-width: 52px;
	padding: 0;
	border-radius: 999px;
	font-size: 23px;
	line-height: 1;
}

.faso-ai-chat__composer[hidden],
.faso-ai-chat__messages[hidden],
.faso-ai-chat__form[hidden] {
	display: none;
}

.faso-ai-chat.is-loading button {
	opacity: 0.72;
	pointer-events: none;
}

@media (max-width: 480px) {
	.faso-ai-chat {
		right: 0;
		bottom: 0;
	}

	.faso-ai-chat--bottom_right {
		right: 14px;
		bottom: var(--faso-ai-chat-bottom-offset, 14px);
	}

	.faso-ai-chat--bottom_left {
		left: 14px;
		bottom: var(--faso-ai-chat-bottom-offset, 14px);
	}

	.faso-ai-chat--top_right {
		right: 14px;
		top: 14px;
	}

	.faso-ai-chat--top_left {
		left: 14px;
		top: 14px;
	}

	.faso-ai-chat__panel {
		left: 12px;
		right: 12px;
		top: calc(12px + env(safe-area-inset-top, 0px));
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		width: auto;
		max-height: none;
		border-radius: 16px;
	}

	.faso-ai-chat--bottom_right .faso-ai-chat__panel,
	.faso-ai-chat--bottom_left .faso-ai-chat__panel {
		left: 12px;
		right: 12px;
		top: calc(12px + env(safe-area-inset-top, 0px));
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		width: auto;
	}

	.faso-ai-chat--top_right .faso-ai-chat__panel,
	.faso-ai-chat--top_left .faso-ai-chat__panel {
		left: 12px;
		right: 12px;
		top: calc(12px + env(safe-area-inset-top, 0px));
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		width: auto;
	}

	.faso-ai-chat__launcher {
		right: 14px;
		bottom: calc(var(--faso-ai-chat-bottom-offset, 14px) + env(safe-area-inset-bottom, 0px));
		width: 60px;
		height: 60px;
	}

	.faso-ai-chat__launcher.has-image {
		width: 66px;
		height: 66px;
	}

	.faso-ai-chat__header {
		min-height: 68px;
		padding: 11px 12px;
	}

	.faso-ai-chat__brand {
		gap: 8px;
	}

	.faso-ai-chat__brand-avatar {
		flex-basis: 36px;
		width: 36px;
		height: 36px;
	}

	.faso-ai-chat__brand strong {
		font-size: 16px;
	}

	.faso-ai-chat__brand small {
		font-size: 12px;
	}

	.faso-ai-chat__header-actions {
		gap: 6px;
	}

	.faso-ai-chat__close {
		width: 40px;
		height: 40px;
		min-width: 40px;
		min-height: 40px;
		border-radius: 11px;
	}

	.faso-ai-chat__body {
		padding: 18px 14px 14px;
	}

	.faso-ai-chat__intro {
		margin: 8px auto 18px;
	}

	.faso-ai-chat__intro img,
	.faso-ai-chat__intro > span {
		width: 76px;
		height: 76px;
	}

	.faso-ai-chat__intro p {
		font-size: 17px;
	}

	.faso-ai-chat__composer {
		grid-template-columns: minmax(0, 1fr) 48px;
		padding: 12px;
	}

	.faso-ai-chat__composer input,
	.faso-ai-chat__composer button {
		min-height: 48px;
		height: 48px;
	}

	.faso-ai-chat__composer button {
		width: 48px;
		min-width: 48px;
	}

	.faso-ai-chat__suggestions {
		gap: 7px;
		padding-left: 0;
	}

	.faso-ai-chat__suggestion {
		min-height: 32px;
		padding: 7px 10px;
		font-size: 12px;
	}
}
