.lfs-chat {
	--lfs-green: #1b7a54;
	--lfs-green-dark: #12583c;
	--lfs-gold: #7a570f;
	--lfs-ink: #111518;
	--lfs-muted: #465158;
	--lfs-surface: #ffffff;
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 99998;
	font: 400 15px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--lfs-ink);
	pointer-events: none;
}

.lfs-chat > * {
	pointer-events: auto;
}

.lfs-chat--inline {
	position: relative;
	right: auto;
	bottom: auto;
	max-width: 720px;
	margin: 2rem auto;
}

.lfs-chat__launcher,
.lfs-chat__form button {
	border: 0;
	border-radius: 999px;
	background: var(--lfs-green);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.lfs-chat__launcher {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 50px;
	padding: 12px 17px;
	box-shadow: 0 10px 35px rgba(17, 21, 24, 0.24);
	transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.lfs-chat__launcher-icon {
	display: inline-grid;
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	place-items: center;
}

.lfs-chat__launcher-icon svg {
	display: block;
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.9;
}

.lfs-chat__launcher-label {
	white-space: nowrap;
}

.lfs-chat__launcher:hover,
.lfs-chat__launcher:focus-visible,
.lfs-chat__form button:hover,
.lfs-chat__form button:focus-visible {
	background: var(--lfs-green-dark);
}

.lfs-chat__launcher:focus-visible {
	outline: 3px solid rgba(27, 122, 84, 0.28);
	outline-offset: 3px;
}

.lfs-chat__launcher:active {
	transform: translateY(1px);
}

.lfs-chat__panel {
	position: absolute;
	right: 0;
	bottom: 62px;
	display: flex;
	flex-direction: column;
	width: min(390px, calc(100vw - 28px));
	max-height: min(680px, calc(100dvh - 110px));
	background: var(--lfs-surface);
	border: 1px solid #dfe4e1;
	border-radius: 18px;
	box-shadow: 0 22px 60px rgba(17, 21, 24, 0.26);
	overflow: hidden;
}

.lfs-chat__panel[hidden] {
	display: none;
}

.lfs-chat--inline .lfs-chat__panel {
	position: relative;
	right: auto;
	bottom: auto;
	width: 100%;
	min-height: 600px;
}

.lfs-chat__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 18px;
	background: var(--lfs-green-dark);
	color: #fff;
}

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

.lfs-chat__header strong {
	font-size: 17px;
}

.lfs-chat__header span {
	margin-top: 2px;
	font-size: 12px;
	opacity: 0.9;
}

.lfs-chat__close {
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.13);
	color: #fff;
	font: 400 26px/1 system-ui, sans-serif;
	cursor: pointer;
}

.lfs-chat__messages {
	flex: 1;
	min-height: 250px;
	padding: 18px;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-y;
	background: #f4f5f6;
}

.lfs-chat__message {
	width: fit-content;
	max-width: 90%;
	margin: 0 0 12px;
	padding: 11px 13px;
	border-radius: 14px;
	white-space: pre-wrap;
	box-shadow: 0 2px 8px rgba(17, 21, 24, 0.07);
}

.lfs-chat__message--assistant {
	background: #fff;
	border-bottom-left-radius: 4px;
}

.lfs-chat__message--visitor {
	margin-left: auto;
	background: var(--lfs-green);
	color: #fff;
	border-bottom-right-radius: 4px;
}

.lfs-chat__sources {
	margin: 10px 0 0;
	padding: 10px 0 0 18px;
	border-top: 1px solid #e0e5e2;
}

.lfs-chat__sources a {
	color: var(--lfs-green-dark);
	font-weight: 700;
}

.lfs-chat__suggestions {
	display: flex;
	gap: 7px;
	padding: 10px 14px;
	overflow-x: auto;
	background: #fff;
}

.lfs-chat__suggestions button {
	flex: 0 0 auto;
	padding: 7px 10px;
	border: 1px solid #b8c8c0;
	border-radius: 999px;
	background: #fff;
	color: var(--lfs-green-dark);
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}

.lfs-chat__form {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 9px;
	padding: 12px 14px;
	border-top: 1px solid #e0e5e2;
	background: #fff;
}

.lfs-chat__form textarea {
	min-height: 46px;
	max-height: 110px;
	margin: 0;
	padding: 10px 12px;
	resize: vertical;
	border: 1px solid #aeb9b3;
	border-radius: 10px;
	color: var(--lfs-ink);
	font: inherit;
}

.lfs-chat__form textarea:focus {
	outline: 3px solid rgba(27, 122, 84, 0.2);
	border-color: var(--lfs-green);
}

.lfs-chat__form button {
	align-self: end;
	padding: 11px 16px;
}

.lfs-chat__form button:disabled {
	opacity: 0.6;
	cursor: wait;
}

.lfs-chat__website {
	position: absolute !important;
	left: -10000px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
}

.lfs-chat__notice {
	margin: 0;
	padding: 0 14px 12px;
	background: #fff;
	color: var(--lfs-muted);
	font-size: 11px;
}

@media (max-width: 600px) {
	.lfs-chat {
		right: 14px;
		bottom: 14px;
	}

	.lfs-chat__panel {
		position: fixed;
		right: 10px;
		bottom: 74px;
		left: 10px;
		width: auto;
		max-height: calc(100dvh - 94px);
	}

	.lfs-chat__header {
		padding: 13px 15px;
	}

	.lfs-chat__messages {
		min-height: 170px;
		padding: 15px;
	}

	.lfs-chat__suggestions {
		padding: 8px 12px;
	}

	.lfs-chat__form {
		padding: 10px 12px;
	}

	.lfs-chat__launcher {
		min-height: 48px;
		padding: 11px 14px;
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lfs-chat__launcher {
		transition: none;
	}
}
