/* 观星云官网 AI 助理 — 对齐问答社区 / Element 风格 */

/* Vue 挂载前只隐藏未编译面板，入口按钮在客服栏内同步展示 */
#gxyun-ai-assistant-app:not(.gxyun-ai-ready) .gxyun-ai-panel-root,
#gxyun-ai-assistant-app[v-cloak] .gxyun-ai-panel-root {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* 手机端悬浮入口等 Vue 判定后再显示，避免 PC 上与客服栏入口叠两个 */
#gxyun-ai-assistant-app:not(.gxyun-ai-ready) .gxyun-ai-entry--float {
  display: none !important;
}

/* 客服栏 + AI 入口合成一个胶囊，同时出现 */
.contact-bar {
  width: 48px;
  overflow: visible;
}

.contact-bar .contact-bar-top {
  width: 48px;
  margin: 0 auto;
  padding-bottom: 8px;
}

.contact-bar-ai-host {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px solid #eef1f5;
}

.gxyun-ai-entry {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 6px 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  animation: none;
  will-change: auto;
  box-sizing: border-box;
  transition: color 0.2s ease;
}

.gxyun-ai-entry:hover {
  color: inherit;
}

.gxyun-ai-entry:hover .gxyun-ai-entry__label {
  color: #206be7;
}

.gxyun-ai-entry__face {
  position: relative;
  width: 32px;
  height: 32px;
  margin-bottom: 5px;
  animation: gxyun-ai-entry-float 4.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.gxyun-ai-entry__halo {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(32, 107, 231, 0.2) 0%, transparent 72%);
  animation: gxyun-ai-entry-halo 4.2s ease-in-out infinite;
  pointer-events: none;
}

.gxyun-ai-entry__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #8ec5ff, #206be7 55%, #6b8cff);
  box-shadow: 0 2px 8px rgba(32, 107, 231, 0.22);
}

.gxyun-ai-entry__inner {
  position: absolute;
  inset: 5px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
}

.gxyun-ai-entry__inner::before,
.gxyun-ai-entry__inner::after {
  content: '';
  position: absolute;
  top: 56%;
  width: 4px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 156, 184, 0.36);
  pointer-events: none;
}

.gxyun-ai-entry__inner::before {
  left: 4px;
}

.gxyun-ai-entry__inner::after {
  right: 4px;
}

.gxyun-ai-entry__eye {
  position: relative;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #1e293b;
  transform-origin: 50% 55%;
  animation: gxyun-ai-entry-eyes 5.6s cubic-bezier(0.4, 0.15, 0.2, 1) infinite;
}

.gxyun-ai-entry__eye::after {
  content: '';
  position: absolute;
  top: 0.5px;
  left: 0.5px;
  width: 1.5px;
  height: 1.5px;
  border-radius: 50%;
  background: #fff;
}

.gxyun-ai-entry__eye:nth-child(2) {
  animation-delay: 0.04s;
}

.gxyun-ai-entry__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  color: #4d7fe8;
  font-weight: 600;
  line-height: 1;
}

.gxyun-ai-entry__label-ai {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  writing-mode: horizontal-tb;
  white-space: nowrap;
}

.gxyun-ai-entry__label-cn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  margin-top: 1px;
}

.gxyun-ai-entry__label-cn i {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
}

@keyframes gxyun-ai-entry-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -3px, 0);
  }
}

@keyframes gxyun-ai-entry-halo {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes gxyun-ai-entry-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 3px rgba(32, 107, 231, 0.12),
      0 4px 12px rgba(32, 107, 231, 0.16);
  }
  50% {
    box-shadow:
      0 0 0 5px rgba(32, 107, 231, 0.18),
      0 6px 16px rgba(32, 107, 231, 0.28);
  }
}

