.vmaa-app {
	background: #ffffff;
	border: 1px solid rgba(21, 32, 54, 0.12);
	border-radius: 16px;
	box-shadow: 0 18px 48px rgba(21, 32, 54, 0.08);
	color: #142033;
	display: grid;
	gap: 18px;
	margin: 24px 0;
	padding: clamp(18px, 3vw, 28px);
}

.vmaa-app label {
	color: #142033;
	display: grid;
	font-weight: 800;
	gap: 8px;
	margin: 0;
}

.vmaa-app input,
.vmaa-app select,
.vmaa-app textarea {
	background: #f8fafc;
	border: 1px solid rgba(21, 32, 54, 0.16);
	border-radius: 11px;
	box-shadow: none;
	color: #111827;
	font-size: 16px;
	min-height: 48px;
	padding: 11px 13px;
	width: 100%;
}

.vmaa-app input:focus,
.vmaa-app select:focus,
.vmaa-app textarea:focus {
	background: #fff;
	border-color: #0f766e;
	box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
	outline: 0;
}

.vmaa-app button,
.vmaa-floating-toggle {
	align-items: center;
	background: #0f766e;
	border: 0;
	border-radius: 11px;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font-weight: 900;
	justify-content: center;
	min-height: 48px;
	padding: 0 20px;
	text-decoration: none;
	transition: background 160ms ease, transform 160ms ease;
}

.vmaa-app button:hover,
.vmaa-floating-toggle:hover {
	background: #0b5f59;
	transform: translateY(-1px);
}

.vmaa-search-form {
	display: grid;
	gap: 12px;
}

.vmaa-search-row,
.vmaa-return-grid {
	display: grid;
	gap: 12px;
	grid-template-columns: minmax(0, 1fr) auto;
}

.vmaa-return-grid {
	align-items: end;
	grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}

.vmaa-response,
.vmaa-return-result {
	display: grid;
	gap: 18px;
}

.vmaa-answer,
.vmaa-loading,
.vmaa-empty,
.vmaa-error,
.vmaa-success {
	border-radius: 12px;
	padding: 14px 16px;
}

.vmaa-answer {
	position: relative;
	display: grid;
	gap: 12px;
	padding: 18px;
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(241, 249, 248, 0.96)),
		radial-gradient(circle at top right, rgba(15, 118, 110, 0.14), transparent 36%);
	border: 1px solid rgba(15, 118, 110, 0.16);
	border-radius: 16px;
	box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
	color: #142033;
	line-height: 1.6;
	overflow: hidden;
}

.vmaa-answer::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 4px;
	background: #0f766e;
}

.vmaa-answer-label {
	align-items: center;
	display: inline-flex;
	justify-self: start;
	min-height: 26px;
	padding: 0 10px;
	background: #142033;
	border-radius: 999px;
	color: #fff;
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 0;
	text-transform: uppercase;
}

.vmaa-answer-content {
	display: grid;
	gap: 8px;
}

.vmaa-answer p {
	margin: 0;
}

.vmaa-answer p + p {
	padding-top: 8px;
	border-top: 1px solid rgba(15, 118, 110, 0.1);
}

.vmaa-answer strong {
	color: #081421;
	font-weight: 900;
}

