:root {
	--astmindai-chat-accent: #0f766e;
	--astmindai-chat-ink: #17202a;
	--astmindai-chat-muted: #667085;
	--astmindai-chat-panel: #ffffff;
	--astmindai-chat-line: #d7dde5;
	--astmindai-chat-soft: #f4f7f9;
	--astmindai-chat-warm: #f59e0b;
}

.astmindai-chat,
.astmindai-chat * {
	box-sizing: border-box;
}

.astmindai-chat {
	color: var(--astmindai-chat-ink);
	font-family: inherit;
	--astmindai-chat-width: 390px;
	--astmindai-chat-height: 660px;
}

.astmindai-chat .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal;
}

.astmindai-chat--floating {
	bottom: 22px;
	position: fixed;
	right: 22px;
	z-index: 99999;
}

.astmindai-chat--position-bottom-left {
	left: 22px;
	right: auto;
}

.astmindai-chat__launcher {
	align-items: center;
	background: var(--astmindai-chat-accent);
	border: 0;
	border-radius: 999px;
	box-shadow: 0 14px 34px rgba(15, 23, 42, 0.24);
	color: #ffffff;
	cursor: pointer;
	display: flex;
	font-size: 16px;
	font-weight: 800;
	height: 58px;
	justify-content: center;
	letter-spacing: 0;
	width: 58px;
}

.astmindai-chat__panel {
	background: var(--astmindai-chat-panel);
	border: 1px solid rgba(23, 32, 42, 0.1);
	border-radius: 8px;
	box-shadow: 0 22px 56px rgba(15, 23, 42, 0.22);
	display: flex;
	flex-direction: column;
	height: min(var(--astmindai-chat-height), calc(100vh - 118px));
	max-height: calc(100vh - 118px);
	max-width: calc(100vw - 28px);
	min-height: 420px;
	min-width: 320px;
	overflow: hidden;
	resize: both;
	width: min(var(--astmindai-chat-width), calc(100vw - 28px));
}

.astmindai-chat--floating .astmindai-chat__panel {
	bottom: 76px;
	opacity: 0;
	pointer-events: none;
	position: absolute;
	right: 0;
	transform: translateY(12px);
	transition: opacity 160ms ease, transform 160ms ease;
	visibility: hidden;
}

.astmindai-chat--position-bottom-left .astmindai-chat__panel {
	left: 0;
	right: auto;
}

.astmindai-chat--floating.is-open .astmindai-chat__panel {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
	visibility: visible;
}

.astmindai-chat--inline .astmindai-chat__panel {
	box-shadow: 0 12px 34px rgba(15, 23, 42, 0.12);
	height: 620px;
	max-width: 100%;
	width: 100%;
}

.astmindai-chat__header {
	align-items: center;
	background: var(--astmindai-chat-ink);
	color: #ffffff;
	display: flex;
	gap: 14px;
	justify-content: space-between;
	min-height: 74px;
	padding: 16px;
}

.astmindai-chat__actions {
	align-items: center;
	display: flex;
	flex: 0 0 auto;
	gap: 7px;
}

.astmindai-chat__header strong,
.astmindai-chat__header span {
	display: block;
	letter-spacing: 0;
}

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

.astmindai-chat__header span {
	color: rgba(255, 255, 255, 0.76);
	font-size: 12px;
	line-height: 1.35;
	margin-top: 3px;
}

.astmindai-chat__icon-button {
	align-items: center;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	color: #ffffff;
	cursor: pointer;
	display: flex;
	font-size: 22px;
	height: 34px;
	justify-content: center;
	line-height: 1;
	width: 34px;
}

.astmindai-chat__icon-button:disabled {
	cursor: default;
	opacity: 0.45;
}

