.chatia-root {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
	--chatia-bg: #ffffff;
	--chatia-text: #0f172a;
	--chatia-muted: rgba(15,23,42,.72);
	--chatia-surface: #ffffff;
	--chatia-surface-2: #f8fafc;
	--chatia-border: rgba(15,23,42,.10);
	--chatia-shadow: 0 18px 50px rgba(2,6,23,.22);
	--chatia-radius: 16px;
	--chatia-ease: cubic-bezier(.2,.8,.2,1);
	--chatia-primary: #0f172a;
	--chatia-primary-2: #111827;
	--chatia-brand: #2563eb;
	--chatia-brand-2: #1d4ed8;
	--chatia-accent: var(--chatia-brand);
	--chatia-wa: #16a34a;
}

#chatia-root,
#chatia-root * {
	box-sizing: border-box;
}

#chatia-root button,
#chatia-root input,
#chatia-root textarea,
#chatia-root a {
	font-family: inherit;
}

#chatia-root button,
#chatia-root input,
#chatia-root textarea {
	-webkit-appearance: none;
	appearance: none;
}

.chatia-bubble {
	width: 56px;
	height: 56px;
	border-radius: 9999px;
	border: 0;
	background: radial-gradient(120% 120% at 20% 20%, #60a5fa 0%, var(--chatia-brand) 55%, var(--chatia-brand-2) 100%);
	color: #fff;
	box-shadow: 0 10px 25px rgba(0,0,0,.22);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transform: translateZ(0);
	transition: transform 160ms var(--chatia-ease), box-shadow 160ms var(--chatia-ease), filter 160ms var(--chatia-ease);
}

.chatia-icon {
	width: 18px;
	height: 18px;
	display: inline-block;
}

.chatia-bubble .chatia-icon {
	width: 22px;
	height: 22px;
}

.chatia-bubble:hover {
	filter: brightness(1.05);
	transform: translateY(-2px);
	box-shadow: 0 16px 34px rgba(0,0,0,.28);
}

.chatia-bubble:active {
	transform: translateY(0) scale(.98);
}

.chatia-bubble__icon {
	font-size: 20px;
	line-height: 1;
}

.chatia-panel {
	width: 360px;
	max-width: calc(100vw - 36px);
	height: 520px;
	max-height: calc(100vh - 120px);
	background: var(--chatia-bg);
	border-radius: var(--chatia-radius);
	box-shadow: var(--chatia-shadow);
	overflow: hidden;
	position: absolute;
	right: 0;
	bottom: 70px;
	transform-origin: bottom right;
	transform: translateY(10px) scale(.96);
	opacity: 0;
	pointer-events: none;
	transition: transform 220ms var(--chatia-ease), opacity 220ms var(--chatia-ease);
	display: flex;
	flex-direction: column;
	border: 1px solid var(--chatia-border);
}

.chatia-panel.is-open {
	transform: translateY(0) scale(1);
	opacity: 1;
	pointer-events: auto;
}

.chatia-panel__header {
	background: radial-gradient(120% 160% at 20% 0%, #60a5fa 0%, var(--chatia-brand) 55%, var(--chatia-brand-2) 100%);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 14px 12px;
}

.chatia-panel__title {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.chatia-panel__name {
	font-weight: 700;
	font-size: 14px;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.chatia-panel__subtitle {
	font-size: 12px;
	opacity: .85;
}

.chatia-panel__close {
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	padding: 6px 8px;
	border-radius: 10px;
	transition: background 160ms var(--chatia-ease), transform 160ms var(--chatia-ease), opacity 160ms var(--chatia-ease);
}

.chatia-panel__close .chatia-icon {
	width: 18px;
	height: 18px;
}

.chatia-panel__close:hover {
	background: rgba(255,255,255,.12);
}

.chatia-panel__close:active {
	transform: scale(.96);
}

.chatia-panel__header-actions {
	display: flex;
	gap: 6px;
	align-items: center;
}

.chatia-panel__messages {
	flex: 1 1 auto;
	padding: 14px;
	overflow: auto;
	background: linear-gradient(180deg, var(--chatia-surface-2) 0%, #f6f7fb 100%);
	display: flex;
	flex-direction: column;
	gap: 10px;
	scroll-behavior: smooth;
}

.chatia-msg {
	max-width: 85%;
	padding: 10px 12px;
	border-radius: 14px;
	font-size: 13px;
	line-height: 1.4;
	white-space: pre-wrap;
	word-wrap: break-word;
	animation: chatia-msg-in 180ms var(--chatia-ease) both;
}

.chatia-msg a {
	word-break: break-word;
	overflow-wrap: anywhere;
}

.chatia-msg--model a {
	color: var(--chatia-accent);
	text-decoration: underline;
}

.chatia-msg--user a {
	color: #e0e7ff;
	text-decoration: underline;
}

.chatia-msg--user {
	align-self: flex-end;
	background: linear-gradient(180deg, var(--chatia-brand) 0%, var(--chatia-brand-2) 100%);
	color: #fff;
	border-bottom-right-radius: 6px;
	box-shadow: 0 10px 18px rgba(0,0,0,.12);
}

.chatia-msg--model {
	align-self: flex-start;
	background: rgba(255,255,255,.92);
	color: #0f172a;
	border: 1px solid rgba(15,23,42,.08);
	border-bottom-left-radius: 6px;
	box-shadow: 0 10px 18px rgba(15,23,42,.06);
}

.chatia-msg__text {
	white-space: pre-wrap;
}

.chatia-cards {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 10px;
}

.chatia-card {
	border: 1px solid rgba(15,23,42,.10);
	border-radius: 12px;
	padding: 10px;
	background: #ffffff;
	animation: chatia-card-in 200ms var(--chatia-ease) both;
	transform-origin: top left;
}

.chatia-card__img {
	width: 100%;
	max-height: 150px;
	object-fit: cover;
	border-radius: 10px;
	margin-bottom: 8px;
	border: 1px solid rgba(15,23,42,.08);
	background: rgba(15,23,42,.02);
}

.chatia-card__title {
	font-weight: 800;
	font-size: 13px;
	line-height: 1.2;
	margin-bottom: 4px;
}

.chatia-card__meta {
	font-size: 12px;
	color: rgba(15,23,42,.72);
	margin-bottom: 8px;
}

.chatia-card__price {
	font-weight: 800;
	font-size: 12px;
	color: rgba(15,23,42,.92);
	margin-bottom: 8px;
}

.chatia-card__links {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.chatia-card__link {
	color: var(--chatia-brand);
	text-decoration: underline;
	text-underline-offset: 3px;
	font-size: 12px;
	line-height: 1.2;
	word-break: break-word;
}

.chatia-card__link:hover {
	color: var(--chatia-brand-2);
}

.chatia-card__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 10px;
	border-radius: 10px;
	border: 1px solid rgba(15,23,42,.14);
	background: rgba(37,99,235,.08);
	color: #0f172a;
	font-weight: 800;
	font-size: 12px;
	line-height: 1.1;
	cursor: pointer;
	transition: transform 160ms var(--chatia-ease), border-color 160ms var(--chatia-ease), filter 160ms var(--chatia-ease);
}

.chatia-card__btn:hover {
	border-color: rgba(37,99,235,.35);
	transform: translateY(-1px);
}

.chatia-card__btn:disabled {
	opacity: .65;
	cursor: not-allowed;
	transform: none;
}

.chatia-closure {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
	padding-top: 8px;
	border-top: 1px dashed rgba(15,23,42,.14);
}

.chatia-closure__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 10px;
	border-radius: 9999px;
	border: 1px solid rgba(15,23,42,.14);
	background: #ffffff;
	color: #0f172a;
	text-decoration: none;
	font-weight: 700;
	font-size: 12px;
	line-height: 1.1;
	transition: transform 160ms var(--chatia-ease), border-color 160ms var(--chatia-ease), filter 160ms var(--chatia-ease);
}

.chatia-closure__link:hover {
	border-color: rgba(37,99,235,.35);
	transform: translateY(-1px);
}

.chatia-closure__link--buy {
	background: linear-gradient(180deg, var(--chatia-brand) 0%, var(--chatia-brand-2) 100%);
	border-color: rgba(37,99,235,.22);
	color: #ffffff;
}

.chatia-closure__link--buy:hover {
	filter: brightness(1.04);
}

.chatia-closure__link--wa {
	background: linear-gradient(180deg, #16a34a 0%, #15803d 100%);
	border-color: rgba(22,163,74,.2);
	color: #ffffff;
}

.chatia-closure__link--wa:hover {
	filter: brightness(1.03);
}

.chatia-closure__link--lead {
	background: #ffffff;
	color: rgba(15,23,42,.76);
	border-color: rgba(15,23,42,.10);
}

.chatia-msg--meta {
	align-self: center;
	background: transparent;
	color: rgba(15,23,42,.65);
	padding: 0;
	font-size: 12px;
	animation: chatia-fade 180ms var(--chatia-ease) both;
}

.chatia-msg--typing {
	font-style: italic;
}

.chatia-msg--typing::after {
	content: "...";
	display: inline-block;
	margin-left: 4px;
	width: 1.2em;
	overflow: hidden;
	vertical-align: bottom;
	animation: chatia-dots 1.1s steps(4, end) infinite;
}

.chatia-panel__composer {
	flex: 0 0 auto;
	display: flex;
	gap: 8px;
	padding: 10px;
	background: var(--chatia-bg);
	border-top: 1px solid rgba(15,23,42,.08);
}

.chatia-panel__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 10px;
	background: #ffffff;
	border-top: 1px solid rgba(15,23,42,.08);
}

.chatia-action {
	flex: 1 1 30%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	text-decoration: none;
	border-radius: 12px;
	padding: 10px 12px;
	font-weight: 700;
	font-size: 13px;
	border: 1px solid rgba(15,23,42,.12);
	color: #0f172a;
	background: #ffffff;
	cursor: pointer;
	transition: transform 160ms var(--chatia-ease), background 160ms var(--chatia-ease), border-color 160ms var(--chatia-ease), box-shadow 160ms var(--chatia-ease), filter 160ms var(--chatia-ease);
}

#chatia-root a.chatia-action,
#chatia-root button.chatia-action {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 6px !important;
	padding: 10px 12px !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	border-radius: 12px !important;
	border: 1px solid rgba(15,23,42,.12) !important;
	color: #0f172a !important;
	text-decoration: none !important;
	background: #ffffff !important;
	box-shadow: none !important;
}

#chatia-root .chatia-panel__actions {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: stretch !important;
	padding: 10px !important;
	gap: 8px !important;
	background: #ffffff !important;
}

#chatia-root .chatia-lead__input,
#chatia-root .chatia-lead__textarea {
	width: 100% !important;
	border: 1px solid rgba(15,23,42,.14) !important;
	border-radius: 12px !important;
	padding: 10px 12px !important;
	font-size: 13px !important;
	line-height: 1.2 !important;
	color: var(--chatia-text) !important;
	background: #ffffff !important;
}

#chatia-root .chatia-lead__consent {
	font-size: 12px !important;
	line-height: 1.2 !important;
	color: rgba(15,23,42,.78) !important;
}

