
/* XRPLE Buy Helper Chatbot */
:root {
  --cb-bg: rgba(255, 252, 238, 0.98);
  --cb-ink: #1b1306;
  --cb-gold: #c9a958;
  --cb-line: #d9d0b5;
  --cb-shadow: 0 12px 30px rgba(0,0,0,.22);
}
#xrple-chatbot {
  position: fixed;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 9999;
  font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
}
#xrple-chatbot .cb-bubble {
  width: 56px; height: 56px; border-radius: 999px;
  background: linear-gradient(135deg,#ecdba0,var(--cb-gold));
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--cb-shadow);
  border: 2px solid var(--cb-gold);
  cursor: pointer;
}
#xrple-chatbot .cb-bubble svg { width: 28px; height: 28px; }
#xrple-chatbot .cb-panel {
  position: absolute;
  right: 0; bottom: 70px;
  width: min(360px, 92vw);
  max-height: min(70vh, 660px);
  background: var(--cb-bg) url('parchment_grunge.png') repeat;
  border: 1px solid var(--cb-line);
  border-radius: 14px;
  display: none;
  flex-direction: column;
  box-shadow: var(--cb-shadow);
  overflow: hidden;
}
#xrple-chatbot.open .cb-panel { display: flex; }
#xrple-chatbot .cb-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; background: rgba(255,255,240,.8);
  border-bottom: 1px solid var(--cb-line);
}
#xrple-chatbot .cb-title {
  font-weight: 900; color: var(--cb-ink);
}
#xrple-chatbot .cb-close { background: transparent; border: 0; font-size: 18px; cursor: pointer; }
#xrple-chatbot .cb-body {
  padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
}
.cb-msg { display: flex; gap: 8px; align-items: flex-start; }
.cb-msg.bot .bubble {
  background: rgba(255,255,255,0.76);
  border: 1px solid var(--cb-line);
  border-radius: 12px; padding: 10px 12px;
  max-width: 90%;
}
.cb-msg.user { justify-content: flex-end; }
.cb-msg.user .bubble {
  background: linear-gradient(135deg,#ecdba0,var(--cb-gold));
  border-radius: 12px; padding: 10px 12px;
  color: var(--cb-ink);
  max-width: 90%;
}
.cb-actions {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px;
}
.cb-chip {
  border: 1px solid var(--cb-gold); background: #fffbea; color: var(--cb-ink);
  border-radius: 999px; padding: 6px 10px; font-weight: 800; cursor: pointer;
}
.cb-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg,#ecdba0,var(--cb-gold)); color: var(--cb-ink);
  padding: 9px 12px; border-radius: 10px; font-weight: 900; text-decoration: none; border: 0; cursor: pointer;
}
.cb-footer {
  border-top: 1px solid var(--cb-line); padding: 8px; display: flex; gap: 8px;
}
.cb-input {
  flex: 1; border-radius: 10px; border: 1px solid var(--cb-line); padding: 10px 12px; background: #fffdf5;
}
.cb-send { border: 0; border-radius: 10px; padding: 10px 12px; background: var(--cb-gold); font-weight: 900; cursor: pointer; }
.cb-note { font-size: 12px; color: #6d5a36; margin-top: 6px; }
.cb-inline { padding: 8px; background: rgba(255,255,255,.6); border: 1px dashed var(--cb-line); border-radius: 10px; }
.cb-small { font-size: 13px; }
.cb-divider { height: 1px; background: var(--cb-line); margin: 6px 0; }
.cb-center { text-align: center; }

/* Embedded Jupiter box */
#cb-jup-box { min-height: 420px; border: 1px dashed var(--cb-line); border-radius: 12px; display: none; overflow: clip; }
#cb-jup-box.show { display: block; }
