.bless-ai,
.bless-ai * {
	box-sizing: border-box;
}

.bless-ai {
	--bless-ai-theme: #ff7a1a;
	--bless-ai-theme-dark: #d65f00;
	--bless-ai-text: #1f2933;
	--bless-ai-muted: #627080;
	--bless-ai-panel: rgba(255, 255, 255, 0.9);
	--bless-ai-border: rgba(255, 255, 255, 0.58);
	--bless-ai-shadow: 0 24px 70px rgba(20, 24, 31, 0.28);
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 99999;
	font-family: inherit;
	color: var(--bless-ai-text);
}

.bless-ai--bottom-left {
	right: auto;
	left: 24px;
}

.bless-ai .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;
}

.bless-ai__launcher {
	width: 64px;
	height: 64px;
	border: 0;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--bless-ai-theme);
	color: #fff;
	box-shadow: 0 16px 34px rgba(255, 122, 26, 0.36);
	cursor: pointer;
	transform: translateY(0);
	transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.bless-ai__launcher:hover,
.bless-ai__launcher:focus-visible {
	background: var(--bless-ai-theme-dark);
	box-shadow: 0 18px 42px rgba(255, 122, 26, 0.44);
	transform: translateY(-2px);
	outline: none;
}

.bless-ai__launcher-mark {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-weight: 800;
	font-size: 14px;
	letter-spacing: 0;
	background: rgba(255, 255, 255, 0.18);
	border: 1px solid rgba(255, 255, 255, 0.36);
}

.bless-ai__window {
	position: absolute;
	right: 0;
	bottom: 82px;
	width: min(390px, calc(100vw - 32px));
	height: min(640px, calc(100vh - 124px));
	min-height: 440px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--bless-ai-border);
	border-radius: 8px;
	background: var(--bless-ai-panel);
	box-shadow: var(--bless-ai-shadow);
	backdrop-filter: blur(18px);
	opacity: 0;
	pointer-events: none;
	transform: translateY(16px) scale(0.98);
	transform-origin: right bottom;
	transition: opacity 190ms ease, transform 190ms ease;
}

.bless-ai--bottom-left .bless-ai__window {
	right: auto;
	left: 0;
	transform-origin: left bottom;
}

.bless-ai--open .bless-ai__window {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

.bless-ai__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 16px;
	background: linear-gradient(135deg, var(--bless-ai-theme), #ff9f45);
	color: #fff;
}

.bless-ai__brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.bless-ai__logo {
	width: 40px;
	height: 40px;
	flex: 0 0 40px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: rgba(255, 255, 255, 0.18);
	border: 1px solid rgba(255, 255, 255, 0.34);
	font-weight: 800;
}

.bless-ai__heading {
	display: grid;
	gap: 3px;
	min-width: 0;
}

.bless-ai__title {
	font-size: 16px;
	line-height: 1.2;
	font-weight: 800;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bless-ai__status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	line-height: 1;
	opacity: 0.95;
}

.bless-ai__status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #32d583;
	box-shadow: 0 0 0 4px rgba(50, 213, 131, 0.18);
}

.bless-ai__close {
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.bless-ai__close:hover,
.bless-ai__close:focus-visible {
	background: rgba(255, 255, 255, 0.28);
	outline: none;
}

.bless-ai__messages {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px;
	overflow-y: auto;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.16)),
		rgba(245, 247, 250, 0.78);
}

.bless-ai__message {
	display: flex;
	width: 100%;
}

.bless-ai__message--user {
	justify-content: flex-end;
}

.bless-ai__message--bot {
	justify-content: flex-start;
}

.bless-ai__bubble {
	max-width: 86%;
	padding: 11px 12px 8px;
	border-radius: 8px;
	background: #fff;
	color: var(--bless-ai-text);
	box-shadow: 0 8px 20px rgba(20, 24, 31, 0.08);
}

.bless-ai__message--user .bless-ai__bubble {
	background: var(--bless-ai-theme);
	color: #fff;
}

.bless-ai__message-text {
	font-size: 14px;
	line-height: 1.5;
	white-space: pre-line;
	word-break: break-word;
}

.bless-ai__time {
	display: block;
	margin-top: 6px;
	font-size: 11px;
	line-height: 1;
	color: var(--bless-ai-muted);
	text-align: right;
}

.bless-ai__message--user .bless-ai__time {
	color: rgba(255, 255, 255, 0.78);
}

.bless-ai__typing {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-width: 58px;
	min-height: 34px;
}

.bless-ai__typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--bless-ai-theme);
	animation: bless-ai-bounce 900ms ease-in-out infinite;
}

.bless-ai__typing span:nth-child(2) {
	animation-delay: 120ms;
}

