#faqbot-toggle {
  position: fixed; right: 16px; bottom: 16px; z-index: 9999;
  width: 56px; height: 56px; border-radius: 50%; border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
  font-size: 24px; cursor: pointer; background: linear-gradient(135deg,#111827,#0b0c10); color: #e5e7eb;
}
#faqbot-toggle:hover { transform: translateY(-1px); }

#faqbot-panel {
  position: fixed; right: 16px; bottom: 84px; z-index: 9999;
  width: 380px; max-height: 70vh; display: block;
  border-radius: 14px; overflow: hidden; box-shadow: 0 18px 40px rgba(0,0,0,.45);
  background: #0f1115; border: 1px solid #273244; color: #e5e7eb;
  opacity: 0; transform: translateY(12px) scale(.98);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
}
#faqbot-panel.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
#faqbot-header { padding: 10px 12px; font-weight: 700; border-bottom: 1px solid #273244; background: linear-gradient(135deg,#111827,#0b0c10); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#faqbot-mode { background: #111827; color: #e5e7eb; border: 1px solid #273244; border-radius: 8px; padding: 6px 8px; }
#faqbot-messages { padding: 12px 12px; overflow-y: auto; height: 400px; }
.faqbot-msg { margin: 6px 0; font-size: 14px; line-height: 1.5; }
.faqbot-user { text-align: right; }
#faqbot-inputbar { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #273244; background: #0f1115; }
#faqbot-input { flex: 1; padding: 10px 12px; border: 1px solid #273244; border-radius: 10px; background: #111827; color: #e5e7eb; }
#faqbot-input::placeholder { color: #94a3b8; }
#faqbot-send { padding: 10px 14px; border: 1px solid #273244; border-radius: 10px; background: #22c55e; color: #04120a; cursor: pointer; font-weight: 700; }

/* Light theme for widget (inherits from page theme toggle) */
html[data-theme="light"] #faqbot-toggle { background: #ffffff; color: #0b0c10; border-color: #e5e7eb; }
html[data-theme="light"] #faqbot-panel { background: #ffffff; border-color: #e5e7eb; color: #0b0c10; }
html[data-theme="light"] #faqbot-header { border-bottom-color: #e5e7eb; background: linear-gradient(135deg,#f8fafc,#ffffff); }
html[data-theme="light"] #faqbot-mode { background: #ffffff; color: #0b0c10; border-color: #e5e7eb; }
html[data-theme="light"] #faqbot-inputbar { border-top-color: #e5e7eb; background: #ffffff; }
html[data-theme="light"] #faqbot-input { background: #f8fafc; border-color: #e5e7eb; color: #0b0c10; }
html[data-theme="light"] #faqbot-send { border-color: #16a34a; }

/* Floating contact (bottom-left) */
#contact-floating {
  position: fixed; left: 16px; bottom: 16px; z-index: 9998;
  display: flex; flex-direction: column; gap: 10px;
}
.contact-item {
  width: 46px; height: 46px; border-radius: 12px; position: relative;
  display: flex; align-items: center; justify-content: center;
  background: #0f1115; color: #e5e7eb; border: 1px solid #273244;
  box-shadow: 0 8px 28px rgba(0,0,0,.35); text-decoration: none;
}
.contact-item:hover { transform: translateY(-1px); }
.contact-item svg { width: 22px; height: 22px; display: block; }
.contact-tip {
  position: absolute; left: 56px; bottom: 0; transform: translateY(-4px);
  padding: 8px 10px; border-radius: 10px; white-space: nowrap;
  background: #0f1115; color: #e5e7eb; border: 1px solid #273244;
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
  opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease;
}
.contact-item:hover .contact-tip, .contact-item:focus .contact-tip { opacity: 1; transform: translateY(-2px); }

/* Light theme for contact */
html[data-theme="light"] .contact-item { background: #ffffff; color: #0b0c10; border-color: #e5e7eb; }
html[data-theme="light"] .contact-tip { background: #ffffff; color: #0b0c10; border-color: #e5e7eb; box-shadow: 0 8px 28px rgba(0,0,0,.12); }

/* Responsive for chatbox panel */
@media (max-width: 520px) {
  #faqbot-panel { right: 0; left: 0; bottom: 0; top: 0; width: 100%; max-height: none; border-radius: 0; }
  #faqbot-messages { height: calc(100vh - 210px); }
  #faqbot-header { padding: 12px; }
  #faqbot-inputbar { padding: 12px; gap: 10px; }
  #faqbot-input { padding: 12px; }
  #faqbot-send { padding: 12px 14px; }
}