/* Ebees Green – "Ask Ebees" chat. Uses the theme's colour tokens, with fallbacks for any theme. */
.eg-ai-launch, .eg-ai {
	--ai-deep: var(--eg-deep, #00520B);
	--ai-leaf: var(--eg-leaf, #5CAF17);
	--ai-lime: var(--eg-lime, #DFFF00);
	--ai-mint: var(--eg-mint, #EEF5E6);
	--ai-mint2: var(--eg-mint-2, #F6FAF1);
	--ai-line: var(--eg-line, #E2EAD9);
	--ai-text: var(--eg-text, #17241A);
	--ai-muted: var(--eg-muted, #5E6B60);
	font-family: var(--eg-font, "Poppins", system-ui, sans-serif);
}

/* Launcher: pill on desktop, round on phones; WhatsApp button sits above it. */
.eg-ai-launch {
	position: fixed; z-index: 56;
	right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px));
	display: inline-flex; align-items: center; gap: 8px;
	height: 54px; padding: 0 16px; border: 0; border-radius: 999px; cursor: pointer;
	background: var(--ai-deep); color: #fff; font-weight: 600; font-size: 14.5px;
	box-shadow: 0 10px 26px rgba(0, 82, 11, .32);
	transition: transform .15s, box-shadow .15s;
}
.eg-ai-launch:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0, 82, 11, .38); }
.eg-ai-launch svg { width: 24px; height: 24px; color: var(--ai-lime); }
@media (max-width: 599px) { .eg-ai-launch { width: 54px; padding: 0; justify-content: center; } .eg-ai-launch span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
body.eg-ai-on .eg-wa-float { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
body.eg-ai-on.single-product .eg-ai-launch { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
body.eg-ai-on.single-product .eg-wa-float { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 900px) {
	body.eg-ai-on.single-product .eg-ai-launch { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
	body.eg-ai-on.single-product .eg-wa-float { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
body.eg-ai-open .eg-ai-launch, body.eg-ai-open .eg-wa-float { opacity: 0; pointer-events: none; }
body.eg-ai-open .eg-consent { display: none !important; }

/* Panel: full-screen sheet on phones, floating card on larger screens. */
.eg-ai {
	position: fixed; z-index: 100000; inset: 0;
	display: flex; flex-direction: column;
	background: #fff; color: var(--ai-text);
	padding-bottom: env(safe-area-inset-bottom, 0px);
	opacity: 0; transform: translateY(16px); transition: opacity .2s, transform .2s;
}
.eg-ai.is-open { opacity: 1; transform: none; }
.eg-ai[hidden] { display: none !important; }
@media (min-width: 600px) {
	.eg-ai { inset: auto max(20px, env(safe-area-inset-right, 0px)) 20px auto; width: 390px; height: min(640px, calc(100vh - 40px)); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(10, 40, 12, .28); border: 1px solid var(--ai-line); }
}

.eg-ai__head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; padding-top: calc(14px + env(safe-area-inset-top, 0px)); background: var(--ai-deep); color: #fff; flex: none; }
@media (min-width: 600px) { .eg-ai__head { padding-top: 14px; } }
.eg-ai__avatar { width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; }
.eg-ai__avatar img { width: 26px; height: 26px; }
.eg-ai__title { flex: 1; min-width: 0; line-height: 1.25; }
.eg-ai__title strong { display: block; font-size: 15.5px; }
.eg-ai__title span { font-size: 12px; color: rgba(255, 255, 255, .78); }
.eg-ai__close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; display: grid; place-items: center; }
.eg-ai__close:hover { background: rgba(255, 255, 255, .22); }
.eg-ai__close svg { width: 20px; height: 20px; }

.eg-ai__log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(180deg, var(--ai-mint2), #fff 240px); overscroll-behavior: contain; }
.eg-ai__msg { display: flex; }
.eg-ai__msg--user { justify-content: flex-end; }
.eg-ai__bubble { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.eg-ai__msg--bot .eg-ai__bubble { background: #fff; border: 1px solid var(--ai-line); border-bottom-left-radius: 6px; box-shadow: 0 2px 6px rgba(0, 82, 11, .04); }
.eg-ai__msg--user .eg-ai__bubble { background: var(--ai-deep); color: #fff; border-bottom-right-radius: 6px; }
.eg-ai__bubble a { color: var(--ai-deep); font-weight: 600; text-decoration: underline; }
.eg-ai__msg--user .eg-ai__bubble a { color: var(--ai-lime); }
.eg-ai__typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.eg-ai__typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ai-leaf); animation: eg-ai-dot 1s infinite ease-in-out; }
.eg-ai__typing i:nth-child(2) { animation-delay: .15s; }
.eg-ai__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes eg-ai-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* Product suggestions. */
.eg-ai__cards { display: grid; gap: 8px; margin: 0 0 4px; }
.eg-ai__card { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 10px; background: #fff; border: 1px solid var(--ai-line); border-radius: 14px; }
.eg-ai__card-img { display: block; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; background: var(--ai-mint2); }
.eg-ai__card-img img { width: 100%; height: 100%; object-fit: cover; }
.eg-ai__card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.eg-ai__card-name { font-weight: 600; font-size: 13.5px; color: var(--ai-text); text-decoration: none; line-height: 1.3; }
.eg-ai__card-price { font-weight: 700; color: var(--ai-deep); font-size: 14px; }
.eg-ai__card-min { font-size: 11.5px; color: var(--ai-muted); }
.eg-ai__card-btns { display: flex; gap: 6px; margin-top: 6px; }
.eg-ai__add, .eg-ai__view { flex: 1; min-height: 36px; padding: 6px 10px; border-radius: 9px; font-family: inherit; font-weight: 600; font-size: 12.5px; line-height: 1.2; text-align: center; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.eg-ai__add { background: var(--ai-deep); color: #fff; border: 0; }
.eg-ai__add:hover { background: #0B6A17; }
.eg-ai__add[disabled] { opacity: .85; cursor: default; }
.eg-ai__view { background: #fff; color: var(--ai-deep); border: 1.5px solid var(--ai-line); }
.eg-ai__view:hover { border-color: var(--ai-leaf); }

.eg-ai__chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 14px 10px; flex: none; scrollbar-width: none; }
.eg-ai__chips::-webkit-scrollbar { display: none; }
.eg-ai__chips[hidden] { display: none; }
.eg-ai__chip { flex: none; padding: 8px 12px; border-radius: 999px; border: 1.5px solid var(--ai-line); background: #fff; color: var(--ai-deep); font-family: inherit; font-weight: 600; font-size: 12.5px; line-height: 1.2; cursor: pointer; white-space: nowrap; }
.eg-ai__chip:hover { border-color: var(--ai-leaf); background: var(--ai-mint2); }

.eg-ai__form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--ai-line); background: #fff; flex: none; }
.eg-ai__form textarea { flex: 1; min-height: 46px; max-height: 120px; resize: none; margin: 0; padding: 12px 14px; border: 1.5px solid #D5E2CB; border-radius: 14px; background: var(--ai-mint2); font-family: inherit; font-size: 16px; line-height: 1.35; color: var(--ai-text); }
.eg-ai__form textarea:focus { outline: none; border-color: var(--ai-leaf); background: #fff; box-shadow: 0 0 0 4px rgba(92, 175, 23, .16); }
.eg-ai__send { width: 46px; height: 46px; flex: none; border: 0; border-radius: 50%; background: var(--ai-deep); color: var(--ai-lime); cursor: pointer; display: grid; place-items: center; }
.eg-ai__send:hover { background: #0B6A17; }
.eg-ai__send svg { width: 22px; height: 22px; }
.eg-ai__foot { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 12px 10px; font-size: 11.5px; color: var(--ai-muted); text-align: center; flex: none; }
.eg-ai__foot a { color: var(--ai-deep); font-weight: 600; font-size: 12.5px; }
.eg-ai :focus-visible { outline: 3px solid var(--ai-leaf); outline-offset: 2px; }

/* FAQ page accordion. */
.eg-faq { display: grid; gap: 10px; max-width: 820px; }
.eg-faq__item { border: 1px solid var(--eg-line, #E2EAD9); border-radius: 14px; background: #fff; }
.eg-faq__item[open] { border-color: #C9DDB8; box-shadow: 0 8px 24px rgba(0, 82, 11, .06); }
.eg-faq__item summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 18px; font-weight: 600; color: var(--eg-deep, #00520B); position: relative; }
.eg-faq__item summary::-webkit-details-marker { display: none; }
.eg-faq__item summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; background: var(--eg-mint, #EEF5E6); display: grid; place-items: center; font-size: 18px; line-height: 1; }
.eg-faq__item[open] summary::after { content: "–"; }
.eg-faq__a { padding: 0 18px 16px; color: var(--eg-muted, #5E6B60); }
.eg-faq__a p:last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) { .eg-ai, .eg-ai-launch, .eg-ai__typing i { transition: none; animation: none; } }
