.hkti-chat {
	--hkti-primary: #6d4aff;
	--hkti-ink: #171421;
	--hkti-muted: #6b6675;
	--hkti-surface: #ffffff;
	--hkti-soft: #f5f3f8;
	--hkti-border: #e5e0eb;
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 999999;
	font-family: Inter,"Inter Fallback", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 15px;
	line-height: 1.45;
	color: var(--hkti-ink);
}

.hkti-chat button,
.hkti-chat textarea,
.hkti-chat section,
.hkti-chat div,
.hkti-chat header,
.hkti-chat footer {
	box-sizing: border-box;
}

.hkti-chat [hidden] {
	display: none !important;
}

.hkti-chat .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.hkti-chat__launcher {
	width: 58px;
	height: 58px;
	margin: 0 0 0 auto;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--hkti-primary);
	color: #fff;
	box-shadow: 0 14px 35px rgba(27, 18, 55, 0.24);
	display: grid;
	place-items: center;
	cursor: pointer;
	transition: transform 160ms ease, box-shadow 160ms ease;
}

.hkti-chat__launcher:hover {
	transform: translateY(-2px);
	box-shadow: 0 18px 42px rgba(27, 18, 55, 0.3);
}

.hkti-chat__launcher:focus-visible,
.hkti-chat button:focus-visible,
.hkti-chat textarea:focus-visible,
.hkti-chat a:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--hkti-primary) 45%, white);
	outline-offset: 3px;
}

.hkti-chat__launcher svg,
.hkti-chat__form svg {
	width: 25px;
	height: 25px;
	fill: currentColor;
}

.hkti-chat__launcher .hkti-chat__avatar-icon {
	width: 30px;
	height: 30px;
}

.hkti-chat__launcher .hkti-chat__avatar-image {
	width: 100%;
	height: 100%;
	border-radius: inherit;
	object-fit: cover;
}

.hkti-chat__greeting {
	position: absolute;
	right: 70px;
	bottom: 7px;
	min-width: 230px;
	max-width: 290px;
	padding: 12px 36px 12px 15px;
	border: 1px solid var(--hkti-border);
	border-radius: 14px;
	background: var(--hkti-surface);
	box-shadow: 0 10px 28px rgba(27, 18, 55, 0.14);
}

.hkti-chat__greeting-close {
	position: absolute;
	top: 4px;
	right: 7px;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--hkti-muted);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.hkti-chat__dialog {
	position: absolute;
	right: 0;
	bottom: 72px;
	width: min(390px, calc(100vw - 32px));
	height: min(640px, calc(100vh - 120px));
	min-height: 430px;
	border: 1px solid var(--hkti-border);
	border-radius: 22px;
	background: var(--hkti-surface);
	box-shadow: 0 24px 70px rgba(27, 18, 55, 0.24);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.hkti-chat__header {
	min-height: 72px;
	padding: 13px 12px 13px 16px;
	background: var(--hkti-primary);
	color: #fff;
	display: flex;
	align-items: center;
	gap: 10px;
}

.hkti-chat__avatar {
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.22);
	display: grid;
	place-items: center;
	font-weight: 750;
}

.hkti-chat__avatar-icon {
	width: 25px;
	height: 25px;
	fill: currentColor;
}

.hkti-chat__avatar-image {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
}

.hkti-chat__header strong,
.hkti-chat__header span {
	display: block;
}

.hkti-chat__header strong {
	font-size: 15px;
	line-height: 1.25;
}

.hkti-chat__header span {
	margin-top: 2px;
	font-size: 12px;
	line-height: 1.25;
	opacity: 0.83;
}

.hkti-chat__header-action {
	padding: 6px 8px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: 12px;
	cursor: pointer;
}

.hkti-chat__header-action:hover {
	background: rgba(255, 255, 255, 0.14);
}

.hkti-chat__header-action:first-of-type {
	margin-left: auto;
}

.hkti-chat__close {
	width: 34px;
	height: 34px;
	padding: 0;
	font-size: 25px;
	line-height: 1;
}