@keyframes gxyun-ai-entry-eyes {
  0%,
  18% {
    transform: translate3d(0, 0, 0) scaleY(1) scaleX(1);
  }
  24%,
  38% {
    transform: translate3d(1px, 0, 0) scaleY(1) scaleX(1);
  }
  42% {
    transform: translate3d(0, 0, 0) scaleY(1) scaleX(1);
  }
  48%,
  58% {
    transform: translate3d(-1px, 0, 0) scaleY(1) scaleX(1);
  }
  62% {
    transform: translate3d(0, 0, 0) scaleY(1) scaleX(1);
  }
  68%,
  72% {
    transform: translate3d(0, 0, 0) scaleY(0.1) scaleX(1.15);
  }
  70% {
    transform: translate3d(0, 0, 0) scaleY(1) scaleX(1);
  }
  74%,
  100% {
    transform: translate3d(0, 0, 0) scaleY(1) scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gxyun-ai-entry__face,
  .gxyun-ai-entry__halo,
  .gxyun-ai-entry__eye {
    animation: none;
  }
}

/* 自定义悬浮面板：遮罩与窗口同时淡入，避免 el-drawer 先贴边再跳位 */
.gxyun-ai-panel-root {
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: none;
}

/*
 * 人工客服弹窗压过 AI 蒙版（z=3000）。
 * 切勿使用 body:has(.gxyun-ai-human-dialog) > .v-modal ——
 * el-dialog 关闭后 custom-class 仍留在 DOM，会把全站所有 Element 蒙层抬到 3190，
 * 导致 MessageBox / 普通弹窗被灰色遮罩盖住。
 * 实际层级由 JS liftHumanDialog 在打开时写到对应 wrapper / v-modal。
 */
body.gxyun-ai-human-open .el-dialog__wrapper:has(.gxyun-ai-human-dialog) {
  z-index: 3200 !important;
}

body.gxyun-ai-human-open > .v-modal {
  z-index: 3190 !important;
}

/* Element Message / Notification / MessageBox 默认约 2000~3000，AI 面板打开时需压在其上 */
body.gxyun-ai-panel-open .el-message,
body.gxyun-ai-panel-open .el-notification {
  z-index: 3600 !important;
}

body.gxyun-ai-panel-open .el-message-box__wrapper {
  z-index: 3600 !important;
}

.gxyun-ai-panel-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.22);
  pointer-events: auto;
}

.gxyun-ai-panel {
  position: absolute;
  right: 80px;
  bottom: 56px;
  width: 420px;
  height: 660px;
  max-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(191, 219, 254, 0.95);
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.98) 0%, #fff 26%, #fff 100%);
  box-shadow:
    0 8px 24px rgba(30, 64, 120, 0.08),
    0 24px 64px rgba(30, 64, 120, 0.14);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  pointer-events: auto;
  will-change: opacity, transform;
}

.gxyun-ai-panel.is-expanded {
  right: 72px;
  bottom: 40px;
  height: 760px;
  max-height: calc(100vh - 72px);
}

.gxyun-ai-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 8px;
  padding: 14px 12px 12px 18px;
  border-bottom: 1px solid #ebeef5;
  background: rgba(255, 255, 255, 0.72);
}

.gxyun-ai-panel-enter-active .gxyun-ai-panel-mask,
.gxyun-ai-panel-leave-active .gxyun-ai-panel-mask {
  transition: opacity 0.22s ease;
}

.gxyun-ai-panel-enter-active .gxyun-ai-panel,
.gxyun-ai-panel-leave-active .gxyun-ai-panel {
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.gxyun-ai-panel-enter .gxyun-ai-panel-mask,
.gxyun-ai-panel-leave-to .gxyun-ai-panel-mask {
  opacity: 0;
}

.gxyun-ai-panel-enter .gxyun-ai-panel,
.gxyun-ai-panel-leave-to .gxyun-ai-panel {
  opacity: 0;
  transform: translate3d(14px, 10px, 0);
}

.gxyun-ai-panel-enter-to .gxyun-ai-panel-mask,
.gxyun-ai-panel-leave .gxyun-ai-panel-mask {
  opacity: 1;
}

.gxyun-ai-panel-enter-to .gxyun-ai-panel,
.gxyun-ai-panel-leave .gxyun-ai-panel {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

body.gxyun-ai-panel-open .contact-bar {
  z-index: 3010;
}

.gxyun-ai-drawer-body {
  padding: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: transparent;
  display: flex;
  flex-direction: column;
  height: auto;
}

.gxyun-ai-drawer-title {
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: #303133;
}

.gxyun-ai-drawer-title i {
  margin-right: 6px;
  color: #206be7;
  font-size: 16px;
}

.gxyun-ai-drawer-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: 0;
}

.gxyun-ai-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #909399;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.gxyun-ai-icon-btn:hover {
  background: #ecf3ff;
  color: #206be7;
}

.gxyun-ai-icon-btn i {
  font-size: 16px;
}

.gxyun-ai-chat-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.gxyun-ai-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 16px 8px;
  background: transparent;
}

.gxyun-ai-landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0 4px;
  text-align: center;
}

.gxyun-ai-landing__hello {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #303133;
}

