:root {
	--ofoodi-assistant-ink: #2b102d;
	--ofoodi-assistant-green: #5cae22;
	--ofoodi-assistant-cream: #fbf5ea;
	--ofoodi-assistant-white: #fffdf8;
	--ofoodi-assistant-muted: #695969;
}

.ofoodi-assistant,
.ofoodi-assistant * {
	box-sizing: border-box;
}

.ofoodi-assistant__launcher {
	align-items: center;
	background: var(--ofoodi-assistant-ink);
	border: 0;
	border-radius: 999px;
	bottom: max(1.1rem, env(safe-area-inset-bottom));
	box-shadow: 0 14px 34px rgb(43 16 45 / 28%);
	color: #fff;
	cursor: pointer;
	display: flex;
	font: 700 0.93rem/1.1 Arial, sans-serif;
	gap: 0.58rem;
	justify-content: center;
	min-height: 3.25rem;
	padding: 0.42rem 1rem 0.42rem 0.45rem;
	position: fixed;
	right: clamp(0.75rem, 2.5vw, 1.5rem);
	z-index: 99980;
}

.ofoodi-assistant__launcher:hover,
.ofoodi-assistant__launcher:focus-visible {
	background: #401b42;
	transform: translateY(-2px);
}

.ofoodi-assistant__launcher:focus-visible,
.ofoodi-assistant__close:focus-visible,
.ofoodi-assistant__suggestions button:focus-visible,
.ofoodi-assistant__form textarea:focus-visible,
.ofoodi-assistant__form button:focus-visible,
.ofoodi-assistant__handoff a:focus-visible {
	outline: 3px solid #f2bd4c;
	outline-offset: 3px;
}

.ofoodi-assistant__launcher-mark {
	align-items: center;
	background: var(--ofoodi-assistant-green);
	border-radius: 50%;
	display: flex;
	height: 2.4rem;
	justify-content: center;
	width: 2.4rem;
}

.ofoodi-assistant__launcher svg,
.ofoodi-assistant__close svg,
.ofoodi-assistant__form button svg {
	fill: none;
	height: 1.35rem;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
	width: 1.35rem;
}

.ofoodi-assistant__dialog {
	background: transparent;
	border: 0;
	bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 4.1rem);
	height: min(42rem, calc(100dvh - 7rem));
	margin: 0;
	max-height: 42rem;
	max-width: 25.5rem;
	overflow: visible;
	padding: 0;
	position: fixed;
	right: clamp(0.75rem, 2.5vw, 1.5rem);
	top: auto;
	width: min(25.5rem, calc(100vw - 1.5rem));
	z-index: 99981;
}

.ofoodi-assistant__dialog::backdrop {
	background: rgb(24 8 25 / 24%);
	backdrop-filter: blur(2px);
}

.ofoodi-assistant__sheet {
	background: var(--ofoodi-assistant-cream);
	border: 1px solid rgb(43 16 45 / 12%);
	border-radius: 1.4rem;
	box-shadow: 0 24px 70px rgb(43 16 45 / 24%);
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
}

.ofoodi-assistant__header {
	align-items: flex-start;
	background: var(--ofoodi-assistant-ink);
	color: #fff;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	padding: 1.2rem 1.2rem 1.1rem;
}

.ofoodi-assistant__eyebrow {
	color: #b8e796;
	font: 800 0.7rem/1.2 Arial, sans-serif;
	letter-spacing: 0.18em;
	margin: 0 0 0.35rem;
	text-transform: uppercase;
}

.ofoodi-assistant__header h2 {
	color: inherit;
	font: 700 clamp(1.42rem, 5vw, 1.8rem)/1.05 Georgia, serif;
	letter-spacing: -0.025em;
	margin: 0;
}

.ofoodi-assistant__close {
	align-items: center;
	background: rgb(255 255 255 / 12%);
	border: 0;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	display: flex;
	flex: 0 0 auto;
	height: 2.75rem;
	justify-content: center;
	width: 2.75rem;
}

.ofoodi-assistant__conversation {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 0.7rem;
	overflow-y: auto;
	padding: 1rem 1rem 0.45rem;
	scroll-behavior: smooth;
}

.ofoodi-assistant__message {
	border-radius: 1rem;
	color: var(--ofoodi-assistant-ink);
	font: 500 0.91rem/1.48 Arial, sans-serif;
	max-width: 89%;
	padding: 0.78rem 0.9rem;
}

.ofoodi-assistant__message p {
	color: inherit;
	font: inherit;
	margin: 0;
}

.ofoodi-assistant__message--assistant {
	align-self: flex-start;
	background: var(--ofoodi-assistant-white);
	border-bottom-left-radius: 0.25rem;
}

.ofoodi-assistant__message--customer {
	align-self: flex-end;
	background: var(--ofoodi-assistant-green);
	border-bottom-right-radius: 0.25rem;
	color: #142208;
}

.ofoodi-assistant__message--waiting {
	color: var(--ofoodi-assistant-muted);
	font-style: italic;
}

.ofoodi-assistant__products {
	display: grid;
	gap: 0.45rem;
	margin-top: 0.65rem;
}

