/* 工作人员端：扫码预定弹窗 + 管家在线消息 */

.gq-root { --gq-ink: #16233a; --gq-muted: #7a8aa0; --gq-line: #e6ebf2; --gq-accent: #2f6fed; --gq-soft: #eef4ff; }

.gq-fabs {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 88;
  display: flex;
  gap: 10px;
}
.gq-fab {
  position: relative;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--gq-line);
  border-radius: 999px;
  background: #fff;
  color: var(--gq-ink);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(20, 40, 80, .12);
  transition: transform .15s ease, box-shadow .15s ease;
}
.gq-fab:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(20, 40, 80, .16); }
.gq-fab.primary {
  background: linear-gradient(135deg, #2f6fed, #1d58cf);
  border-color: transparent;
  color: #fff;
}
.gq-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d64550;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  line-height: 18px;
  text-align: center;
}

.gq-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, .38);
  backdrop-filter: blur(2px);
}

.gq-modal {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
  overflow: hidden;
  max-height: calc(100vh - 32px);
}

.gq-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--gq-line);
}
.gq-head b { font-size: 15px; color: var(--gq-ink); }
.gq-head p { margin: 3px 0 0; font-size: 12px; color: var(--gq-muted); }
.gq-x {
  flex: none;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: #f1f5fb;
  color: #5f6f86;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.gq-x:hover { background: #e6ebf2; }
.gq-x.sm { width: 22px; height: 22px; font-size: 14px; border-radius: 6px; }

.gq-btn {
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 9px;
  background: var(--gq-accent);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.gq-btn.ghost { background: var(--gq-soft); color: var(--gq-accent); }
.gq-btn:hover { filter: brightness(1.03); }

/* ---- 二维码 ---- */

.gq-qr-modal { width: min(420px, 100%); }
.gq-qr-body { padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.gq-qr-box {
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gq-line);
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}
.gq-qr-box svg { width: 100%; height: 100%; display: block; }
.gq-qr-loading { font-size: 13px; color: var(--gq-muted); }
.gq-tip { margin: 0; font-size: 12px; color: var(--gq-muted); text-align: center; line-height: 1.6; }
.gq-url { display: flex; gap: 8px; width: 100%; }
.gq-url input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--gq-line);
  border-radius: 9px;
  font-size: 12px;
  color: #4a5a72;
  background: #f9fbfe;
}
.gq-count { margin: 0; font-size: 12px; color: var(--gq-muted); }
.gq-count.expired { color: #d64550; }
.gq-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--gq-line);
  background: #fbfcfe;
}

/* ---- 在线消息 ---- */

.gq-chat-modal { width: min(880px, 100%); height: min(600px, calc(100vh - 48px)); }
.gq-chat-body { flex: 1; min-height: 0; display: flex; }
.gq-threads {
  width: 268px;
  flex: none;
  border-right: 1px solid var(--gq-line);
  overflow-y: auto;
  background: #fbfcfe;
}
.gq-empty { margin: 0; padding: 18px 16px; font-size: 12.5px; color: var(--gq-muted); }
.gq-thread {
  position: relative;
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid #f0f3f8;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.gq-thread:hover { background: #f4f7fd; }
.gq-thread.active { background: var(--gq-soft); }
.gq-thread-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gq-thread-top b { font-size: 13.5px; color: var(--gq-ink); }
.gq-thread-top span { font-size: 11px; color: var(--gq-muted); }
.gq-thread p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--gq-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gq-dot {
  position: absolute;
  top: 10px;
  right: 12px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #d64550;
  color: #fff;
  font-size: 10.5px;
  font-style: normal;
  line-height: 17px;
  text-align: center;
}
.gq-thread.has-unread p { padding-right: 20px; }

.gq-conv { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gq-conv-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gq-line);
  font-size: 13px;
  color: var(--gq-muted);
}
.gq-conv-head b { font-size: 14px; color: var(--gq-ink); }
.gq-conv-head span { font-size: 11.5px; }
.gq-conv-msgs {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f7f9fd;
}
.gq-conv-msgs .gq-empty { padding: 8px; }
.gq-msg { display: flex; flex-direction: column; gap: 3px; max-width: 78%; }
.gq-msg.them { align-self: flex-start; align-items: flex-start; }
.gq-msg.me { align-self: flex-end; align-items: flex-end; }
.gq-bubble {
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.gq-msg.them .gq-bubble { background: #fff; border: 1px solid var(--gq-line); border-bottom-left-radius: 4px; }
.gq-msg.me .gq-bubble { background: var(--gq-accent); color: #fff; border-bottom-right-radius: 4px; }
.gq-msg-time { font-size: 10.5px; color: var(--gq-muted); }

.gq-conv-form {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--gq-line);
  background: #fff;
}
.gq-conv-form input {
  flex: 1;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--gq-line);
  border-radius: 9px;
  font-size: 13.5px;
  outline: none;
}
.gq-conv-form input:focus { border-color: var(--gq-accent); box-shadow: 0 0 0 3px var(--gq-soft); }
.gq-conv-form button {
  height: 38px;
  padding: 0 18px;
  border: none;
  border-radius: 9px;
  background: var(--gq-accent);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.gq-conv-form button:disabled { opacity: .5; cursor: default; }

/* ---- 实时弹窗 ---- */

.gq-pop-host {
  position: fixed;
  right: 20px;
  bottom: 76px;
  z-index: 92;
  width: min(320px, calc(100vw - 32px));
}
.gq-pop {
  padding: 12px 14px;
  border: 1px solid var(--gq-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(20, 40, 80, .2);
  animation: gq-pop-in .22s ease;
}
@keyframes gq-pop-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.gq-pop-top { display: flex; align-items: center; gap: 8px; }
.gq-pop-top b { flex: 1; font-size: 13px; color: var(--gq-ink); }
.gq-pop-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #d64550;
  box-shadow: 0 0 0 3px rgba(214, 69, 80, .18);
}
.gq-pop p {
  margin: 8px 0 10px;
  font-size: 13px;
  color: #3c4c64;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gq-pop-actions { display: flex; gap: 8px; }
.gq-pop-actions .gq-btn { flex: 1; height: 32px; }

@media (max-width: 720px) {
  .gq-fabs { right: 12px; bottom: 12px; }
  .gq-chat-modal { height: calc(100vh - 24px); }
  .gq-chat-body { flex-direction: column; }
  .gq-threads { width: 100%; max-height: 34%; border-right: none; border-bottom: 1px solid var(--gq-line); }
  .gq-conv { flex: 1; min-height: 0; }
  .gq-overlay { padding: 8px; }
  .gq-pop-host { right: 12px; bottom: 68px; }
}
