/* Aisleza Pro: the shopping assistant (button, chat panel, speech bubble). Scoped under .aisleza so
   a theme's button and input styles never win. */
.aisleza .aisleza-pro-assist-btn {
	position: absolute;
	bottom: 14px;
	inset-inline-end: 14px;
	z-index: 6; /* Over the 3D view and the store's checkout card. */
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	margin: 0;
	padding: 0 16px 0 8px;
	border: 0;
	border-radius: 999px;
	background: var(--aisleza-accent, #0e7c66);
	box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
	color: #fff;
	font: 700 14px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
}

.aisleza .aisleza-pro-assist-btn::before,
.aisleza .aisleza-pro-assist__avatar {
	content: "";
	flex: none;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='5' r='2' fill='%23111'/%3E%3Cpath d='M16 7v3' stroke='%23111' stroke-width='1.6'/%3E%3Crect x='6' y='10' width='20' height='15' rx='7' fill='%23e9edf2'/%3E%3Crect x='9' y='13' width='14' height='8' rx='4' fill='%23111'/%3E%3Ccircle cx='13' cy='17' r='1.6' fill='%238ff4ff'/%3E%3Ccircle cx='19' cy='17' r='1.6' fill='%238ff4ff'/%3E%3C/svg%3E") center / 24px no-repeat;
}

.aisleza .aisleza-pro-assist-btn:focus-visible,
.aisleza .aisleza-pro-assist button:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
	box-shadow: 0 0 0 5px #1b2440;
}

.aisleza .aisleza-pro-assist-btn[hidden],
.aisleza .aisleza-pro-assist[hidden],
.aisleza .aisleza-pro-assist__bubble[hidden],
.aisleza .aisleza-pro-assist__chips[hidden] {
	display: none;
}

.aisleza .aisleza-pro-assist {
	position: absolute;
	bottom: 14px;
	inset-inline-end: 14px;
	z-index: 7;
	display: flex;
	flex-direction: column;
	width: 360px;
	max-width: calc(100% - 28px);
	height: min(540px, calc(100% - 70px)); /* Fixed, so the header never jumps as the chat grows. */
	overflow: hidden;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .38);
	color: #1b2440;
	font: 400 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.aisleza .aisleza-pro-assist__head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 12px 12px 14px;
	background: #11141c;
	color: #fff;
}

.aisleza .aisleza-pro-assist__who {
	display: flex;
	flex: 1 1 auto; /* Pushes the close button to the end (button margins are reset on hover and focus). */
	flex-direction: column;
	min-width: 0;
	line-height: 1.2;
}

.aisleza .aisleza-pro-assist__who span {
	opacity: .7;
	font-size: 12px;
}

.aisleza .aisleza-pro-assist__close {
	flex: none;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / 16px no-repeat;
	cursor: pointer;
}

.aisleza .aisleza-pro-assist__log {
	flex: 1 1 auto;
	min-height: 120px;
	padding: 14px;
	overflow-y: auto;
	background: #f5f6f9;
}

.aisleza .aisleza-pro-assist__msg {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0 0 10px;
}

