/* Scoped to #cbpopper-root and ID selectors to avoid theme overrides */
#cbpopper-root #chatbot-bubble {
  position: fixed !important;
  bottom: calc(env(safe-area-inset-bottom, 20px) + 12px) !important;
  right: 20px !important;
  width: 64px !important;
  height: 64px !important;
  background: linear-gradient(135deg,#00689a,#00a0d2) !important;
  color: #fff !important;
  border-radius: 50% !important;
  font-size: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 2147483647 !important; /* very high to avoid theme overlay */
  box-shadow: 0 10px 30px rgba(2,45,79,0.28) !important;
  transition: transform .14s ease, box-shadow .14s ease !important;
}
#cbpopper-root #chatbot-bubble:hover { transform: translateY(-4px) !important; }

/* Chat window */
#cbpopper-root #chatbot-window {
  position: fixed !important;
  bottom: 92px !important;
  right: 20px !important;
  width: 380px !important;
  max-height: 640px !important;
  background: linear-gradient(180deg,#ffffff,#fbfdff) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 50px rgba(7,20,30,0.28) !important;
  display: none !important;
  flex-direction: column !important;
  overflow: hidden !important;
  z-index: 2147483646 !important;
  opacity: 0 !important;
  transform: translateY(10px) !important;
  transition: all 0.28s cubic-bezier(.2,.9,.2,1) !important;
  border: 1px solid rgba(6,30,50,0.04) !important;
}
#cbpopper-root #chatbot-window.open { display: flex !important; opacity: 1 !important; transform: translateY(0) !important; }

/* Header / title */
#cbpopper-root #chatbot-header { background: linear-gradient(90deg,#0073aa,#00a0d2) !important; color: #fff !important; padding: 12px 14px !important; display:flex !important; justify-content:space-between !important; align-items:center !important; }
#cbpopper-root .chatbot-avatar { width:40px !important; height:40px !important; background:rgba(255,255,255,0.95) !important; color:#0073aa !important; border-radius:50% !important; display:flex !important; align-items:center !important; justify-content:center !important; font-weight:700 !important; }

/* Messages */
#cbpopper-root #chatbot-messages { flex:1 !important; padding:16px !important; overflow-y:auto !important; background:linear-gradient(180deg,#fbfcff,#fff) !important; }
#cbpopper-root .chatbot-user, #cbpopper-root .chatbot-bot { max-width:80% !important; padding:10px 14px !important; border-radius:14px !important; margin-bottom:12px !important; line-height:1.45 !important; word-wrap:break-word !important; }
#cbpopper-root .chatbot-user { background: linear-gradient(90deg,#0073aa,#00a0d2) !important; color:#fff !important; margin-left:auto !important; }
#cbpopper-root .chatbot-bot { background: linear-gradient(180deg,#f6f8fb,#eef4fb) !important; color:#15324a !important; }

/* Input */
#cbpopper-root #chatbot-input-area { display:flex !important; gap:10px !important; padding:12px !important; border-top:1px solid rgba(5,34,56,0.04) !important; background:linear-gradient(180deg,#fff,#fbfdff) !important; }
#cbpopper-root #chatbot-input { flex:1 !important; padding:10px 12px !important; border:1px solid #eef3f7 !important; border-radius:12px !important; resize:none !important; min-height:40px !important; outline:none !important; }
#cbpopper-root #chatbot-send { padding:10px 16px !important; background: linear-gradient(90deg,#0073aa,#00a0d2) !important; color:#fff !important; border:none !important; border-radius:12px !important; cursor:pointer !important; }
#cbpopper-root #chatbot-send:disabled { opacity:0.6 !important; cursor:not-allowed !important; }

/* Responsive adjustments */
@media (max-width: 768px) {
  #cbpopper-root #chatbot-window { width:94% !important; right:3% !important; bottom:78px !important; max-height:72vh !important; }
}