/* 智能客服悬浮窗：用户端 H5 共用 */
.tq-support-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 99990;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(145deg, #15803d, #0f5132);
  color: #ecfdf5;
  font-size: 1.35rem;
  box-shadow: 0 4px 18px rgba(15, 81, 50, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tq-support-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 22px rgba(15, 81, 50, 0.55);
}
.tq-support-panel {
  position: fixed;
  right: 1rem;
  bottom: 5rem;
  z-index: 99991;
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(28rem, calc(100vh - 7rem));
  display: none;
  flex-direction: column;
  background: rgba(15, 35, 28, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  color: #ecfdf5;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
.tq-support-panel.tq-support-panel--open {
  display: flex;
}
.tq-support-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.92rem;
  font-weight: 600;
}
.tq-support-panel__head button {
  background: transparent;
  border: none;
  color: #a7f3d0;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.15rem 0.35rem;
}
.tq-support-panel__hint {
  margin: 0;
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
  color: #86efac;
  background: rgba(22, 101, 52, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.tq-support-panel__hint.tq-support-panel__hint--warn {
  color: #fde68a;
  background: rgba(120, 80, 20, 0.35);
}
.tq-support-faq {
  padding: 0.45rem 0.65rem 0.4rem;
  font-size: 0.72rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  max-height: 7rem;
  overflow-y: auto;
}
.tq-support-faq[hidden] {
  display: none !important;
}
.tq-support-faq__label {
  color: #a7f3d0;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.74rem;
}
.tq-support-faq__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.tq-support-faq__chip {
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  cursor: pointer;
  border: 1px solid rgba(167, 243, 208, 0.35);
  background: rgba(0, 0, 0, 0.2);
  color: #ecfdf5;
  max-width: 100%;
  text-align: left;
  line-height: 1.25;
}
.tq-support-faq__chip:hover {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(167, 243, 208, 0.55);
}
.tq-support-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 0.65rem 0.75rem;
  font-size: 0.88rem;
  line-height: 1.45;
  min-height: 10rem;
}
.tq-support-msg {
  margin-bottom: 0.65rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  max-width: 95%;
  word-break: break-word;
}
.tq-support-msg--user {
  margin-left: auto;
  background: rgba(34, 197, 94, 0.28);
  border: 1px solid rgba(167, 243, 208, 0.2);
}
.tq-support-msg--assistant {
  margin-right: auto;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.tq-support-msg--note {
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  text-align: center;
  font-size: 0.78rem;
  color: #bbf7d0;
  background: transparent;
  border: none;
}
.tq-support-msg__role {
  font-size: 0.72rem;
  opacity: 0.75;
  margin-bottom: 0.2rem;
}
.tq-support-compose {
  padding: 0.55rem 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.tq-support-compose textarea {
  width: 100%;
  box-sizing: border-box;
  resize: none;
  min-height: 3.2rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.25);
  color: #f0fdf4;
  padding: 0.45rem 0.5rem;
  font: inherit;
  font-size: 0.88rem;
}
.tq-support-compose textarea:disabled {
  opacity: 0.55;
}
.tq-support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.tq-support-actions button {
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  cursor: pointer;
  border: none;
  font-weight: 600;
}
.tq-support-send {
  background: linear-gradient(135deg, #22c55e, #15803d);
  color: #fff;
}
.tq-support-human {
  background: transparent;
  color: #fde68a;
  border: 1px solid rgba(253, 230, 138, 0.45);
}
.tq-support-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.tq-support-esc-form {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.25rem;
}
.tq-support-esc-form.tq-support-esc-form--open {
  display: flex;
}
.tq-support-esc-form input {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.25);
  color: #f0fdf4;
  padding: 0.35rem 0.45rem;
  font: inherit;
  font-size: 0.85rem;
}
.tq-support-esc-form .tq-support-actions {
  margin-top: 0.15rem;
}