.bless-ai__typing span:nth-child(3) {
	animation-delay: 240ms;
}

.bless-ai__products {
	display: grid;
	gap: 8px;
	margin-top: 10px;
}

.bless-ai__product {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr);
	gap: 10px;
	padding: 8px;
	border: 1px solid rgba(98, 112, 128, 0.16);
	border-radius: 8px;
	background: rgba(250, 251, 252, 0.96);
}

.bless-ai__product-image {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 6px;
	background: #eef1f4;
}

.bless-ai__product-body {
	display: grid;
	gap: 4px;
	min-width: 0;
}

.bless-ai__product-title {
	font-size: 13px;
	line-height: 1.25;
	color: var(--bless-ai-text);
}

.bless-ai__product-price {
	font-size: 13px;
	line-height: 1.2;
	font-weight: 800;
	color: var(--bless-ai-theme-dark);
}

.bless-ai__product-meta {
	font-size: 11px;
	line-height: 1.25;
	color: var(--bless-ai-muted);
}

.bless-ai__product-link,
.bless-ai__action {
	justify-self: start;
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	padding: 6px 10px;
	border-radius: 6px;
	background: var(--bless-ai-theme);
	color: #fff;
	font-size: 12px;
	line-height: 1;
	font-weight: 700;
	text-decoration: none;
}

.bless-ai__product-link:hover,
.bless-ai__product-link:focus-visible,
.bless-ai__action:hover,
.bless-ai__action:focus-visible {
	background: var(--bless-ai-theme-dark);
	color: #fff;
	outline: none;
}

.bless-ai__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.bless-ai__form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 10px;
	padding: 12px;
	border-top: 1px solid rgba(98, 112, 128, 0.16);
	background: rgba(255, 255, 255, 0.92);
}

.bless-ai__input {
	width: 100%;
	min-width: 0;
	height: 44px;
	padding: 0 13px;
	border: 1px solid #374151;
	border-radius: 8px;
	background: #111827;
	color: #ffffff;
	caret-color: #ffffff;
	font: inherit;
	font-size: 14px;
	outline: none;
}

.bless-ai__input::placeholder {
	color: #9ca3af;
	opacity: 1;
}

.bless-ai__input:focus {
	border-color: var(--bless-ai-theme);
	box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.18);
}

.bless-ai__send {
	min-width: 70px;
	height: 44px;
	border: 0;
	border-radius: 8px;
	background: var(--bless-ai-theme);
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 800;
	cursor: pointer;
}

.bless-ai__send:hover,
.bless-ai__send:focus-visible {
	background: var(--bless-ai-theme-dark);
	outline: none;
}

.bless-ai__send:disabled,
.bless-ai__input:disabled {
	cursor: wait;
	opacity: 0.68;
}

@keyframes bless-ai-bounce {
	0%,
	80%,
	100% {
		transform: translateY(0);
		opacity: 0.45;
	}

	40% {
		transform: translateY(-4px);
		opacity: 1;
	}
}

@media (prefers-color-scheme: dark) {
	.bless-ai {
		--bless-ai-text: #eef2f6;
		--bless-ai-muted: #aab6c4;
		--bless-ai-panel: rgba(23, 28, 36, 0.9);
		--bless-ai-border: rgba(255, 255, 255, 0.14);
		--bless-ai-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
	}

	.bless-ai__messages {
		background:
			linear-gradient(180deg, rgba(27, 33, 43, 0.68), rgba(17, 21, 28, 0.72)),
			rgba(17, 21, 28, 0.86);
	}

	.bless-ai__bubble,
	.bless-ai__form {
		background: rgba(31, 38, 49, 0.96);
	}

	.bless-ai__input {
		border-color: #374151;
		background: #111827;
		color: #ffffff;
	}

	.bless-ai__product {
		border-color: rgba(255, 255, 255, 0.12);
		background: rgba(17, 21, 28, 0.86);
	}

	.bless-ai__product-title {
		color: var(--bless-ai-text);
	}
}

@media (max-width: 480px) {
	.bless-ai {
		right: 14px;
		bottom: 14px;
		left: auto;
	}

	.bless-ai--bottom-left {
		left: 14px;
		right: auto;
	}

	.bless-ai__window {
		right: 0;
		width: calc(100vw - 28px);
		height: min(680px, calc(100vh - 104px));
		min-height: 390px;
		bottom: 76px;
	}

	.bless-ai--bottom-left .bless-ai__window {
		left: 0;
		right: auto;
	}

	.bless-ai__bubble {
		max-width: 91%;
	}

	.bless-ai__form {
		grid-template-columns: minmax(0, 1fr) 64px;
	}
}
