/* Elelova AI Chatbot — floating widget (gold/cream brand) */
:root{
	--elcb-gold:#B08D3F;
	--elcb-gold-deep:#8a6d2c;
	--elcb-cream:#F7F3EA;
	--elcb-ink:#2b2722;
	--elcb-line:rgba(176,141,63,.22);
}

#elcb-root{position:fixed;right:20px;bottom:20px;z-index:99980;font-family:'Jost',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;}

/* Floating action button */
.elcb-fab{
	width:60px;height:60px;border:0;border-radius:50%;cursor:pointer;
	background:linear-gradient(135deg,var(--elcb-gold) 0%,var(--elcb-gold-deep) 100%);
	color:#fff;display:flex;align-items:center;justify-content:center;
	box-shadow:0 8px 24px rgba(138,109,44,.38);
	transition:transform .25s ease,box-shadow .25s ease,opacity .2s ease;
}
.elcb-fab:hover{transform:translateY(-3px) scale(1.04);box-shadow:0 12px 30px rgba(138,109,44,.46);}
.elcb-fab:active{transform:scale(.96);}
.elcb-open .elcb-fab{transform:scale(.9);opacity:.92;}

/* Panel — position:fixed so the visualViewport-based keyboard handling can
   anchor it reliably (absolute-to-root broke when the keyboard opened). */
.elcb-panel{
	position:fixed;right:20px;bottom:92px;width:340px;max-width:calc(100vw - 32px);
	height:480px;max-height:calc(100dvh - 120px);
	background:var(--elcb-cream);border:1px solid var(--elcb-line);border-radius:18px;
	box-shadow:0 18px 50px rgba(43,39,34,.28);
	display:flex;flex-direction:column;overflow:hidden;
	transform-origin:bottom right;
	animation:elcb-pop .22s cubic-bezier(.18,.89,.32,1.28);
}
@keyframes elcb-pop{from{opacity:0;transform:translateY(14px) scale(.92);}to{opacity:1;transform:none;}}
/* The [hidden] attribute (JS toggle) must win over .elcb-panel display, otherwise
   the panel stays visible (can't close / opens on load). */
.elcb-panel[hidden]{display:none !important;}
/* Keyboard open: lift the panel above it and tuck the FAB away. */
#elcb-root.elcb-kb .elcb-panel{bottom:calc(var(--elcb-kb,0px) + 10px);}
#elcb-root.elcb-kb .elcb-fab{opacity:0;pointer-events:none;transform:scale(.5);}