.chatia-action:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(17,24,39,.12);
}

.chatia-action:hover {
	border-color: rgba(17,24,39,.35);
	transform: translateY(-1px);
}

.chatia-action:active {
	transform: translateY(0) scale(.99);
}

.chatia-action--primary {
	background: linear-gradient(180deg, var(--chatia-brand) 0%, var(--chatia-brand-2) 100%);
	color: #fff;
	border-color: rgba(37,99,235,.22);
}

#chatia-root a.chatia-action--primary,
#chatia-root button.chatia-action--primary {
	color: #fff !important;
	border-color: rgba(37,99,235,.22) !important;
	background: linear-gradient(180deg, var(--chatia-brand) 0%, var(--chatia-brand-2) 100%) !important;
}

.chatia-action--primary:hover {
	filter: brightness(1.05);
}

.chatia-action--wa {
	background: linear-gradient(180deg, #16a34a 0%, #15803d 100%);
	border-color: rgba(22,163,74,.2);
	color: #ffffff;
}

#chatia-root a.chatia-action--wa,
#chatia-root button.chatia-action--wa {
	color: #ffffff !important;
	border-color: rgba(22,163,74,.2) !important;
	background: linear-gradient(180deg, #16a34a 0%, #15803d 100%) !important;
}

#chatia-root a.chatia-action--ghost,
#chatia-root button.chatia-action--ghost {
	color: rgba(15,23,42,.72) !important;
	background: transparent !important;
	border-color: transparent !important;
	text-decoration: underline !important;
}

