/* Chatbot widget styles */
#ai-bot { position: fixed; right: 18px; bottom: 18px; z-index: 99999; font-family: Verdana, sans-serif; }
.ai-bot-toggle { background: #ff8c00; color: #fff; border: none; width:56px; height:56px; border-radius:50%; box-shadow:0 8px 24px rgba(0,0,0,0.18); cursor:pointer; font-size:22px; position:relative; }
.ai-bot-toggle::after { content: ''; position: absolute; left: -8px; top: -8px; right: -8px; bottom: -8px; border-radius: 50%; box-shadow: 0 0 0 rgba(255,140,0,0.45); animation: ring 2.2s infinite; opacity:0.45; }
.ai-bot-toggle.pulse { animation: bump 0.9s ease-in-out 3; }
.ai-bot-panel { position: absolute; right: 0; bottom: 70px; width:320px; max-width:calc(100vw - 40px); height:420px; background:#fff; border-radius:12px; box-shadow:0 20px 60px rgba(0,0,0,0.35); overflow:hidden; display:flex; flex-direction:column; transform:translateY(0); opacity:1; transition:transform .28s ease, opacity .28s ease; transform-origin: bottom right; }
.ai-bot-panel.hidden { opacity:0; transform:translateY(12px) scale(.99); pointer-events:none; visibility:hidden; }
.ai-bot-header { background:#4c3e6c; color:#fff; padding:10px 12px; display:flex; align-items:center; justify-content:space-between; font-weight:bold; }
.ai-bot-header button { background:transparent; border:none; color:#fff; font-size:20px; cursor:pointer; }
.ai-bot-messages { flex:1; padding:12px; overflow:auto; background:linear-gradient(#fafafa,#fff); }
.ai-msg.bot { background:#fffbe6; color:#111; align-self:flex-start; border:1px solid #ffedb5; }
.ai-msg { display:inline-block; margin:8px 0; padding:8px 10px; border-radius:10px; max-width:82%; line-height:1.3; font-size:14px; }
.ai-msg.bot { background:#f1f1f1; color:#111; align-self:flex-start; }
.ai-msg.user { background:#4c3e6c; color:#fff; align-self:flex-end; }
.ai-msg.bot strong{ display:block; margin-bottom:6px; color:#222; }
.ai-msg.bot p{ margin:6px 0; color:#333; font-size:13px; }
.ai-msg.bot ul{ margin:6px 0 0; padding-left:18px; }
.ai-msg.bot li{ margin:6px 0; font-size:13px; color:#333; }
.ai-bot-input { display:flex; gap:8px; padding:10px; border-top:1px solid #eee; }
.ai-bot-input input { flex:1; padding:8px 10px; border-radius:8px; border:1px solid #ddd; }
.ai-bot-input button { background:#ff8c00; color:#fff; border:none; padding:8px 12px; border-radius:8px; cursor:pointer; }
.ai-quick { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
.ai-quick button { background:#eee; border:none; padding:6px 8px; border-radius:6px; cursor:pointer; font-size:12px; }
@media (max-width:420px) { .ai-bot-panel { right:8px; left:8px; width:auto; height:360px; } }

/* Mobile: make the panel behave like a bottom sheet and reduce toggle size */
@media (max-width:480px) {
	#ai-bot { right: 12px; bottom: 12px; }
	.ai-bot-toggle { width:48px; height:48px; font-size:20px; }
	.ai-bot-toggle::after { left:-6px; top:-6px; right:-6px; bottom:-6px; }
	.ai-bot-panel { position: fixed; left: 8px; right: 8px; bottom: 72px; width: auto; height: 54vh; max-width: none; border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,0.36); transform-origin: bottom center; }
	.ai-bot-panel.hidden { transform: translateY(8px) scale(.995); }
	.ai-bot-header { padding:10px; }
	.ai-bot-messages { padding:10px; }
	.ai-welcome { right: 72px; bottom: 14px; }
}

@keyframes ring {
	0% { box-shadow: 0 0 0 0 rgba(255,140,0,0.45); }
	70% { box-shadow: 0 0 0 18px rgba(255,140,0,0); }
	100% { box-shadow: 0 0 0 0 rgba(255,140,0,0); }
}

@keyframes bump {
	0% { transform: translateY(0); }
	25% { transform: translateY(-6px); }
	50% { transform: translateY(0); }
	75% { transform: translateY(-3px); }
	100% { transform: translateY(0); }
}

/* corner variants: add one of these classes to #ai-bot to move the widget */
.ai-bot.bottom-left { left: 18px; right: auto; }
.ai-bot.top-right { top: 18px; bottom: auto; }
.ai-bot.top-left { top: 18px; left: 18px; right: auto; bottom: auto; }

/* welcome bubble near the toggle */
.ai-welcome { position: fixed; right: 96px; bottom: 24px; background: linear-gradient(180deg,#fff,#fffef8); border:1px solid #ffe5b2; color:#222; padding:10px 14px; border-radius:14px; box-shadow:0 12px 36px rgba(0,0,0,0.18); font-weight:600; font-size:14px; max-width:260px; opacity:0; transform:translateY(6px) scale(.98); transition:opacity .28s ease, transform .28s ease; z-index:100000; }
.ai-welcome.show { opacity:1; transform:translateY(0) scale(1); }
.ai-welcome::after { content:''; position:absolute; right:12px; bottom:-8px; width:12px; height:12px; background:#fff; transform: rotate(45deg); border-left:1px solid #ffe5b2; border-bottom:1px solid #ffe5b2; }

@media (max-width:480px){ .ai-welcome { right: 84px; bottom: 16px; max-width:200px; font-size:13px; } }


