/* 问数小助手：克隆首页机器人外观，定位在原机器人左侧，对接「问数智能体」 */
.jjj-ask-wrapper {
  position: fixed;
  right: 180px;
  bottom: 48px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.jjj-ask-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
  position: relative;
}
.jjj-ask-bubble {
  position: absolute;
  bottom: 128px;
  right: 6px;
  width: 184px;
  background: #fff;
  border-radius: 18px;
  padding: 12px 16px;
  font-size: 14px;
  color: #333;
  line-height: 1.65;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  pointer-events: none;
}
.jjj-ask-bubble::after {
  content: '';
  position: absolute;
  bottom: -14px;
  right: 36px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 14px solid #fff;
}
.jjj-ask-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  animation: jjj-ask-float 2.8s ease-in-out infinite;
  filter: drop-shadow(0 6px 12px rgba(35, 193, 250, 0.35));
}
.jjj-ask-shadow {
  width: 60px;
  height: 12px;
  background: radial-gradient(ellipse, rgba(35, 193, 250, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  margin-top: -6px;
  animation: jjj-ask-shadow-pulse 2.8s ease-in-out infinite;
}
.jjj-ask-tag {
  position: absolute;
  top: 2px;
  right: 50%;
  transform: translateX(50%);
  background: linear-gradient(135deg, #23c1fa, #1890ff);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(24, 144, 255, 0.35);
}
@keyframes jjj-ask-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes jjj-ask-shadow-pulse {
  0%, 100% { transform: scaleX(1); opacity: 0.6; }
  50% { transform: scaleX(0.65); opacity: 0.25; }
}

/* 对话面板 */
.jjj-ask-panel {
  position: absolute;
  bottom: 120px;
  right: 0;
  width: 380px;
  height: 560px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10;
}
.jjj-ask-panel.hidden { display: none; }
.jjj-ask-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(135deg, #23c1fa, #1890ff);
  flex-shrink: 0;
}
.jjj-ask-header .t { font-size: 15px; font-weight: bold; color: #fff; }
.jjj-ask-header .sub { font-size: 11px; color: rgba(255,255,255,0.85); margin-left: 8px; }
.jjj-ask-close {
  width: 26px; height: 26px; border: none; color: #fff;
  background: rgba(255, 255, 255, 0.25); border-radius: 50%;
  cursor: pointer; font-size: 16px; line-height: 1;
}
.jjj-ask-close:hover { background: rgba(255, 255, 255, 0.4); }

.jjj-ask-toolbar {
  display: flex; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #eef2f7;
  background: #f7fafc; align-items: center;
}
.jjj-ask-toolbar label { font-size: 12px; color: #475569; white-space: nowrap; }
.jjj-ask-toolbar select {
  flex: 1; padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 8px;
  font-size: 13px; background: #fff; color: #1e293b;
}
.jjj-ask-messages { flex: 1; overflow-y: auto; padding: 12px; background: #f7fafc; }
.jjj-ask-msg {
  max-width: 92%; margin-bottom: 10px; padding: 10px 12px; border-radius: 10px;
  font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-break: break-word;
}
.jjj-ask-msg.user { margin-left: auto; background: #2563eb; color: #fff; }
.jjj-ask-msg.bot { margin-right: auto; background: #fff; color: #1e293b; border: 1px solid #e2e8f0; }
.jjj-ask-msg.system { margin: 0 auto 8px; background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; font-size: 12px; }
.jjj-ask-msg .val { font-weight: bold; color: #1890ff; }
.jjj-ask-msg .maplink {
  display: inline-block; margin-top: 6px; font-size: 12px; color: #1890ff; cursor: pointer; text-decoration: underline;
}
.jjj-ask-figure {
  display: block; margin-top: 8px; width: 100%; max-width: 320px; border-radius: 8px;
  border: 1px solid #e2e8f0; cursor: zoom-in;
}
.jjj-ask-input-row {
  display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #e2e8f0; background: #fff;
}
.jjj-ask-input-row textarea {
  flex: 1; resize: none; min-height: 38px; max-height: 110px; padding: 8px 10px;
  border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px;
}
.jjj-ask-input-row button {
  align-self: flex-end; padding: 8px 16px; border: none; border-radius: 8px;
  background: linear-gradient(135deg, #23c1fa, #1890ff); color: #fff; cursor: pointer;
}
.jjj-ask-input-row button:disabled { opacity: 0.6; cursor: not-allowed; }