#chatia-root .chatia-action--ghost:hover {
	color: var(--chatia-brand) !important;
	background: transparent !important;
	border-color: transparent !important;
	filter: none !important;
	transform: none !important;
}

.chatia-action--wa:hover {
	filter: brightness(1.03);
}

.chatia-action--ghost {
	background: transparent;
	color: rgba(15,23,42,.72);
	border-color: transparent;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.chatia-action.is-hidden {
	display: none;
}

.chatia-lead {
	padding: 10px;
	background: var(--chatia-bg);
	border-top: 1px solid rgba(15,23,42,.08);
	overflow: hidden;
	max-height: 280px;
	opacity: 1;
	transform: translateY(0);
	transition: max-height 220ms var(--chatia-ease), opacity 220ms var(--chatia-ease), transform 220ms var(--chatia-ease), padding 220ms var(--chatia-ease), border-color 220ms var(--chatia-ease);
}

.chatia-lead.is-hidden {
	max-height: 0;
	opacity: 0;
	transform: translateY(-6px);
	padding-top: 0;
	padding-bottom: 0;
	border-top-color: transparent;
	pointer-events: none;
}

.chatia-lead__title {
	font-weight: 800;
	font-size: 13px;
	margin-bottom: 8px;
	color: #0f172a;
}

.chatia-lead__fields {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.chatia-lead__input,
.chatia-lead__textarea {
	width: 100%;
	border: 1px solid rgba(15,23,42,.14);
	border-radius: 12px;
	padding: 10px 12px;
	font-size: 13px;
	outline: none;
}

.chatia-lead__input:focus,
.chatia-lead__textarea:focus {
	border-color: rgba(17,24,39,.45);
	box-shadow: 0 0 0 3px rgba(17,24,39,.12);
}

.chatia-lead__consent {
	display: flex;
	gap: 8px;
	align-items: center;
	font-size: 12px;
	color: rgba(15,23,42,.78);
}

.chatia-lead__actions {
	display: flex;
	gap: 8px;
}

.chatia-panel__input {
	flex: 1 1 auto;
	border: 1px solid rgba(15,23,42,.14);
	border-radius: 12px;
	padding: 10px 12px;
	font-size: 13px;
	outline: none;
	background: rgba(255,255,255,.92);
	transition: border-color 160ms var(--chatia-ease), box-shadow 160ms var(--chatia-ease), background 160ms var(--chatia-ease);
}

#chatia-root .chatia-panel__input {
	border: 1px solid rgba(15,23,42,.14) !important;
	color: var(--chatia-text) !important;
}

.chatia-panel__input:focus {
	border-color: rgba(17,24,39,.45);
	box-shadow: 0 0 0 3px rgba(17,24,39,.12);
	background: #ffffff;
}

.chatia-panel__send {
	flex: 0 0 auto;
	border: 0;
	border-radius: 12px;
	padding: 10px 12px;
	background: linear-gradient(180deg, var(--chatia-brand) 0%, var(--chatia-brand-2) 100%);
	color: #fff;
	cursor: pointer;
	font-weight: 600;
	transition: transform 160ms var(--chatia-ease), filter 160ms var(--chatia-ease);
}

#chatia-root .chatia-panel__send {
	border: 0 !important;
	color: #fff !important;
}

