/* AI Chart Bot — floating assistant */

#rgChartBot { position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 500; font-family: Inter, system-ui, sans-serif; }

.rg-bot-toggle {
  width: 56px; height: 56px; border-radius: 16px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #d946ef);
  color: #fff; box-shadow: 0 8px 32px rgba(139, 92, 246, 0.45);
  display: grid; place-items: center; position: relative;
}
.rg-bot-toggle svg { width: 26px; height: 26px; }
.rg-bot-pulse {
  position: absolute; top: 8px; right: 8px; width: 10px; height: 10px;
  background: #22d3ee; border-radius: 50%; box-shadow: 0 0 8px #22d3ee;
  animation: botPulse 2s infinite;
}
@keyframes botPulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.85)} }

.rg-bot-panel {
  position: absolute; bottom: 68px; right: 0; width: 360px; max-width: calc(100vw - 2rem);
  background: #0f0f23; border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 16px; box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  display: none; flex-direction: column; overflow: hidden;
  max-height: 520px;
}
.rg-bot-panel.open { display: flex; }

.rg-bot-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.875rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(99,102,241,0.1);
}
.rg-bot-header strong { display: block; font-size: 0.9375rem; color: #f1f5f9; }
.rg-bot-header span { font-size: 0.6875rem; color: #64748b; }
.rg-bot-close {
  width: 32px; height: 32px; border: none; border-radius: 8px;
  background: rgba(255,255,255,0.06); color: #94a3b8; font-size: 1.25rem; cursor: pointer;
}

.rg-bot-messages {
  flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.625rem;
  min-height: 120px; max-height: 220px;
}
.rg-bot-msg {
  padding: 0.625rem 0.875rem; border-radius: 12px; font-size: 0.8125rem; line-height: 1.55;
  max-width: 92%;
}
.rg-bot-msg.bot {
  background: rgba(255,255,255,0.05); color: #cbd5e1; align-self: flex-start;
  border: 1px solid rgba(255,255,255,0.06);
}
.rg-bot-msg.user {
  background: rgba(99,102,241,0.25); color: #e2e8f0; align-self: flex-end;
}

.rg-bot-suggestions {
  padding: 0 0.75rem 0.5rem; display: flex; flex-wrap: wrap; gap: 0.375rem;
  max-height: 100px; overflow-y: auto;
}
.rg-bot-chip {
  font-size: 0.6875rem; padding: 0.3125rem 0.625rem; border-radius: 9999px;
  border: 1px solid rgba(139, 92, 246, 0.35); background: rgba(139, 92, 246, 0.1);
  color: #a5b4fc; cursor: pointer; font-family: inherit;
}
.rg-bot-chip:hover { background: rgba(139, 92, 246, 0.2); color: #fff; }

.rg-bot-input-row {
  display: flex; gap: 0.5rem; padding: 0.75rem; border-top: 1px solid rgba(255,255,255,0.08);
}
.rg-bot-input-row input {
  flex: 1; padding: 0.625rem 0.75rem; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1); background: #0a0a14; color: #f1f5f9;
  font-size: 0.8125rem; font-family: inherit;
}
.rg-bot-send {
  padding: 0.625rem 1rem; border: none; border-radius: 10px; cursor: pointer;
  background: #6366f1; color: #fff; font-weight: 600; font-size: 0.8125rem; font-family: inherit;
}

@media (max-width: 768px) {
  #rgChartBot { bottom: 5rem; right: 1rem; }
  .rg-bot-panel { width: calc(100vw - 2rem); right: 0; }
}