.gxyun-ai-landing__name {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 700;
  color: #206be7;
}

.gxyun-ai-auth {
  display: flex;
  gap: 16px;
  width: 100%;
  max-width: 340px;
  margin-top: 14px;
  justify-content: center;
}

.gxyun-ai-auth .el-button {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  margin: 0;
}

.gxyun-ai-auth .el-button + .el-button {
  margin-left: 0;
}

.gxyun-ai-auth .gxyun-ai-auth__ghost,
.gxyun-ai-auth .el-button--default.is-round {
  border-color: #dcdfe6;
  background: #fff;
  color: #606266;
}

.gxyun-ai-auth .el-button--primary {
  background-color: #206be7;
  border-color: #206be7;
}

.gxyun-ai-auth .el-button--primary:hover,
.gxyun-ai-auth .el-button--primary:focus {
  background-color: #1e86ff;
  border-color: #1e86ff;
}

.gxyun-ai-suggest {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
  margin-top: 28px;
  text-align: left;
}

.gxyun-ai-suggest__panel {
  padding: 12px 10px 8px;
  border: 1px solid #d6e6ff;
  border-radius: 12px;
  background: #f3f8ff;
}

.gxyun-ai-suggest__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.gxyun-ai-suggest__title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #303133;
  line-height: 1.4;
}

.gxyun-ai-suggest__head .gxyun-ai-suggest__title {
  margin-bottom: 0;
}

.gxyun-ai-suggest__shuffle {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #206be7;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}

.gxyun-ai-suggest__shuffle:hover {
  color: #1e86ff;
}

.gxyun-ai-suggest__item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #606266;
  font-size: 12px;
  line-height: 1.55;
  text-align: left;
  cursor: pointer;
}

.gxyun-ai-suggest__item i {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 6px;
  border-radius: 50%;
  background: #206be7;
}

.gxyun-ai-suggest__item span {
  flex: 1;
  min-width: 0;
}

.gxyun-ai-suggest__item:hover span {
  color: #206be7;
}

.gxyun-ai-suggest__item:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.gxyun-ai-compose {
  flex-shrink: 0;
  padding: 6px 16px 14px;
  border-top: 0;
  background: transparent;
}

.gxyun-ai-compose__box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 8px 8px 18px;
  border: 1px solid #e6eaf0;
  border-radius: 26px;
  background: #f3f5f8;
  box-shadow: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.gxyun-ai-compose__box:focus-within {
  border-color: #d7e3f7;
  background: #f7f9fc;
  box-shadow: 0 2px 10px rgba(32, 107, 231, 0.05);
}

.gxyun-ai-compose__box .el-textarea {
  flex: 1;
  min-width: 0;
  display: block;
}

.gxyun-ai-compose__box .el-textarea__inner {
  padding: 6px 0;
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: #4a5568;
  min-height: 24px !important;
  max-height: 88px;
  overflow-y: auto;
  resize: none;
  -webkit-font-smoothing: antialiased;
}

.gxyun-ai-compose__box .el-textarea__inner::placeholder {
  color: #9aa3b2;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.7;
  opacity: 1;
}

.gxyun-ai-compose__box .el-textarea__inner:focus {
  border: 0;
  box-shadow: none !important;
}

.gxyun-ai-compose__box .el-textarea.is-disabled .el-textarea__inner {
  background: transparent;
  color: #a0a6b0;
  cursor: not-allowed;
}

.gxyun-ai-compose__send {
  position: static;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: #206be7;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.gxyun-ai-compose__send:not(:disabled):hover {
  background: #1e86ff;
  transform: scale(1.04);
}

.gxyun-ai-compose__send:disabled {
  background: #206be7;
  color: #fff;
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
}

.gxyun-ai-compose__send i {
  font-size: 16px;
  margin-left: 1px;
}

.gxyun-ai-compose__hint {
  margin-top: 10px;
  font-size: 12px;
  color: #c0c4cc;
  text-align: center;
  letter-spacing: 0.02em;
}

.gxyun-ai-avatar {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 12px;
  animation: gxyun-ai-float 4.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.gxyun-ai-avatar__halo {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(32, 107, 231, 0.22) 0%, transparent 70%);
  animation: gxyun-ai-halo 4.8s ease-in-out infinite;
  pointer-events: none;
}

.gxyun-ai-avatar__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #93c5fd, #206be7 52%, #bfdbfe);
  box-shadow:
    0 0 0 4px rgba(32, 107, 231, 0.14),
    0 10px 24px rgba(32, 107, 231, 0.24);
}

