:root {
  --primary: #13c9cb;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #fff; height: 100%; -webkit-user-select: text; user-select: text;
}
#container { position: relative; width: 100%; height: 100vh; overflow: hidden; }

.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  height: 45px; line-height: 45px; text-align: center;
  display: flex; align-items: center; justify-content: center;
  background-color: var(--primary, #13c9cb); color: #fff;
  font-size: 16px; font-weight: 500;
}
.header-center { display: inline-flex; align-items: center; gap: 8px; line-height: 1; }
.header-logo { display: none; }
.back-btn {
  position: fixed; left: 10px; top: 0; line-height: 45px; z-index: 1000;
  color: #fff; text-decoration: none; font-size: 20px; cursor: pointer;
}
.lang-btn {
  position: fixed; right: 12px; top: 0; line-height: 45px; z-index: 1000;
  color: #fff; text-decoration: none; font-size: 14px; cursor: pointer;
}
.lang-btn .gr { display: inline-block; margin-right: 4px; }

.content { position: relative; height: 100%; overflow-y: auto; background: #fff; padding: 0 10px; }
.conversation { list-style: none; margin: 0; padding: 0 0 8px; }
.conversation li { position: relative; margin: 0 0 14px; min-height: 40px; }
.conversation li.showtime { text-align: center; color: #999; font-size: 11px; margin: 10px 0; }
.conversation li.chatmsg_notice, .conversation li.chatmsg_no {
  text-align: center; color: #aaa; font-size: 12px; margin: 8px 0;
}
.my-circle { border-radius: 50%; width: 40px; height: 40px; object-fit: cover; }
.outer-left { margin-left: 52px; }
.outer-right { margin-right: 52px; }
.service, .customer {
  display: inline-block; max-width: 100%; padding: 10px 12px;
  border-radius: 8px; font-size: 15px; line-height: 1.5;
  word-break: break-word; white-space: pre-wrap;
}
.service { background: #f2f5f7; color: #333; border-top-left-radius: 0; }
.customer { background: var(--primary, #13c9cb); color: #fff; border-top-right-radius: 0; }
.service pre, .customer pre { margin: 0; font-family: inherit; white-space: pre-wrap; word-break: break-word; }
.outer-left .se_pic { position: absolute; left: 0; top: 0; }
.outer-right .cu_pic { position: absolute; right: 0; top: 0; }
.msg-img, .msg-file { display: inline-block; max-width: 180px; border-radius: 6px; }

.welcome-questions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.welcome-questions .q-chip {
  border: 0; padding: 5px 10px; border-radius: 14px;
  background: #fff; color: var(--primary, #13c9cb); font-size: 13px;
  box-shadow: inset 0 0 0 1px var(--primary, #13c9cb);
}
.welcome-questions .q-chip:hover { background: var(--primary, #13c9cb); color: #fff; }

.foot_all { position: fixed; bottom: 0; left: 0; right: 0; height: 94px; z-index: 999; background: #fff; }
.foot_msg { position: relative; height: 100%; }
.footer { position: relative; padding: 6px; }
.footer input {
  width: 88%; height: 42px; border: 0; border-radius: 6px;
  padding: 0 60px 0 12px; background: #f2f5f7; color: #555; font-size: 15px; outline: none;
  border: 1px solid #e6e9ed;
}
.send-btn {
  position: absolute; right: 9px; top: 10px; width: 64px; height: 34px;
  line-height: 34px; font-size: 14px; color: #fff; border: 0; border-radius: 6px;
  text-align: center; cursor: pointer;
}
.msg-toolbar { position: absolute; left: 0; right: 0; bottom: 0; height: 44px; background: #f2f5f7; display: flex; }
.msg-toolbar a { position: relative; flex: 1; text-align: center; line-height: 44px; cursor: pointer; }
.msg-toolbar a img { height: 24px; width: 24px; vertical-align: middle; }
.fileinput {
  position: absolute; inset: 0; opacity: 0; filter: alpha(opacity=0); cursor: pointer;
  width: 100%; height: 100%;
}

.tool_box { display: none; position: absolute; bottom: 94px; left: 0; right: 0; background: #fff; border-top: 1px solid #eee; max-height: 180px; overflow-y: auto; }
.wl_faces_main { padding: 10px; }
.wl_faces_main span {
  display: inline-block; width: 32px; height: 32px; margin: 4px; font-size: 20px; text-align: center; cursor: pointer;
}

.bg, .lang-bg, .offline {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 2000;
  background: rgba(0,0,0,0.5); align-items: center; justify-content: center;
}
.bg.show, .lang-bg.show, .offline.show { display: flex; }
.dialog { position: relative; width: 82%; max-width: 320px; background: #fff; border-radius: 10px; padding: 16px; }
.dialog .title { text-align: center; font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.dialog .lang-close { position: absolute; right: 12px; top: 12px; width: 18px; height: 18px; border: 2px solid #999; border-radius: 50%; cursor: pointer; }
.evaluate-item { display: flex; align-items: center; margin: 8px 0; }
.evaluate-title { margin-left: 8px; font-size: 14px; }
.star { width: 26px; height: 26px; margin: 0 3px; cursor: pointer; }
.about-text { width: 100%; resize: none; border: 1px solid #e6e9ed; border-radius: 6px; padding: 8px; }
.evaluate-btn { display: flex; justify-content: center; gap: 12px; margin-top: 14px; }
.evaluate-btn button { padding: 8px 26px; border: 0; border-radius: 6px; font-size: 14px; cursor: pointer; }
.evaluate-btn .reset { background: #f2f5f7; color: #555; }
.evaluate-btn .submit { background: var(--primary, #13c9cb); color: #fff; }
.offline-item { margin: 10px 0; }
.offline-item input, .offline-item textarea { width: 100%; border: 1px solid #e6e9ed; border-radius: 6px; padding: 8px; font-size: 14px; resize: none; }
.lang-choose { display: flex; flex-wrap: wrap; }
.lang-choose span { width: 50%; display: inline-flex; align-items: center; padding: 10px 6px; cursor: pointer; font-size: 14px; }
.lang-choose img { width: 26px; height: 18px; margin-right: 8px; border-radius: 2px; }

.scroll-top { position: fixed; right: 12px; bottom: 108px; z-index: 997; width: 30px; height: 30px; line-height: 28px; text-align: center; background: rgba(0,0,0,0.35); color: #fff; border-radius: 50%; display: none; }

/* voice recording panel */
.voice-rec {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 2500;
  background: rgba(0,0,0,0.6); align-items: center; justify-content: center; flex-direction: column;
}
.voice-rec.show { display: flex; }
.voice-rec-mic { width: 84px; height: 84px; line-height: 84px; border-radius: 50%; background: rgba(255,255,255,0.15); font-size: 40px; text-align: center; animation: voicepulse 1.2s ease-in-out infinite; }
@keyframes voicepulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.voice-rec-time { color: #fff; font-size: 34px; margin-top: 18px; font-weight: 600; letter-spacing: 2px; }
.voice-rec-tip { color: rgba(255,255,255,0.8); font-size: 13px; margin-top: 8px; }
.voice-rec-btns { display: flex; gap: 16px; margin-top: 28px; }
.voice-rec-btns button { padding: 10px 32px; border: 0; border-radius: 22px; font-size: 14px; cursor: pointer; }
.voice-rec-btns .reset { background: rgba(255,255,255,0.25); color: #fff; }
.voice-rec-btns .submit { color: #fff; }

/* voice message bubble */
.voice-msg { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.voice-msg b { font-weight: 600; }
.voice-msg .v-ico { font-style: normal; font-size: 12px; }
.voice-msg.playing { opacity: 0.85; }