.chatia-panel__send:disabled {
	opacity: .55;
	cursor: not-allowed;
}

.chatia-panel__send:hover:not(:disabled) {
	filter: brightness(1.05);
}

.chatia-panel__send:active:not(:disabled) {
	transform: scale(.99);
}

.chatia-panel__hint {
	padding: 8px 12px 10px;
	font-size: 11px;
	color: rgba(15,23,42,.65);
	background: #ffffff;
	border-top: 1px solid rgba(15,23,42,.06);
}

@keyframes chatia-msg-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes chatia-card-in {
	from {
		opacity: 0;
		transform: translateY(8px) scale(.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes chatia-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes chatia-dots {
	0% { width: 0; }
	100% { width: 1.2em; }
}

.chatia-panel__messages::-webkit-scrollbar {
	width: 10px;
}

.chatia-panel__messages::-webkit-scrollbar-thumb {
	background: rgba(15,23,42,.18);
	border-radius: 999px;
	border: 2px solid rgba(248,250,252,1);
}

.chatia-panel__messages::-webkit-scrollbar-thumb:hover {
	background: rgba(15,23,42,.28);
}

@media (prefers-reduced-motion: reduce) {
	.chatia-bubble,
	.chatia-panel,
	.chatia-msg,
	.chatia-card,
	.chatia-action,
	.chatia-panel__send,
	.chatia-panel__close,
	.chatia-lead {
		transition: none !important;
		animation: none !important;
	}
	.chatia-msg--typing::after {
		animation: none !important;
	}
}

@media (max-width: 420px) {
	.chatia-root {
		right: 12px;
		bottom: 12px;
	}
	.chatia-panel {
		width: 92vw;
		height: 64vh;
		bottom: 68px;
	}
	.chatia-panel__actions {
		gap: 10px;
	}
	.chatia-action {
		flex: 1 1 calc(50% - 10px);
	}
}