.ofoodi-assistant__product {
	align-items: center;
	background: var(--ofoodi-assistant-white);
	border: 1px solid rgb(43 16 45 / 10%);
	border-radius: 0.8rem;
	color: var(--ofoodi-assistant-ink);
	display: grid;
	font: 700 0.82rem/1.25 Arial, sans-serif;
	gap: 0.65rem;
	grid-template-columns: 3rem 1fr auto;
	min-height: 3.4rem;
	padding: 0.25rem 0.55rem 0.25rem 0.25rem;
	text-decoration: none;
}

.ofoodi-assistant__product:hover {
	border-color: var(--ofoodi-assistant-green);
}

.ofoodi-assistant__product img {
	background: #f6f0e6;
	border-radius: 0.6rem;
	height: 3rem;
	object-fit: contain;
	width: 3rem;
}

.ofoodi-assistant__product span:last-child {
	color: var(--ofoodi-assistant-green);
	font-size: 1rem;
}

.ofoodi-assistant__suggestions {
	display: flex;
	gap: 0.45rem;
	overflow-x: auto;
	padding: 0.55rem 1rem 0.65rem;
	scrollbar-width: none;
}

.ofoodi-assistant__suggestions::-webkit-scrollbar {
	display: none;
}

.ofoodi-assistant__suggestions button {
	background: transparent;
	border: 1px solid rgb(43 16 45 / 24%);
	border-radius: 999px;
	color: var(--ofoodi-assistant-ink);
	cursor: pointer;
	flex: 0 0 auto;
	font: 700 0.76rem/1 Arial, sans-serif;
	min-height: 2.35rem;
	padding: 0.58rem 0.78rem;
}

.ofoodi-assistant__suggestions button:hover {
	background: rgb(92 174 34 / 12%);
	border-color: var(--ofoodi-assistant-green);
}

.ofoodi-assistant__handoff {
	background: #edf8e6;
	border-block: 1px solid rgb(92 174 34 / 24%);
	color: var(--ofoodi-assistant-ink);
	font: 500 0.78rem/1.4 Arial, sans-serif;
	margin: 0 1rem 0.55rem;
	padding: 0.7rem 0.78rem;
}

.ofoodi-assistant__handoff p {
	color: inherit;
	font: inherit;
	margin: 0 0 0.55rem;
}

.ofoodi-assistant__handoff a {
	color: var(--ofoodi-assistant-ink);
	font-weight: 800;
	text-underline-offset: 0.2em;
}

.ofoodi-assistant__form {
	align-items: flex-end;
	background: var(--ofoodi-assistant-white);
	border: 1px solid rgb(43 16 45 / 18%);
	border-radius: 1rem;
	display: flex;
	gap: 0.55rem;
	margin: 0 1rem;
	padding: 0.35rem;
}

.ofoodi-assistant__form:focus-within {
	border-color: var(--ofoodi-assistant-green);
	box-shadow: 0 0 0 3px rgb(92 174 34 / 12%);
}

.ofoodi-assistant__form textarea {
	background: transparent;
	border: 0;
	color: var(--ofoodi-assistant-ink);
	font: 500 0.9rem/1.35 Arial, sans-serif;
	max-height: 6rem;
	min-height: 2.55rem;
	outline: 0;
	overflow-y: auto;
	padding: 0.62rem 0.45rem;
	resize: none;
	width: 100%;
}

.ofoodi-assistant__form button {
	align-items: center;
	background: var(--ofoodi-assistant-ink);
	border: 0;
	border-radius: 0.75rem;
	color: #fff;
	cursor: pointer;
	display: flex;
	flex: 0 0 auto;
	height: 2.75rem;
	justify-content: center;
	width: 2.75rem;
}

.ofoodi-assistant__form button:disabled {
	cursor: wait;
	opacity: 0.58;
}

.ofoodi-assistant__safety {
	color: var(--ofoodi-assistant-muted);
	font: 500 0.67rem/1.35 Arial, sans-serif;
	margin: 0;
	padding: 0.55rem 1rem 0.8rem;
	text-align: center;
}

.ofoodi-assistant__sr-only {
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

@media (max-width: 600px) {
	.ofoodi-assistant__launcher {
		bottom: max(0.7rem, env(safe-area-inset-bottom));
		right: 0.7rem;
	}

	.ofoodi-assistant__dialog {
		bottom: 0;
		height: min(38rem, calc(100dvh - 3.5rem));
		max-height: calc(100dvh - 3.5rem);
		max-width: none;
		right: 0;
		width: 100%;
	}

	.ofoodi-assistant__sheet {
		border-bottom-left-radius: 0;
		border-bottom-right-radius: 0;
		border-inline: 0;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.ofoodi-assistant__launcher {
		animation: ofoodi-assistant-arrive 480ms cubic-bezier(.2, .8, .2, 1) both;
		transition: background-color 160ms ease, transform 160ms ease;
	}

	.ofoodi-assistant__dialog[open] .ofoodi-assistant__sheet {
		animation: ofoodi-assistant-rise 240ms cubic-bezier(.2, .8, .2, 1) both;
	}

	.ofoodi-assistant__message {
		animation: ofoodi-assistant-message 180ms ease-out both;
	}
}

@keyframes ofoodi-assistant-arrive {
	from { opacity: 0; transform: translateY(0.75rem); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes ofoodi-assistant-rise {
	from { opacity: 0; transform: translateY(1.25rem) scale(.985); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ofoodi-assistant-message {
	from { opacity: 0; transform: translateY(0.3rem); }
	to { opacity: 1; transform: translateY(0); }
}