.gxyun-ai-avatar__face {
  position: absolute;
  inset: 11px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 -4px 10px rgba(32, 107, 231, 0.06);
}

.gxyun-ai-avatar__face::before,
.gxyun-ai-avatar__face::after {
  content: '';
  position: absolute;
  top: 58%;
  width: 8px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 156, 184, 0.38);
  pointer-events: none;
}

.gxyun-ai-avatar__face::before {
  left: 8px;
}

.gxyun-ai-avatar__face::after {
  right: 8px;
}

.gxyun-ai-avatar__eye {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1e293b;
  transform-origin: 50% 55%;
  animation: gxyun-ai-eyes 5.6s cubic-bezier(0.4, 0.15, 0.2, 1) infinite;
}

.gxyun-ai-avatar__eye::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
}

.gxyun-ai-avatar__eye:nth-child(2) {
  animation-delay: 0.04s;
}

@keyframes gxyun-ai-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-1.6deg);
  }
  25% {
    transform: translate3d(0, -4px, 0) rotate(1deg);
  }
  50% {
    transform: translate3d(0, -6px, 0) rotate(1.6deg);
  }
  75% {
    transform: translate3d(0, -3px, 0) rotate(-0.8deg);
  }
}

@keyframes gxyun-ai-halo {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.72;
  }
}

@keyframes gxyun-ai-eyes {
  0%,
  18% {
    transform: translate3d(0, 0, 0) scaleY(1) scaleX(1);
  }
  24%,
  38% {
    transform: translate3d(2px, 0, 0) scaleY(1) scaleX(1);
  }
  42% {
    transform: translate3d(0, 0, 0) scaleY(1) scaleX(1);
  }
  48%,
  58% {
    transform: translate3d(-2px, 0, 0) scaleY(1) scaleX(1);
  }
  62% {
    transform: translate3d(0, 0, 0) scaleY(1) scaleX(1);
  }
  68%,
  72% {
    transform: translate3d(0, 0, 0) scaleY(0.1) scaleX(1.12);
  }
  70% {
    transform: translate3d(0, 0, 0) scaleY(1) scaleX(1);
  }
  74%,
  100% {
    transform: translate3d(0, 0, 0) scaleY(1) scaleX(1);
  }
}

.gxyun-ai-msgs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 8px;
}

.gxyun-ai-msg {
  max-width: 92%;
}

.gxyun-ai-msg.is-user {
  align-self: flex-end;
}

.gxyun-ai-msg.is-assistant {
  align-self: flex-start;
}

.gxyun-ai-msg__bubble {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.65;
  word-break: break-word;
  color: #303133;
}

.gxyun-ai-msg.is-user .gxyun-ai-msg__bubble {
  background: #ecf3ff;
  border: 1px solid #d6e6ff;
  white-space: pre-wrap;
}

.gxyun-ai-msg.is-assistant .gxyun-ai-msg__bubble {
  background: #fff;
  border: 1px solid #ebeef5;
}

.gxyun-ai-md .gxyun-ai-md-p {
  margin: 0.35rem 0;
}

.gxyun-ai-md .gxyun-ai-md-h {
  margin: 0.55rem 0 0.3rem;
  font-size: 14px;
  font-weight: 600;
  color: #303133;
}

.gxyun-ai-md .gxyun-ai-md-pre {
  margin: 0.5rem 0;
  padding: 10px 12px;
  overflow: auto;
  border-radius: 6px;
  background: #f5f7fa;
  font-size: 12px;
}

.gxyun-ai-md code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
}

.gxyun-ai-doc-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.gxyun-ai-doc-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #ebeef5;
  border-radius: 8px;
  background: #fff;
  text-decoration: none !important;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.gxyun-ai-doc-card:hover {
  border-color: rgba(32, 107, 231, 0.45);
  box-shadow: 0 4px 14px -6px rgba(32, 107, 231, 0.28);
  transform: translateY(-1px);
}

.gxyun-ai-doc-card__badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #206be7;
  background: #ecf3ff;
}

.gxyun-ai-doc-card__title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: #303133;
}

.gxyun-ai-doc-card__arrow {
  flex-shrink: 0;
  color: #c0c4cc;
  font-size: 14px;
}

.gxyun-ai-msg__actions {
  margin-top: 8px;
}

.gxyun-ai-msg__actions .el-button--primary.is-plain {
  color: #206be7;
  background: #ecf3ff;
  border-color: #b3d0ff;
}