.aisleza .aisleza-pro-assist__msg p {
	max-width: 88%;
	margin: 0;
	padding: 9px 12px;
	border-radius: 14px 14px 14px 4px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

.aisleza .aisleza-pro-assist__msg--user {
	align-items: flex-end;
}

.aisleza .aisleza-pro-assist__msg--user p {
	border-radius: 14px 14px 4px 14px;
	background: var(--aisleza-accent, #0e7c66);
	color: #fff;
}

.aisleza .aisleza-pro-assist__msg.is-thinking p {
	opacity: .7;
	font-style: italic;
}

.aisleza .aisleza-pro-assist__cards {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.aisleza .aisleza-pro-assist__card {
	display: flex;
	gap: 10px;
	padding: 8px;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

.aisleza .aisleza-pro-assist__img {
	flex: none;
	width: 64px;
	height: 64px;
	overflow: hidden;
	border-radius: 8px;
	background: #eef0f4;
}

.aisleza .aisleza-pro-assist__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.aisleza .aisleza-pro-assist__info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.aisleza .aisleza-pro-assist__info strong {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.aisleza .aisleza-pro-assist__price {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	color: #4a4e5e;
	font-size: 13px;
}

.aisleza .aisleza-pro-assist__tag {
	padding: 1px 6px;
	border-radius: 999px;
	background: #fde7c4;
	color: #7a4a00;
	font-size: 11px;
	font-style: normal;
	font-weight: 700;
}

.aisleza .aisleza-pro-assist__tag--out {
	background: #eceef2;
	color: #4a4e5e;
}

.aisleza .aisleza-pro-assist__actions {
	display: flex;
	gap: 6px;
	margin-top: 4px;
}

.aisleza .aisleza-pro-assist__go,
.aisleza .aisleza-pro-assist__view,
.aisleza .aisleza-pro-assist__chip {
	min-height: 32px;
	margin: 0;
	padding: 0 12px;
	border-radius: 999px;
	font: 600 13px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
}

.aisleza .aisleza-pro-assist__go {
	border: 0;
	background: #11141c;
	color: #fff;
}

.aisleza .aisleza-pro-assist__go--wide {
	align-self: flex-start;
	min-height: 36px;
	padding: 0 16px;
}

.aisleza .aisleza-pro-assist__view,
.aisleza .aisleza-pro-assist__chip {
	border: 1px solid #d5d9e2;
	background: #fff;
	color: #1b2440;
}

.aisleza .aisleza-pro-assist__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 8px 12px 0;
	background: #fff;
}

.aisleza .aisleza-pro-assist__form {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 10px 12px 12px;
	background: #fff;
}

.aisleza .aisleza-pro-assist__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 42px;
	margin: 0;
	padding: 0 14px;
	border: 1.5px solid #d5d9e2;
	border-radius: 999px;
	background: #fff;
	color: #1b2440;
	font: 400 15px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
	box-shadow: none;
}

.aisleza .aisleza-pro-assist__input:focus {
	border-color: #1b2440;
	outline: none;
}

.aisleza .aisleza-pro-assist__send {
	flex: none;
	width: 42px;
	height: 42px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--aisleza-accent, #0e7c66) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M3 20l18-8L3 4v6l12 2-12 2z'/%3E%3C/svg%3E") 55% 50% / 18px no-repeat;
	cursor: pointer;
}

/* Over the robot's head while it guides. */
.aisleza .aisleza-pro-assist__bubble {
	position: absolute;
	z-index: 4;
	width: max-content; /* Keeps its width near the edge of the view. */
	max-width: 220px;
	padding: 8px 12px;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
	color: #1b2440;
	font: 600 14px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
	pointer-events: none;
	transform: translate(-50%, calc(-100% - 10px));
}

.aisleza .aisleza-pro-assist__bubble::after {
	content: "";
	position: absolute;
	bottom: -6px;
	left: 50%;
	width: 12px;
	height: 12px;
	background: #fff;
	transform: translateX(-50%) rotate(45deg);
}

@media (max-width: 700px) {
	.aisleza .aisleza-pro-assist-btn {
		bottom: 14px;
		padding: 0 7px;
	}

	.aisleza .aisleza-pro-assist-btn__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.aisleza .aisleza-pro-assist {
		inset-inline: 8px;
		bottom: 8px;
		width: auto;
		max-width: none;
		/* A lower sheet, so the store and Ava (she keeps ahead, above it) stay in view. */
		height: 44%;
		min-height: 300px;
	}

	/* While walking somewhere: a small pill on the right, clear of the joystick. */
	.aisleza .aisleza-pro-assist.is-min {
		inset-inline-start: auto;
		bottom: 14px;
		height: auto;
		border-radius: 999px;
	}

	.aisleza .aisleza-pro-assist.is-min .aisleza-pro-assist__head {
		padding: 6px 6px 6px 8px;
	}

	.aisleza .aisleza-pro-assist.is-min .aisleza-pro-assist__who span {
		display: none;
	}

	/* While walking somewhere: only the header shows, so the store stays in view. */
	.aisleza .aisleza-pro-assist.is-min .aisleza-pro-assist__log,
	.aisleza .aisleza-pro-assist.is-min .aisleza-pro-assist__chips,
	.aisleza .aisleza-pro-assist.is-min .aisleza-pro-assist__form {
		display: none;
	}
}
