.k-aisp-wrapper {
	position: sticky;
	top: 20px;
	width: 100%;
	background: transparent;
	border-radius: 12px;
	border: 1px solid #e2e2e2;
	box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.05);
	overflow: hidden;
}

.k-chat-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: #e9e9e9;
	border-radius: 12px 12px 0 0;
	height: 68px;
	cursor: pointer;
	transition: all 0.3s ease;
	border: 1px solid #e2e2e2;
}

.k-chat-avatar {
	flex-shrink: 0;
}

.k-chat-avatar img {
	width: 36px;
	height: 36px;
	object-fit: cover;
}

.k-chat-info {
	flex-grow: 1;
	min-width: 0;
}

.k-chat-name {
	font-size: 24px;
	line-height: 1;
	font-weight: 700;
	color: #55a630;
	display: block;
	transition: all 0.3s;
}

.k-chat-interface.expanded .k-chat-name {
	font-size: 18px;
}

.k-chat-status {
	font-size: 12px;
	color: #000;
	display: none;
	margin-top: 2px;
}

.k-chat-interface.expanded .k-chat-status {
	display: block;
}

.k-chat-status:before {
	content: '';
	width: 6px;
	height: 6px;
	background: #55a630;
	border-radius: 50%;
	display: inline-block;
	margin-right: 6px;
}

.k-chat-messages {
	height: 420px;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #fdfdfd;
}

.k-chat-message {
	max-width: 80%;
	padding: 10px 14px;
	border-radius: 12px;
	font-size: 16px;
	line-height: 1.5;
}

.k-message-ai {
	align-self: flex-start;
	background: #f0f2f5;
	color: #000;
	border-top-left-radius: 2px;
}

.k-message-user {
	align-self: flex-end;
	background: #55a630;
	color: #fff;
	border-top-right-radius: 2px;
}

.k-chat-input-area {
	padding: 12px;
	border-top: 1px solid #e2e2e2;
	display: flex;
	gap: 8px;
	background: #fff;
	align-items: center;
}

.k-chat-input {
	flex: 1;
	height: 40px;
	border: 1px solid #ddd;
	border-radius: 20px;
	padding: 0 16px;
	outline: none;
	font-size: 14px;
	transition: border-color 0.2s;
}

.k-chat-input:focus {
	border-color: #55a630;
}

.k-chat-send-btn {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: #55a630;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
}

.k-chat-send-btn:hover {
	background: #468c28;
}

.k-chat-send-btn svg {
	margin-left: -2px;
}

.k-typing-dots {
	display: inline-block;
	margin-left: 2px;
}

.k-typing-dots span {
	animation: k-dot-wave 1.4s infinite;
	animation-fill-mode: both;
	display: inline-block;
}

.k-typing-dots span:nth-child(2) {
	animation-delay: 0.2s;
}

.k-typing-dots span:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes k-dot-wave {
	0%,
	60%,
	100% {
		transform: translateY(0);
		opacity: 1;
	}
	30% {
		transform: translateY(-8px);
		opacity: 0.7;
	}
}

.k-global-ai-chat {
	position: fixed;
	right: var(--kgc-right, 20px);
	bottom: var(--kgc-bottom, 24px);
	z-index: 2147483000;
	font-family: inherit;
	box-sizing: border-box;
}

.k-gai-contact-wrap {
	position: absolute;
	right: 0;
	bottom: 56px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
	transition: transform 0.36s cubic-bezier(0.34, 1.15, 0.48, 1);
	transition-delay: 0s;
}

.k-gai-contact-fab {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: #fff;
	color: #1d4ed8;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(29, 78, 216, 0.22);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transform-origin: bottom right;
	transform: scale3d(1, 1, 1) translateZ(0);
	opacity: 1;
	pointer-events: auto;
	transition:
		opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.42s cubic-bezier(0.34, 1.2, 0.52, 1),
		box-shadow 0.25s ease,
		border-color 0.25s ease,
		color 0.25s ease,
		background 0.25s ease;
	will-change: transform, opacity;
}

.k-gai-contact-fab:hover {
	color: #1e40af;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.1), 0 6px 20px rgba(29, 78, 216, 0.26);
}

.k-gai-contact-fab:focus-visible {
	outline: 3px solid #1d4ed8;
	outline-offset: 3px;
}

.k-gai-contact-fab:focus,
.k-gai-contact-fab:active {
	border: none !important;
}

.k-gai-contact-actions {
	position: absolute;
	right: 4px;
	bottom: 4px;
	width: 0;
	height: 0;
	pointer-events: none;
}