.vmaa-answer-link {
	align-items: center;
	display: inline-flex;
	min-height: 28px;
	margin: 0 3px;
	padding: 0 10px;
	background: #0f766e;
	border-radius: 999px;
	color: #fff;
	font-size: 12px;
	font-weight: 900;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

.vmaa-answer-link:hover,
.vmaa-answer-link:focus-visible {
	background: #142033;
	color: #fff;
	outline: 0;
}

.vmaa-loading {
	background: #f3f6f8;
	color: #526070;
}

.vmaa-empty {
	background: #f8fafc;
	color: #526070;
}

.vmaa-error {
	background: #fff1f0;
	color: #b42318;
}

.vmaa-success {
	background: #ecfdf3;
	color: #067647;
	display: grid;
	gap: 6px;
}

.vmaa-success strong {
	font-size: 22px;
}

.vmaa-success span {
	font-weight: 800;
}

.vmaa-product-grid {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.vmaa-results-head {
	align-items: center;
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 2px;
}

.vmaa-results-head span {
	color: #526070;
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0;
	text-transform: uppercase;
}

.vmaa-results-head strong {
	align-items: center;
	background: #eef3ef;
	border: 1px solid rgba(15, 118, 110, 0.16);
	border-radius: 999px;
	color: #0f766e;
	display: inline-flex;
	font-size: 13px;
	font-weight: 900;
	justify-content: center;
	min-height: 28px;
	min-width: 34px;
}

.vmaa-product-card {
	background: #fff;
	border: 1px solid rgba(21, 32, 54, 0.12);
	border-radius: 16px;
	color: #142033;
	display: grid;
	grid-template-columns: 112px 1fr;
	min-height: 146px;
	overflow: hidden;
	text-decoration: none;
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.vmaa-product-card:hover {
	border-color: #0f766e;
	box-shadow: 0 16px 36px rgba(15, 118, 110, 0.12);
	color: #142033;
	transform: translateY(-2px);
}

.vmaa-product-media {
	position: relative;
	display: grid;
	place-items: center;
	min-height: 146px;
	background:
		linear-gradient(90deg, rgba(20, 32, 51, 0.04) 1px, transparent 1px),
		linear-gradient(180deg, rgba(20, 32, 51, 0.04) 1px, transparent 1px),
		#eef3ef;
	background-size: 22px 22px, 22px 22px, auto;
	overflow: hidden;
}

.vmaa-product-card img,
.vmaa-product-placeholder {
	display: block;
	max-height: 116px;
	max-width: 88px;
	object-fit: contain;
	width: auto;
}

.vmaa-product-sku {
	position: absolute;
	left: 8px;
	bottom: 8px;
	max-width: calc(100% - 16px);
	padding: 4px 8px;
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid rgba(15, 118, 110, 0.16);
	border-radius: 999px;
	color: #526070;
	font-size: 11px;
	font-weight: 900;
	line-height: 1.1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vmaa-product-body {
	display: grid;
	gap: 8px;
	grid-template-rows: auto auto minmax(0, 1fr) auto;
	padding: 14px;
}

.vmaa-product-body strong {
	color: #081421;
	font-size: 16px;
	line-height: 1.25;
}

.vmaa-product-body small {
	color: #607086;
	font-size: 12px;
	line-height: 1.35;
}

.vmaa-product-category {
	justify-self: start;
	color: #0f766e !important;
	font-weight: 900;
}

.vmaa-product-options {
	color: #526070 !important;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.vmaa-product-footer {
	align-items: center;
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding-top: 6px;
	border-top: 1px solid rgba(21, 32, 54, 0.08);
}

.vmaa-product-footer em {
	color: #0f766e;
	font-style: normal;
	font-weight: 900;
}

.vmaa-product-footer span {
	color: #142033;
	font-size: 12px;
	font-weight: 900;
}

.vmaa-return-items {
	display: grid;
	gap: 10px;
}

.vmaa-return-item {
	align-items: center;
	background: #fff;
	border: 1px solid rgba(21, 32, 54, 0.12);
	border-radius: 12px;
	cursor: pointer;
	display: grid !important;
	gap: 12px !important;
	grid-template-columns: auto 1fr;
	padding: 13px 14px;
}

.vmaa-return-item input {
	accent-color: #0f766e;
	min-height: auto;
	width: auto;
}

.vmaa-return-item span {
	display: grid;
	gap: 3px;
}

.vmaa-return-item strong {
	line-height: 1.25;
}

.vmaa-return-item em,
.vmaa-return-item small {
	color: #607086;
	font-style: normal;
}

.vmaa-return-item[data-manual-review="1"] {
	background: #fff7ed;
	border-color: rgba(196, 91, 12, 0.26);
}

.vmaa-return-fields {
	display: grid;
	gap: 12px;
	grid-template-columns: 1fr;
}

.vmaa-floating {
	bottom: 22px;
	position: fixed;
	right: 22px;
	z-index: 9999;
}

.vmaa-floating-panel[hidden],
.vmaa-floating-backdrop[hidden] {
	display: none !important;
}

.vmaa-floating-toggle {
	position: relative;
	z-index: 1;
	box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
}

.vmaa-floating-backdrop {
	position: fixed;
	inset: 0;
	z-index: 2;
	background: rgba(0, 0, 0, 0.62);
	backdrop-filter: blur(3px);
}

.vmaa-floating-panel {
	position: fixed;
	top: 50%;
	left: 50%;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	width: min(980px, calc(100vw - 42px));
	max-height: min(820px, calc(100vh - 42px));
	overflow: hidden;
	background: #fff;
	border: 1px solid rgba(21, 32, 54, 0.14);
	border-radius: 20px;
	box-shadow: 0 34px 90px rgba(8, 20, 33, 0.34);
	transform: translate(-50%, -50%);
	z-index: 3;
}

.vmaa-floating-header {
	align-items: center;
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 20px;
	background:
		linear-gradient(135deg, rgba(20, 32, 51, 0.98), rgba(15, 118, 110, 0.92));
	color: #fff;
}

.vmaa-floating-header div {
	display: grid;
	gap: 3px;
}

.vmaa-floating-header span {
	color: rgba(255, 255, 255, 0.72);
	font-size: 12px;
	font-weight: 900;
	text-transform: uppercase;
}

.vmaa-floating-header strong {
	font-size: 22px;
	line-height: 1.15;
}

.vmaa-floating-header button {
	align-items: center;
	appearance: none;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font-size: 26px;
	font-weight: 800;
	height: 42px;
	justify-content: center;
	line-height: 1;
	padding: 0;
	width: 42px;
}

.vmaa-floating-panel .vmaa-app {
	margin: 0;
	min-height: 0;
	overflow: hidden;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	padding: 18px;
}

.vmaa-floating-panel .vmaa-search-form {
	order: 2;
}

.vmaa-floating-panel .vmaa-search-row {
	grid-template-columns: minmax(0, 1fr) auto;
}

.vmaa-floating-panel .vmaa-response {
	min-height: 0;
	order: 1;
}

.vmaa-chat-log {
	display: grid;
	gap: 14px;
	max-height: min(560px, calc(100vh - 250px));
	overflow: auto;
	padding: 2px 4px 8px;
	scrollbar-width: thin;
}

.vmaa-chat-message {
	display: grid;
	gap: 10px;
	max-width: 86%;
}

.vmaa-chat-message.is-user {
	justify-self: end;
	max-width: min(680px, 82%);
}

.vmaa-chat-message.is-user p {
	margin: 0;
	padding: 13px 15px;
	background: #0f766e;
	border-radius: 16px 16px 4px 16px;
	color: #fff;
	font-weight: 800;
}

.vmaa-chat-message.is-assistant {
	justify-self: start;
	width: min(100%, 820px);
}

.vmaa-chat-message.is-assistant .vmaa-answer {
	box-shadow: none;
}

.vmaa-chat-message .vmaa-product-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vmaa-chat-message .vmaa-return-portal-inline {
	background: #f8fafc;
	border-color: rgba(15, 118, 110, 0.18);
	border-radius: 16px;
	box-shadow: none;
	margin: 0;
	padding: 16px;
}

.vmaa-chat-message .vmaa-return-portal-inline .vmaa-return-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}

body.vmaa-floating-open {
	overflow: hidden;
}

@media (max-width: 720px) {
	.vmaa-search-row,
	.vmaa-return-grid,
	.vmaa-product-card {
		grid-template-columns: 1fr;
	}

	.vmaa-product-media {
		aspect-ratio: 16 / 8;
		min-height: 0;
	}

	.vmaa-product-card img {
		max-height: 150px;
		max-width: 78%;
	}

	.vmaa-floating {
		bottom: 14px;
		right: 14px;
	}

	.vmaa-floating-panel {
		width: calc(100vw - 20px);
		max-height: calc(100vh - 20px);
		border-radius: 16px;
	}

	.vmaa-floating-header strong {
		font-size: 18px;
	}

	.vmaa-floating-panel .vmaa-search-row,
	.vmaa-chat-message .vmaa-return-portal-inline .vmaa-return-grid,
	.vmaa-chat-message .vmaa-product-grid {
		grid-template-columns: 1fr;
	}

	.vmaa-chat-message,
	.vmaa-chat-message.is-user,
	.vmaa-chat-message.is-assistant {
		max-width: 100%;
		width: 100%;
	}
}

@media (max-width: 460px) {
	.vmaa-app {
		padding: 16px;
	}

	.vmaa-answer {
		padding: 16px;
	}

	.vmaa-product-grid {
		grid-template-columns: 1fr;
	}
}