.gxyun-ai-msg__actions .el-button--primary.is-plain:hover,
.gxyun-ai-msg__actions .el-button--primary.is-plain:focus {
  color: #fff;
  background: #206be7;
  border-color: #206be7;
}

.gxyun-ai-human-opts {
  display: flex;
  gap: 12px;
}

@media (max-width: 480px) {
  .gxyun-ai-human-opts {
    flex-direction: column;
  }
}

.gxyun-ai-human-opt {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px;
  border: 1px solid #ebeef5;
  border-radius: 8px;
  background: #fafbfc;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gxyun-ai-human-opt:hover {
  border-color: rgba(32, 107, 231, 0.4);
  box-shadow: 0 4px 14px -6px rgba(32, 107, 231, 0.2);
}

.gxyun-ai-human-opt i {
  font-size: 28px;
  color: #206be7;
}

.gxyun-ai-human-opt strong {
  font-size: 14px;
  color: #303133;
}

.gxyun-ai-human-opt span {
  font-size: 12px;
  color: #909399;
  text-align: center;
  line-height: 1.4;
}

.gxyun-ai-msg__bubble a {
  color: #206be7;
  word-break: break-all;
}

.gxyun-ai-msg__tip {
  margin-top: 6px;
  font-size: 11px;
  color: #909399;
}

.gxyun-ai-stream-thinking {
  color: #909399;
  font-size: 0.9375em;
}

.gxyun-ai-typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 1px;
  vertical-align: text-bottom;
  border-radius: 1px;
  background: #206be7;
  animation: gxyun-ai-cursor-blink 0.95s step-end infinite;
}

@keyframes gxyun-ai-cursor-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.gxyun-ai-history-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.gxyun-ai-history-toolbar {
  padding: 8px 12px;
  border-bottom: 1px solid #ebeef5;
}

.gxyun-ai-history-toolbar .el-button--text {
  color: #206be7;
}

.gxyun-ai-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  flex: 1;
}

.gxyun-ai-history-item {
  padding: 14px 20px;
  border-bottom: 1px solid #f2f3f5;
  cursor: pointer;
  transition: background 0.15s ease;
}

.gxyun-ai-history-item:hover,
.gxyun-ai-history-item.is-active {
  background: #f5f9ff;
}

.gxyun-ai-history-item__title {
  font-size: 14px;
  font-weight: 600;
  color: #303133;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gxyun-ai-history-item__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: #909399;
}

.gxyun-ai-topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 12px;
  padding: 0 10px;
  height: 30px;
  border-radius: 3px;
  background: rgba(32, 107, 231, 0.08);
  color: #206be7 !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  vertical-align: middle;
}

.gxyun-ai-topbar-link:hover {
  background: rgba(32, 107, 231, 0.14);
}

.gxyun-ai-topbar-link__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #206be7;
  box-shadow: 0 0 0 3px rgba(32, 107, 231, 0.16);
}

/* 未挂到客服栏时（如手机端）仍用右下角悬浮 */
.gxyun-ai-entry--float,
#gxyun-ai-assistant-app > .gxyun-ai-entry {
  position: fixed;
  right: 12px;
  bottom: 96px;
  z-index: 1002;
  width: 48px;
  padding: 8px 0 9px;
  border: 1px solid #fff;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 40px rgba(30, 35, 45, 0.08);
}

.contact-bar-ai-host .gxyun-ai-entry {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 1;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 768px) {
  .gxyun-ai-suggest {
    grid-template-columns: 1fr;
  }

  .gxyun-ai-icon-btn--expand {
    display: none !important;
  }

  .gxyun-ai-panel,
  .gxyun-ai-panel.is-expanded {
    right: 12px;
    left: 12px;
    bottom: 16px;
    width: auto !important;
    height: min(700px, calc(100vh - 32px));
    max-height: calc(100vh - 32px);
    border-radius: 14px;
  }

  .gxyun-ai-topbar-link {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gxyun-ai-avatar,
  .gxyun-ai-avatar__halo,
  .gxyun-ai-avatar__eye,
  .gxyun-ai-panel-enter-active .gxyun-ai-panel,
  .gxyun-ai-panel-leave-active .gxyun-ai-panel,
  .gxyun-ai-panel-enter-active .gxyun-ai-panel-mask,
  .gxyun-ai-panel-leave-active .gxyun-ai-panel-mask {
    animation: none;
    transition: none;
  }
}