.k-gai-contact-action {
	position: absolute;
	right: 0;
	bottom: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	color: #fff;
	text-decoration: none;
	opacity: 0;
	transform: translate3d(0, 0, 0) scale3d(0.5, 0.5, 1);
	transition:
		transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
		opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
		box-shadow 0.22s ease;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
	pointer-events: none;
}

.k-gai-contact-action.is-call {
	background: linear-gradient(160deg, #22c55e 0%, #16a34a 100%);
}

.k-gai-contact-action svg {
	width: 20px !important;
	height: 20px !important;
}

.k-gai-contact-action.is-zalo {
	background: linear-gradient(160deg, #0ea5e9 0%, #2563eb 100%);
}

.k-gai-contact-action:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

.k-global-ai-chat.is-contact-open .k-gai-contact-action {
	opacity: 1;
	pointer-events: auto;
}

.k-global-ai-chat.is-contact-open .k-gai-contact-action.is-call {
	transform: translate3d(-48px, -24px, 0) scale3d(1, 1, 1);
}

.k-global-ai-chat.is-contact-open .k-gai-contact-action.is-zalo {
	transform: translate3d(-48px, 24px, 0) scale3d(1, 1, 1);
}

.k-global-ai-chat.is-contact-open .k-gai-contact-fab {
	color: #1e40af;
	background: #eff6ff;
}

.k-global-ai-chat.is-open .k-gai-contact-fab {
	opacity: 0;
	transform: scale3d(0.68, 0.68, 1) translateZ(0);
	pointer-events: none;
}

.k-gai-fab-wrap {
	position: relative;
	display: inline-block;
	line-height: 0;
	transition: transform 0.36s cubic-bezier(0.34, 1.15, 0.48, 1);
}

.k-gai-fab-hint {
	position: absolute;
	right: calc(100% + 14px);
	bottom: 3px;
	z-index: 1;
	box-sizing: border-box;
	width: max-content;
	min-width: 240px;
	max-width: min(288px, calc(100vw - 88px));
	padding: 13px 38px 13px 16px;
	border-radius: 14px;
	border: 2px solid #ff7f29;
	background: linear-gradient(165deg, #ffffff 0%, #fff9f4 55%, #fff6ee 100%);
	box-shadow:
		0 4px 6px rgba(255, 127, 41, 0.07),
		0 12px 28px rgba(0, 0, 0, 0.1);
	font-size: 14px;
	line-height: 1.5;
	font-weight: 600;
	color: #2a2a2a;
	text-align: left;
	word-break: normal;
	overflow-wrap: normal;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateX(12px) scale(0.98);
	transition:
		opacity 0.36s cubic-bezier(0.22, 1, 0.36, 1),
		visibility 0.36s,
		transform 0.36s cubic-bezier(0.34, 1.15, 0.48, 1);
	pointer-events: none;
}

.k-gai-fab-hint::before {
	content: '';
	position: absolute;
	top: 50%;
	right: -9px;
	margin-top: -8px;
	width: 0;
	height: 0;
	border-width: 8px 0 8px 9px;
	border-style: solid;
	border-color: transparent transparent transparent #ff7f29;
}

.k-gai-fab-hint::after {
	content: '';
	position: absolute;
	top: 50%;
	right: -6px;
	margin-top: -6px;
	width: 0;
	height: 0;
	border-width: 6px 0 6px 7px;
	border-style: solid;
	border-color: transparent transparent transparent #fffaf6;
}

.k-gai-fab-hint.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateX(0) scale(1);
	pointer-events: auto;
}

.k-global-ai-chat.is-open .k-gai-fab-hint {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateX(12px) scale(0.98);
}

.k-gai-fab-hint-dismiss {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1.5px solid rgba(255, 127, 41, 0.35);
	border-radius: 50%;
	background: rgba(255, 127, 41, 0.12);
	font-size: 16px;
	line-height: 1;
	font-weight: 700;
	color: #c45a10;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.k-gai-fab-hint-dismiss:hover {
	background: rgba(255, 127, 41, 0.28);
	border-color: #ff7f29;
	color: #7a2e00;
}

.k-gai-fab-hint-text {
	display: block;
	max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
	.k-gai-contact-wrap,
	.k-gai-contact-action,
	.k-gai-contact-fab,
	.k-gai-fab-hint,
	.k-global-ai-chat.is-open .k-gai-fab-hint {
		transition-duration: 0.01ms !important;
	}
}

body.admin-bar .k-global-ai-chat {
	bottom: var(--kgc-bottom, 24px);
}

@media (max-width: 782px) {
	body.admin-bar .k-global-ai-chat {
		bottom: var(--kgc-bottom, 24px);
	}
}

.k-gai-fab {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 2px solid #55a630;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(85, 166, 48, 0.18);
	cursor: pointer;
	transform-origin: bottom right;
	transform: scale3d(1, 1, 1) translateZ(0);
	opacity: 1;
	pointer-events: auto;
	transition:
		opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.42s cubic-bezier(0.34, 1.2, 0.52, 1),
		box-shadow 0.25s ease,
		border-color 0.25s ease;
	will-change: transform, opacity;
}

.k-gai-fab:hover {
	border-color: #4a9329;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.1), 0 6px 20px rgba(85, 166, 48, 0.22);
}

.k-gai-fab:focus-visible {
	outline: 3px solid #55a630;
	outline-offset: 3px;
}

.k-global-ai-chat .k-gai-fab .k-chat-avatar {
	flex-shrink: 0;
	line-height: 0;
}

.k-global-ai-chat .k-gai-fab .k-chat-avatar lottie-player {
	display: block;
}

.k-global-ai-chat.is-open .k-gai-fab {
	opacity: 0;
	transform: scale3d(0.68, 0.68, 1) translateZ(0);
	pointer-events: none;
}

.k-gai-sheet {
	position: fixed;
	right: var(--kgc-right, 20px);
	bottom: calc(var(--kgc-bottom, 24px) + 41px);
	z-index: 2147483001;
	width: min(100vw - 32px, 400px);
	transform-origin: bottom right;
	transform: scale3d(0.18, 0.18, 1) translate3d(0, 10px, 0);
	opacity: 0;
	pointer-events: none;
	transition:
		transform 0.46s cubic-bezier(0.34, 1.22, 0.48, 1),
		opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform, opacity;
}

.k-global-ai-chat.is-open .k-gai-sheet {
	transform: scale3d(1, 1, 1) translate3d(0, 0, 0);
	opacity: 1;
	pointer-events: auto;
}

.k-global-ai-chat .k-gai-ai-support {
	margin: 0;
}

.k-global-ai-chat .k-aisp-wrapper {
	position: relative;
	top: auto;
	margin: 0;
	border-radius: 14px;
	overflow: hidden;
	border: 2px solid #ff7f29;
	box-shadow:
		0 10px 40px rgba(0, 0, 0, 0.14),
		0 0 0 1px rgba(255, 127, 41, 0.25),
		0 0 20px rgba(255, 127, 41, 0.15);
	background: #fff;
}

.k-global-ai-chat .k-chat-interface:not(.expanded) .k-chat-header.k-gai-chat-header {
	border-radius: 12px;
}

.k-global-ai-chat .k-chat-interface.expanded .k-chat-header.k-gai-chat-header {
	border-radius: 12px 12px 0 0;
}

.k-gai-chat-header.k-chat-header {
	position: relative;
	padding-right: 4px;
	transition: border-radius 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.k-gai-header-close {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	min-width: 48px;
	min-height: 48px;
	margin-left: 2px;
	padding: 0;
	border: none;
	background: transparent;
	border-radius: 10px;
	font-size: 34px;
	font-weight: 300;
	line-height: 1;
	color: #333;
	cursor: pointer;
	transition: background 0.22s ease, color 0.22s ease;
}

.k-gai-header-close:hover {
	background: rgba(0, 0, 0, 0.08);
	color: #111;
}

.k-global-ai-chat .k-gai-chat-body {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.k-global-ai-chat .k-chat-interface.expanded .k-gai-chat-body {
	grid-template-rows: 1fr;
}

.k-global-ai-chat .k-gai-chat-body-inner {
	min-height: 0;
	overflow: hidden;
}

.k-global-ai-chat .k-chat-messages.k-gai-messages {
	max-height: min(560px, calc(100vh - 160px));
	height: auto;
	min-height: 280px;
	background: #fafcf9;
	box-sizing: border-box;
}

.k-global-ai-chat .k-chat-input-area.k-gai-input-row {
	background: #fff;
	border-top: 1px solid #e8ebe7;
}

.k-global-ai-chat .k-chat-message {
	max-width: 85%;
}

.k-global-ai-chat .k-message-content ul,
.k-global-ai-chat .k-message-content ol {
	margin: 8px 0;
	padding-left: 18px;
}

.k-global-ai-chat .k-message-content li {
	margin: 4px 0;
}

.k-global-ai-chat .k-gai-suggestions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 8px 0 14px;
	max-width: 85%;
}

.k-global-ai-chat .k-gai-suggestion-item {
	appearance: none;
	border: 1px solid #cbd5e1;
	background: #f8fafc;
	color: #0f172a;
	display: inline-flex;
	justify-content: flex-start;
	text-align: left;
	border-radius: 999px;
	padding: 8px 12px;
	font-size: 14px;
	line-height: 1.3;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.k-global-ai-chat .k-gai-suggestion-item:hover {
	background: #eef6ff;
	border-color: #94a3b8;
	color: #0b2545;
}

.k-global-ai-chat .k-gai-suggestion-item:focus-visible {
	outline: 2px solid #55a630;
	outline-offset: 1px;
}

.k-global-ai-chat .k-gai-suggestion-item:active {
	transform: translateY(1px);
}

.k-global-ai-chat .k-chat-name,
.k-global-ai-chat .k-chat-status {
	transition: font-size 0.35s cubic-bezier(0.22, 1, 0.36, 1), margin 0.35s ease, opacity 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
	.k-gai-fab,
	.k-gai-sheet,
	.k-global-ai-chat .k-gai-chat-body,
	.k-gai-chat-header.k-chat-header,
	.k-global-ai-chat .k-chat-name,
	.k-global-ai-chat .k-chat-status {
		transition-duration: 0.01ms !important;
	}
}

@media (max-width: 767px) {
	.k-gai-contact-wrap {
		bottom: 54px;
	}

	.k-global-ai-chat.is-contact-open .k-gai-contact-action.is-call {
		transform: translate3d(-44px, -24px, 0) scale3d(1, 1, 1);
	}

	.k-global-ai-chat.is-contact-open .k-gai-contact-action.is-zalo {
		transform: translate3d(-44px, 24px, 0) scale3d(1, 1, 1);
	}

	.k-global-ai-chat.is-open .k-gai-sheet {
		height: 75vh !important;
		max-height: 75vh !important;
		overflow: hidden !important;
	}

	.k-global-ai-chat.is-peek .k-gai-fab-wrap {
		transform: translateX(72%);
	}

	.k-global-ai-chat.is-contact-peek .k-gai-contact-wrap {
		transform: translateX(72%);
		transition-delay: 0.2s;
	}

	.k-global-ai-chat {
		right: var(--kgc-right, 12px);
		bottom: var(--kgc-bottom, 24px) !important;
	}

	.k-gai-sheet {
		right: var(--kgc-right, 12px);
		width: calc(100vw - 32px);
		bottom: calc(var(--kgc-bottom, 24px) + 41px) !important;
		height: 75vh !important;
		max-height: 75vh !important;
		overflow: hidden;
	}

	.k-global-ai-chat .k-aisp-wrapper,
	.k-global-ai-chat .k-gai-ai-support,
	.k-global-ai-chat .k-aisp-inner,
	.k-global-ai-chat .k-chat-interface {
		height: 100%;
	}

	.k-global-ai-chat .k-chat-interface {
		display: flex;
		flex-direction: column;
	}

	.k-global-ai-chat .k-gai-chat-body {
		display: block;
		flex: 1 1 auto;
		min-height: 0;
	}

	.k-global-ai-chat .k-chat-interface.expanded .k-gai-chat-body {
		display: block;
	}

	.k-global-ai-chat .k-gai-chat-body-inner {
		height: 100%;
		display: flex;
		flex-direction: column;
		min-height: 0;
	}

	.k-global-ai-chat .k-chat-messages.k-gai-messages {
		flex: 1 1 auto;
		min-height: 0;
		max-height: none;
		height: auto !important;
		overflow-y: auto;
	}

	.k-global-ai-chat .k-gai-suggestions {
		max-width: 92%;
	}

	body.admin-bar .k-global-ai-chat {
		bottom: var(--kgc-bottom, 24px) !important;
	}

	.k-gai-fab-hint {
		right: calc(100% + 14px);
		bottom: 8px;
		min-width: min(220px, calc(100vw - 100px));
		max-width: calc(100vw - 100px);
		width: auto;
		transform: translateX(12px) scale(0.98);
	}

	.k-gai-fab-hint.is-visible {
		transform: translateX(0) scale(1);
	}

	.k-global-ai-chat.is-open .k-gai-fab-hint {
		transform: translateX(12px) scale(0.98);
	}

	.k-gai-fab-hint::before {
		top: 50%;
		bottom: auto;
		right: -9px;
		margin-top: -8px;
		border-width: 8px 0 8px 9px;
		border-color: transparent transparent transparent #ff7f29;
	}

	.k-gai-fab-hint::after {
		top: 50%;
		bottom: auto;
		right: -6px;
		margin-top: -6px;
		border-width: 6px 0 6px 7px;
		border-color: transparent transparent transparent #fffaf6;
	}
}
