/* 数智邦 PC AI 客服 — 浅色官网风格；头像固定圆形尺寸 */
.szb-ai-fab {
  z-index: 60;
  color: #111827;
  cursor: pointer;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 999px;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  position: fixed;
  bottom: 24px;
  right: 24px;
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.08);
}
.szb-ai-fab:hover {
  transform: translateY(-2px);
  border-color: #4D7CFE;
}
.szb-ai-fab-mobile-label { display: none; }

/* 圆形头像：强制 36px，防止原图撑破 */
.szb-ai-fab img.szb-ai-fab-avatar,
img.szb-ai-fab-avatar {
  width: 36px !important;
  height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
  flex: none !important;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #E5E7EB;
  background: #EEF2FF;
}

.szb-ai-panel {
  z-index: 60;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 18px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(380px, 100vw - 32px);
  height: min(520px, 100vh - 96px);
  position: fixed;
  bottom: 20px;
  right: 20px;
  overflow: hidden;
  box-shadow: 0 24px 64px -8px rgba(0, 0, 0, 0.12);
}
.szb-ai-panel.is-hidden { display: none; }

.szb-ai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #F8FAFC;
  border-bottom: 1px solid #E5E7EB;
}
.szb-ai-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.szb-ai-header img.szb-ai-avatar,
img.szb-ai-avatar {
  width: 42px !important;
  height: 42px !important;
  max-width: 42px !important;
  max-height: 42px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
  flex: none !important;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #E5E7EB;
  background: #EEF2FF;
}
.szb-ai-identity strong {
  color: #111827;
  font-size: 15px;
  display: block;
}
.szb-ai-identity small {
  color: #6B7280;
  font-size: 11px;
}
.szb-ai-close {
  color: #4B5563;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.szb-ai-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  background: #F5F7FB;
  border-bottom: 1px solid #F3F4F6;
}
.szb-ai-quick button {
  color: #4B5563;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  cursor: pointer;
}
.szb-ai-quick button:hover {
  color: #4D7CFE;
  border-color: #4D7CFE;
  background: #EEF2FF;
}

.szb-ai-list {
  min-height: 0;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  overflow: auto;
  background: #F5F7FB;
}
.szb-ai-msg {
  flex-shrink: 0;
  white-space: pre-wrap;
  border-radius: 12px;
  max-width: 92%;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.55;
}
.szb-ai-msg.user {
  color: #fff;
  background: linear-gradient(135deg, #4D7CFE 0%, #6E92FF 100%);
  align-self: flex-end;
}
.szb-ai-msg.assistant {
  color: #111827;
  background: #fff;
  border: 1px solid #E5E7EB;
  align-self: flex-start;
}
.szb-ai-msg.assistant strong {
  font-weight: 650;
  color: #1f2937;
}
.szb-ai-msg .szb-ai-link {
  color: #4D7CFE;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}
.szb-ai-msg .szb-ai-link:hover {
  color: #3563e0;
}

.szb-ai-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border-top: 1px solid #E5E7EB;
}
.szb-ai-input input {
  color: #111827;
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  outline: none;
  height: 40px;
  padding: 0 12px;
}
.szb-ai-input input:focus {
  border-color: #4D7CFE;
}
.szb-ai-input button {
  color: #fff;
  background: linear-gradient(135deg, #4D7CFE 0%, #6E92FF 100%);
  border: 0;
  border-radius: 10px;
  height: 40px;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
}
.szb-ai-input button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .szb-ai-backdrop {position:fixed;inset:0;z-index:1199;touch-action:none;background:rgba(15,23,42,.12)}
  .szb-ai-backdrop[hidden] {display:none}
  .szb-ai-fab {
    z-index: 980;
    top: 58%;
    bottom: auto;
    right: -28px;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    justify-content: flex-start;
    touch-action: none;
    background: linear-gradient(135deg, #4D7CFE, #6E92FF);
    box-shadow: 0 8px 24px rgba(77,124,254,.34);
  }
  .szb-ai-fab:hover { transform: none; }
  .szb-ai-fab-avatar,.szb-ai-fab-name { display:none!important; }
  .szb-ai-fab-mobile-label { display:block; width:28px; text-align:center; color:#fff; font-size:13px; font-weight:800; letter-spacing:.3px; }
  .szb-ai-panel {
    overscroll-behavior: contain;
    z-index: 1200;
    width: min(calc(100vw - 24px), 380px);
    height: min(70dvh, 520px);
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%,-50%);
  }
}
.szb-ai-input .chat-send-icon{width:40px;flex:0 0 40px;padding:0;display:inline-flex;align-items:center;justify-content:center}

.chat-send-symbol{display:block;width:21px;height:21px;flex:none;fill:none;stroke:currentColor;pointer-events:none}
