/* 勤亚达官网 · 在线客服（智能客服） */
#qy-kf-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99998;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 48px;
  padding: 0 18px 0 14px;
  border-radius: 24px;
  background: linear-gradient(135deg, #6ea2f7, #4a7cf0);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 8px 22px rgba(74, 124, 240, .38);
  transition: transform .2s ease, box-shadow .2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
#qy-kf-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(74, 124, 240, .45); }
#qy-kf-btn svg { width: 21px; height: 21px; flex: 0 0 21px; fill: #fff; }
#qy-kf-btn em { font-style: normal; }

#qy-kf-panel {
  position: fixed;
  right: 24px;
  bottom: 86px;
  z-index: 99999;
  width: 380px !important;
  min-width: 380px !important;
  max-width: 380px !important;
  height: 560px !important;
  max-height: calc(100vh - 120px) !important;
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(20, 40, 90, .22);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}
#qy-kf-panel.open { display: flex; }

/* 头部 */
.qy-kf-head {
  flex: 0 0 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 14px;
  background: linear-gradient(120deg, #6ea2f7, #4a7cf0);
  color: #fff;
}
.qy-kf-hd-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.qy-kf-avatar {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.qy-kf-avatar svg { width: 24px; height: 24px; fill: #4a7cf0; }
.qy-kf-hd-txt { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.qy-kf-hd-txt b { font-size: 15px; font-weight: 600; }
.qy-kf-hd-txt span { font-size: 11.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qy-kf-hd-btns { display: flex; align-items: center; gap: 2px; }
.qy-kf-hd-btns button {
  width: 30px; height: 30px;
  border: 0; background: transparent;
  color: #fff; font-size: 18px; line-height: 1;
  cursor: pointer; opacity: .85; border-radius: 4px;
}
.qy-kf-hd-btns button:hover { opacity: 1; background: rgba(255, 255, 255, .16); }
.qy-kf-close { font-size: 22px !important; }

/* 消息区 */
.qy-kf-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 14px 6px;
  background: #f5f7fb;
  -webkit-overflow-scrolling: touch;
}
.qy-kf-row { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 14px; }
.qy-kf-row.mine { align-items: flex-end; }
.qy-kf-meta { font-size: 11.5px; color: #9aa3b2; margin: 0 2px 5px; }
.qy-kf-bubble {
  max-width: 84%;
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.65;
  word-break: break-word;
  white-space: pre-line;
}
.qy-kf-row.agent .qy-kf-bubble { background: #eef1f7; color: #333; }
.qy-kf-row.mine .qy-kf-bubble { background: #4a7cf0; color: #fff; }

.qy-kf-typing { display: flex; align-items: center; gap: 5px; padding: 13px; }
.qy-kf-typing i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #b7c2d6;
  animation: qy-kf-blink 1.2s infinite ease-in-out;
}
.qy-kf-typing i:nth-child(2) { animation-delay: .2s; }
.qy-kf-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes qy-kf-blink {
  0%, 80%, 100% { opacity: .3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

.qy-kf-note {
  text-align: center;
  color: #98a2b3;
  font-size: 12px;
  line-height: 1.6;
  margin: 12px 6px;
}
.qy-kf-cta {
  display: block;
  margin: 6px auto 16px;
  padding: 10px 0;
  width: 190px;
  text-align: center;
  border-radius: 20px;
  background: linear-gradient(135deg, #6ea2f7, #4a7cf0);
  color: #fff;
  font-size: 14px;
  text-decoration: none;
}
.qy-kf-cta:hover { color: #fff; text-decoration: none; opacity: .92; }

/* 快捷问题 */
.qy-kf-chips {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px 2px;
  background: #fff;
}
.qy-kf-chip {
  flex: 0 0 auto;
  padding: 5px 13px;
  border: 1px solid #c3d6f9;
  border-radius: 16px;
  background: #fff;
  color: #3f74e0;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
  transition: all .18s ease;
}
.qy-kf-chip:hover { background: #eaf1ff; border-color: #4a7cf0; }

/* 输入区 */
.qy-kf-foot {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
}
.qy-kf-foot textarea {
  flex: 1 1 auto;
  height: 42px;
  min-height: 42px;
  max-height: 96px;
  resize: none;
  border: 1px solid #dfe4ee;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}
.qy-kf-foot textarea::placeholder { color: #b3bccb; }
.qy-kf-foot textarea:focus { border-color: #4a7cf0; box-shadow: 0 0 0 2px rgba(74, 124, 240, .12); }
.qy-kf-send {
  flex: 0 0 66px;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #6ea2f7, #4a7cf0);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.qy-kf-send:hover { opacity: .92; }
.qy-kf-send:disabled { background: #c7d5f4; cursor: default; }

.qy-kf-copy {
  flex: 0 0 auto;
  padding: 0 0 9px;
  text-align: center;
  font-size: 11px;
  color: #b6becd;
  background: #fff;
}

@media (max-width: 768px) {
  #qy-kf-panel {
    left: 10px;
    right: 10px;
    bottom: 82px;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 72vh !important;
    max-height: calc(100vh - 110px) !important;
  }
  #qy-kf-btn { right: 14px; bottom: 16px; }
}