.astmindai-chat__messages {
	background: linear-gradient(180deg, #ffffff 0%, var(--astmindai-chat-soft) 100%);
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	overflow-y: auto;
	padding: 16px;
	scroll-behavior: smooth;
}

.astmindai-chat__message {
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.45;
	max-width: 88%;
	overflow-wrap: anywhere;
	padding: 11px 12px;
}

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

.astmindai-chat__message--bot {
	align-self: flex-start;
	background: #ffffff;
	border: 1px solid var(--astmindai-chat-line);
	text-align: justify;
}

.astmindai-chat__message--user {
	align-self: flex-end;
	background: var(--astmindai-chat-accent);
	color: #ffffff;
}

.astmindai-chat__message--typing {
	color: var(--astmindai-chat-muted);
	font-style: italic;
}

.astmindai-chat__products {
	display: grid;
	gap: 10px;
	margin: 2px 0 6px;
}

.astmindai-chat__product {
	background: #ffffff;
	border: 1px solid var(--astmindai-chat-line);
	border-radius: 8px;
	display: grid;
	gap: 10px;
	grid-template-columns: 74px minmax(0, 1fr);
	padding: 10px;
}

.astmindai-chat__product-image {
	aspect-ratio: 1;
	background: var(--astmindai-chat-soft);
	border-radius: 6px;
	height: 74px;
	object-fit: cover;
	width: 74px;
}

.astmindai-chat__product-body {
	min-width: 0;
}

.astmindai-chat__product-title,
.astmindai-chat__product-price,
.astmindai-chat__product-stock {
	display: block;
}

.astmindai-chat__product-title {
	font-size: 14px;
	line-height: 1.3;
}

.astmindai-chat__product-price {
	color: var(--astmindai-chat-accent);
	font-size: 13px;
	font-weight: 800;
	margin-top: 4px;
}

.astmindai-chat__product-stock {
	color: var(--astmindai-chat-muted);
	font-size: 12px;
	margin-top: 2px;
}

.astmindai-chat__product-description {
	color: var(--astmindai-chat-muted);
	font-size: 12px;
	line-height: 1.35;
	margin: 7px 0 0;
	text-align: justify;
}

.astmindai-chat__product-link {
	align-items: center;
	background: var(--astmindai-chat-ink);
	border-radius: 6px;
	color: #ffffff;
	display: inline-flex;
	font-size: 12px;
	font-weight: 700;
	justify-content: center;
	line-height: 1;
	margin-top: 9px;
	min-height: 32px;
	padding: 8px 10px;
	text-decoration: none;
}

.astmindai-chat__suggestions {
	background: #ffffff;
	border-top: 1px solid var(--astmindai-chat-line);
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 10px 12px;
}

.astmindai-chat__suggestion {
	background: #ffffff;
	border: 1px solid var(--astmindai-chat-line);
	border-radius: 999px;
	color: var(--astmindai-chat-ink);
	cursor: pointer;
	flex: 0 0 auto;
	font-size: 12px;
	line-height: 1;
	min-height: 32px;
	padding: 8px 11px;
	white-space: nowrap;
}

.astmindai-chat__suggestion:hover,
.astmindai-chat__suggestion:focus-visible {
	border-color: var(--astmindai-chat-accent);
	color: var(--astmindai-chat-accent);
}

.astmindai-chat__form {
	align-items: center;
	background: #ffffff;
	border-top: 1px solid var(--astmindai-chat-line);
	display: grid;
	gap: 8px;
	grid-template-columns: minmax(0, 1fr) 42px;
	padding: 12px;
}

.astmindai-chat__input {
	background: var(--astmindai-chat-soft);
	border: 1px solid transparent;
	border-radius: 8px;
	color: var(--astmindai-chat-ink);
	font: inherit;
	font-size: 14px;
	height: 42px;
	min-width: 0;
	outline: none;
	padding: 0 12px;
	width: 100%;
}

.astmindai-chat__input:focus {
	background: #ffffff;
	border-color: var(--astmindai-chat-accent);
	box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--astmindai-chat-accent) 18%, transparent);
}

.astmindai-chat__send {
	align-items: center;
	background: var(--astmindai-chat-accent);
	border: 0;
	border-radius: 8px;
	color: #ffffff;
	cursor: pointer;
	display: flex;
	font-size: 18px;
	height: 42px;
	justify-content: center;
	width: 42px;
}

.astmindai-chat__form.is-loading .astmindai-chat__send,
.astmindai-chat__send:disabled {
	cursor: wait;
	opacity: 0.7;
}

@media (max-width: 560px) {
	.astmindai-chat--floating {
		bottom: 14px;
		right: 14px;
	}

	.astmindai-chat--position-bottom-left {
		left: 14px;
		right: auto;
	}

	.astmindai-chat--floating .astmindai-chat__panel {
		bottom: 68px;
	}

	.astmindai-chat__panel {
		height: min(620px, calc(100vh - 96px));
		min-height: 0;
		min-width: 0;
		resize: none;
		width: calc(100vw - 28px);
	}

	.astmindai-chat__product {
		grid-template-columns: 62px minmax(0, 1fr);
	}

	.astmindai-chat__product-image {
		height: 62px;
		width: 62px;
	}
}