.hkti-chat__messages {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 18px 15px 10px;
	background: linear-gradient(180deg, #fbfaff 0%, #fff 32%);
	scroll-behavior: smooth;
}

.hkti-chat__message {
	width: fit-content;
	max-width: 86%;
	margin: 0 0 12px;
	padding: 10px 13px;
	border-radius: 15px;
	overflow-wrap: anywhere;
}

.hkti-chat__message p {
	margin: 0 0 8px;
}

.hkti-chat__message p:last-child {
	margin-bottom: 0;
}

.hkti-chat__message ul,
.hkti-chat__message ol {
	margin: 7px 0;
	padding-left: 20px;
}

.hkti-chat__message a {
	color: inherit;
	font-weight: 650;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.hkti-chat__message--assistant {
	margin-right: auto;
	border-bottom-left-radius: 5px;
	background: var(--hkti-soft);
	color: var(--hkti-ink);
}

.hkti-chat__message--user {
	margin-left: auto;
	border-bottom-right-radius: 5px;
	background: var(--hkti-primary);
	color: #fff;
}

.hkti-chat__message--error {
	margin-right: auto;
	background: #fff0f0;
	color: #8c1d1d;
}

.hkti-chat__quick-replies {
	margin: 2px 0 16px;
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.hkti-chat__quick-replies button {
	max-width: 100%;
	padding: 8px 11px;
	border: 1px solid color-mix(in srgb, var(--hkti-primary) 35%, var(--hkti-border));
	border-radius: 999px;
	background: #fff;
	color: var(--hkti-primary);
	font: inherit;
	font-size: 12px;
	font-weight: 650;
	line-height: 1.25;
	text-align: left;
	cursor: pointer;
}

.hkti-chat__quick-replies button:hover {
	background: color-mix(in srgb, var(--hkti-primary) 7%, white);
}

.hkti-chat__quick-replies button:disabled {
	opacity: 0.55;
	cursor: wait;
}

.hkti-chat__sources {
	max-width: 86%;
	margin: -5px 0 14px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.hkti-chat__source {
	padding: 4px 8px;
	border: 1px solid var(--hkti-border);
	border-radius: 999px;
	background: #fff;
	color: var(--hkti-muted);
	font-size: 11px;
	line-height: 1.3;
	text-decoration: none;
}

.hkti-chat__typing {
	padding: 8px 18px 12px;
	display: flex;
	gap: 4px;
}

.hkti-chat__typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--hkti-muted);
	animation: hkti-pulse 1.1s infinite ease-in-out;
}

.hkti-chat__typing span:nth-child(2) { animation-delay: 120ms; }
.hkti-chat__typing span:nth-child(3) { animation-delay: 240ms; }

@keyframes hkti-pulse {
	0%, 70%, 100% { transform: translateY(0); opacity: 0.45; }
	35% { transform: translateY(-4px); opacity: 1; }
}

.hkti-chat__booking-bar {
	padding: 7px 11px 0;
	background: #fff;
}

.hkti-chat__booking-bar button {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid color-mix(in srgb, var(--hkti-primary) 35%, var(--hkti-border));
	border-radius: 10px;
	background: color-mix(in srgb, var(--hkti-primary) 7%, white);
	color: var(--hkti-primary);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	cursor: pointer;
}

.hkti-chat__booking-bar button:disabled {
	opacity: 0.6;
	cursor: wait;
}

.hkti-chat__booking-bar svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.hkti-chat__booking-panel {
	position: absolute;
	inset: 72px 0 0;
	z-index: 5;
	background: #fff;
	overflow-y: auto;
}

.hkti-chat__booking-panel > header {
	position: sticky;
	top: 0;
	z-index: 1;
	padding: 13px 16px;
	border-bottom: 1px solid var(--hkti-border);
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.hkti-chat__booking-panel > header strong,
.hkti-chat__booking-panel > header span {
	display: block;
}

.hkti-chat__booking-panel > header span {
	margin-top: 2px;
	color: var(--hkti-muted);
	font-size: 11px;
}

.hkti-chat__booking-panel > header button {
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: var(--hkti-soft);
	color: var(--hkti-muted);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.hkti-chat__booking-panel form {
	padding: 15px 16px 22px;
}

.hkti-chat__booking-panel form > label {
	margin-bottom: 12px;
	display: block;
}

.hkti-chat__booking-panel form > label > span {
	margin-bottom: 5px;
	display: block;
	font-size: 12px;
	font-weight: 700;
}

.hkti-chat__booking-date-field {
	margin-bottom: 12px;
}

.hkti-chat__booking-date-field > label {
	margin-bottom: 5px;
	display: block;
	font-size: 12px;
	font-weight: 700;
}

.hkti-chat__booking-date-value {
	margin-bottom: 8px;
	cursor: default;
}

.hkti-chat__booking-calendar {
	padding: 9px;
	border: 1px solid var(--hkti-border);
	border-radius: 10px;
	background: #fff;
}

.hkti-chat__booking-calendar-nav {
	margin-bottom: 8px;
	display: grid;
	grid-template-columns: 30px 1fr 30px;
	align-items: center;
	gap: 6px;
}

.hkti-chat__booking-calendar-nav strong {
	font-size: 12px;
	line-height: 1.3;
	text-align: center;
}

.hkti-chat__booking-calendar-nav button {
	width: 30px;
	height: 30px;
	padding: 0;
	border: 1px solid var(--hkti-border);
	border-radius: 8px;
	background: #fff;
	color: var(--hkti-primary);
	font: inherit;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.hkti-chat__booking-calendar-nav button:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.hkti-chat__booking-calendar-weekdays {
	margin-bottom: 4px;
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
}

.hkti-chat__booking-calendar-weekdays span {
	color: var(--hkti-muted);
	font-size: 9px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-transform: uppercase;
}

.hkti-chat__booking-calendar-grid {
	min-height: 116px;
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
}

.hkti-chat__booking-calendar-day {
	min-width: 0;
	min-height: 42px;
	padding: 5px 2px;
	border: 1px solid color-mix(in srgb, var(--hkti-primary) 24%, var(--hkti-border));
	border-radius: 8px;
	background: color-mix(in srgb, var(--hkti-primary) 5%, white);
	color: var(--hkti-ink);
	font: inherit;
	cursor: pointer;
}

.hkti-chat__booking-calendar-day strong {
	display: block;
}

.hkti-chat__booking-calendar-day strong {
	font-size: 14px;
	line-height: 1.2;
}

.hkti-chat__booking-calendar-day:hover:not(:disabled),
.hkti-chat__booking-calendar-day:focus-visible {
	border-color: var(--hkti-primary);
	outline: 2px solid color-mix(in srgb, var(--hkti-primary) 25%, transparent);
	outline-offset: 1px;
}

.hkti-chat__booking-calendar-day.is-selected {
	border-color: var(--hkti-primary);
	background: var(--hkti-primary);
	color: #fff;
}

.hkti-chat__booking-calendar-day.is-loading,
.hkti-chat__booking-calendar-day.is-unavailable {
	border-color: #e2e2e2;
	background: #f3f3f3;
	color: #a0a0a0;
	cursor: not-allowed;
}

.hkti-chat__booking-calendar-day.is-loading {
	opacity: 0.62;
}

.hkti-chat__booking-calendar-prompt {
	grid-column: 1 / -1;
	margin: 0;
	padding: 32px 12px;
	color: var(--hkti-muted);
	font-size: 12px;
	line-height: 1.4;
	text-align: center;
}

.hkti-chat__booking-panel input:not([type="checkbox"]),
.hkti-chat__booking-panel select,
.hkti-chat__booking-panel textarea {
	width: 100%;
	padding: 9px 10px;
	border: 1px solid var(--hkti-border);
	border-radius: 9px;
	background: #fff;
	color: var(--hkti-ink);
	font: inherit;
	font-size: 13px;
}

.hkti-chat__booking-panel textarea {
	resize: vertical;
}

.hkti-chat__booking-panel .hkti-chat__booking-confirm {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.hkti-chat__booking-honeypot {
	position: absolute !important;
	left: -10000px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.hkti-chat__booking-panel .hkti-chat__booking-confirm > span {
	margin: 0;
	font-weight: 500;
}

.hkti-chat__booking-submit {
	width: 100%;
	padding: 11px 14px;
	border: 0;
	border-radius: 10px;
	background: var(--hkti-primary);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.hkti-chat__booking-submit:disabled {
	opacity: 0.6;
	cursor: wait;
}

.hkti-chat__booking-fallback {
	margin-top: 11px;
	color: var(--hkti-primary);
	display: block;
	font-size: 12px;
	text-align: center;
}

.hkti-chat__booking-status {
	min-height: 18px;
	margin: 0 0 10px;
	color: var(--hkti-muted);
	font-size: 12px;
}

.hkti-chat__booking-status.is-error {
	color: #8c1d1d;
}

.hkti-chat__booking-success {
	padding: 24px 16px;
	text-align: center;
}

.hkti-chat__booking-success h3 {
	margin: 0 0 8px;
	font-size: 18px;
}

.hkti-chat__booking-success p {
	margin: 0 0 12px;
}

.hkti-chat__booking-success .hkti-chat__booking-pending-notice {
	margin: 14px 0 0;
	padding: 11px 12px;
	border: 1px solid #e4c46b;
	border-radius: 10px;
	background: #fff8df;
	color: #684f0b;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.45;
	text-align: left;
}

.hkti-chat__consent {
	position: absolute;
	inset: 72px 0 0;
	z-index: 3;
	padding: 28px;
	background: rgba(255, 255, 255, 0.97);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
}

.hkti-chat__consent p {
	max-width: 290px;
	margin: 0 0 12px;
}

.hkti-chat__consent a {
	margin-bottom: 18px;
	color: var(--hkti-primary);
}

.hkti-chat__consent button,
.hkti-chat__rating button {
	padding: 10px 18px;
	border: 0;
	border-radius: 10px;
	background: var(--hkti-primary);
	color: #fff;
	font: inherit;
	font-weight: 650;
	cursor: pointer;
}

.hkti-chat__form {
	min-height: 66px;
	padding: 10px 11px;
	border-top: 1px solid var(--hkti-border);
	display: flex;
	align-items: flex-end;
	gap: 8px;
}

.hkti-chat__form textarea {
	width: 100%;
	max-height: 108px;
	min-height: 42px;
	resize: none;
	padding: 10px 11px;
	border: 1px solid var(--hkti-border);
	border-radius: 12px;
	background: #fff;
	color: var(--hkti-ink);
	font: inherit;
	line-height: 1.4;
}

.hkti-chat__form button {
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: var(--hkti-primary);
	color: #fff;
	display: grid;
	place-items: center;
	cursor: pointer;
}

.hkti-chat__form button:disabled,
.hkti-chat__form textarea:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.hkti-chat__footer {
	padding: 4px 10px 7px;
	color: var(--hkti-muted);
	font-size: 10px;
	line-height: 1.2;
	text-align: center;
}

.hkti-chat__rating {
	margin: 8px 0 16px;
	padding: 14px;
	border: 1px solid var(--hkti-border);
	border-radius: 14px;
	text-align: center;
}

.hkti-chat__rating p {
	margin: 0 0 8px;
}

.hkti-chat__rating-stars {
	display: flex;
	justify-content: center;
	gap: 5px;
}

.hkti-chat__rating-stars button {
	padding: 2px;
	background: transparent;
	color: var(--hkti-primary);
	font-size: 26px;
	line-height: 1;
}

.hkti-chat__rating .hkti-chat__rating-skip {
	margin-top: 8px;
	padding: 5px 8px;
	background: transparent;
	color: var(--hkti-muted);
	font-size: 12px;
}

@media (max-width: 520px) {
	.hkti-chat {
		right: 12px;
		bottom: 12px;
	}

	.hkti-chat__dialog {
		position: fixed;
		inset: 10px 10px 82px;
		width: auto;
		height: auto;
		min-height: 0;
	}

	.hkti-chat__greeting {
		right: 67px;
		min-width: min(230px, calc(100vw - 105px));
	}
}

@media (prefers-reduced-motion: reduce) {
	.hkti-chat__launcher,
	.hkti-chat__messages {
		transition: none;
		scroll-behavior: auto;
	}

	.hkti-chat__typing span {
		animation: none;
	}
}