/* Header */
.elcb-head{
	display:flex;align-items:center;gap:8px;padding:13px 14px;
	background:linear-gradient(135deg,var(--elcb-gold) 0%,var(--elcb-gold-deep) 100%);
	color:#fff;flex-shrink:0;
}
.elcb-head b{font-size:15px;font-weight:600;letter-spacing:.2px;}
.elcb-dot{width:8px;height:8px;border-radius:50%;background:#7ee29a;box-shadow:0 0 0 3px rgba(126,226,154,.28);flex-shrink:0;}
.elcb-sub{font-size:11px;opacity:.82;margin-left:2px;font-weight:300;}
.elcb-close{margin-left:auto;background:transparent;border:0;color:#fff;font-size:22px;line-height:1;cursor:pointer;opacity:.85;padding:0 2px;transition:opacity .2s;}
.elcb-close:hover{opacity:1;}

/* Body */
.elcb-body{
	flex:1;overflow-y:auto;padding:14px 12px;display:flex;flex-direction:column;gap:9px;
	background:
		radial-gradient(circle at 100% 0,rgba(176,141,63,.06),transparent 60%),
		var(--elcb-cream);
}
.elcb-body::-webkit-scrollbar{width:6px;}
.elcb-body::-webkit-scrollbar-thumb{background:rgba(176,141,63,.3);border-radius:3px;}

/* Messages */
.elcb-msg{display:flex;max-width:86%;}
.elcb-bubble{
	padding:9px 13px;border-radius:15px;font-size:13.5px;line-height:1.5;
	word-wrap:break-word;white-space:pre-wrap;
}
.elcb-bubble a{color:inherit;text-decoration:underline;font-weight:600;}
.elcb-bot{align-self:flex-start;}
.elcb-bot .elcb-bubble{background:#fff;color:var(--elcb-ink);border:1px solid var(--elcb-line);border-bottom-left-radius:5px;box-shadow:0 2px 6px rgba(43,39,34,.05);}
.elcb-user{align-self:flex-end;}
.elcb-user .elcb-bubble{
	background:linear-gradient(135deg,var(--elcb-gold) 0%,var(--elcb-gold-deep) 100%);
	color:#fff;border-bottom-right-radius:5px;
}
.elcb-user .elcb-bubble a{color:#fff;}

/* Typing indicator */
.elcb-typing .elcb-bubble{display:flex;gap:4px;align-items:center;padding:12px 14px;}
.elcb-typing span{width:6px;height:6px;border-radius:50%;background:var(--elcb-gold);opacity:.5;animation:elcb-bounce 1.2s infinite ease-in-out;}
.elcb-typing span:nth-child(2){animation-delay:.18s;}
.elcb-typing span:nth-child(3){animation-delay:.36s;}
@keyframes elcb-bounce{0%,60%,100%{transform:translateY(0);opacity:.4;}30%{transform:translateY(-5px);opacity:1;}}

/* Input */
.elcb-input{display:flex;align-items:center;gap:8px;padding:10px 11px;background:#fff;border-top:1px solid var(--elcb-line);flex-shrink:0;}
.elcb-input input{
	flex:1;border:1px solid var(--elcb-line);border-radius:22px;padding:10px 14px;
	font-size:13.5px;color:var(--elcb-ink);background:var(--elcb-cream);outline:none;
	font-family:inherit;transition:border-color .2s,box-shadow .2s;
}
.elcb-input input:focus{border-color:var(--elcb-gold);box-shadow:0 0 0 3px rgba(176,141,63,.12);}
.elcb-input button{
	width:40px;height:40px;flex-shrink:0;border:0;border-radius:50%;cursor:pointer;
	background:linear-gradient(135deg,var(--elcb-gold) 0%,var(--elcb-gold-deep) 100%);
	color:#fff;display:flex;align-items:center;justify-content:center;
	transition:transform .18s,opacity .18s;
}
.elcb-input button:hover{transform:scale(1.07);}
.elcb-input button:active{transform:scale(.92);}

/* Lead gate (name + email before chat) */
.elcb-lead{flex:1;display:flex;align-items:center;justify-content:center;padding:16px;}
.elcb-lead-card{width:100%;display:flex;flex-direction:column;gap:10px;}
.elcb-lead-title{margin:0 0 4px;font-size:14.5px;font-weight:600;color:var(--elcb-ink);text-align:center;line-height:1.4;}
.elcb-lead input{
	border:1px solid var(--elcb-line);border-radius:12px;padding:11px 14px;font-size:13.5px;
	color:var(--elcb-ink);background:#fff;outline:none;font-family:inherit;transition:border-color .2s,box-shadow .2s;
}
.elcb-lead input:focus{border-color:var(--elcb-gold);box-shadow:0 0 0 3px rgba(176,141,63,.12);}
.elcb-lead-err{color:#b4413c;font-size:12px;margin:-2px 2px 0;}
.elcb-lead-go{
	margin-top:2px;border:0;border-radius:22px;padding:11px 16px;cursor:pointer;font-size:14px;font-weight:600;
	color:#fff;background:linear-gradient(135deg,var(--elcb-gold) 0%,var(--elcb-gold-deep) 100%);
	transition:transform .18s,opacity .18s;font-family:inherit;
}
.elcb-lead-go:hover{transform:translateY(-1px);}
.elcb-lead-go:disabled{opacity:.6;cursor:default;transform:none;}

/* Mobile */
@media (max-width:480px){
	#elcb-root{right:14px;bottom:14px;}
	.elcb-panel{width:calc(100vw - 24px);max-width:none;height:70dvh;right:14px;bottom:84px;}
	.elcb-fab{width:54px;height:54px;}
}

/* Markdown formatting inside bot replies */
.elcb-bot .elcb-bubble p{margin:0 0 8px;}
.elcb-bot .elcb-bubble p:last-child{margin-bottom:0;}
.elcb-bot .elcb-bubble strong{font-weight:700;color:var(--elcb-gold-deep);}
.elcb-bot .elcb-bubble em{font-style:italic;}
.elcb-bot .elcb-bubble ul{list-style:none;margin:8px 0;padding:0;display:flex;flex-direction:column;gap:7px;}
.elcb-bot .elcb-bubble li{position:relative;padding-left:18px;line-height:1.45;}
.elcb-bot .elcb-bubble li::before{content:"";position:absolute;left:3px;top:7px;width:6px;height:6px;border-radius:50%;background:var(--elcb-gold);}
.elcb-bot .elcb-bubble a{color:var(--elcb-gold-deep);font-weight:600;text-decoration:underline;}
.elcb-bot .elcb-bubble li a{display:inline;}
.elcb-bot .elcb-bubble .elcb-price{display:inline-block;background:var(--elcb-cream);color:var(--elcb-gold-deep);font-weight:700;padding:0 7px;border-radius:6px;font-size:.92em;line-height:1.5;border:1px solid var(--elcb-line);}
