.community-support-launcher,
.community-support-widget {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  letter-spacing: 0;
}

.community-support-widget[hidden] {
  display: none !important;
}

.community-support-widget [hidden] {
  display: none !important;
}

.community-support-launcher {
  position: fixed;
  right: 30px;
  bottom: 55px;
  z-index: 190;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 58px;
  min-height: 125px;
  padding: 15px 10px;
  color: #fff;
  background: #16afe5;
  border: 0;
  border-radius: 30px;
  box-shadow: 0 13px 32px rgba(4, 113, 156, .34);
  cursor: pointer;
}

.community-support-launcher.is-visible { display: flex; }
.community-support-launcher:hover { background: #0798d0; }
.community-support-launcher-icon { font-size: 25px; line-height: 1; }
.community-support-launcher > span:last-child { width: 1em; font-size: 15px; font-weight: 800; line-height: 1.2; }

.community-support-widget {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 200;
  display: none;
  flex-direction: column;
  width: min(772px, calc(100vw - 48px));
  height: min(820px, calc(100dvh - 48px));
  overflow: hidden;
  background: #fff;
  border: 1px solid #dce4e7;
  border-radius: 10px;
  box-shadow: 0 22px 70px rgba(26, 46, 55, .34);
  transform: translate(-50%, -50%);
}

.community-support-widget.is-open { display: flex; }
.community-support-header { flex: 0 0 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; color: #fff; background: #16afe5; }
.community-support-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.community-support-avatar,
.community-support-message-avatar { display: grid; place-items: center; color: #16afe5; background: #fff; border-radius: 50%; }
.community-support-avatar { width: 42px; height: 42px; font-size: 25px; }
.community-support-header h2 { margin: 0 0 2px; font-size: 18px; }
.community-support-header p { display: flex; align-items: center; gap: 5px; margin: 0; color: rgba(255,255,255,.88); font-size: 12px; }
.community-support-status-dot { width: 6px; height: 6px; border-radius: 50%; background: #dce7eb; }
.community-support-header.is-online .community-support-status-dot { background: #6ff0af; }
.community-support-header.is-offline .community-support-status-dot { background: #ffd27a; }
.community-support-close { width: 34px; height: 34px; padding: 0; color: #fff; background: transparent; border: 0; font-size: 30px; font-weight: 200; line-height: 1; cursor: pointer; }
.community-support-close:hover { background: rgba(255,255,255,.16); border-radius: 5px; }
.community-support-time { flex: 0 0 30px; display: grid; place-items: center; color: #9aa8af; font-size: 11px; }
.community-support-notice { flex: 0 0 auto; padding: 7px 12px; color: #8a5b13; background: #fff6df; border-bottom: 1px solid #f3dfad; text-align: center; font-size: 11px; }
.community-support-messages { flex: 1 1 auto; min-height: 0; padding: 20px 24px 30px; overflow-y: auto; background: #f6f7f8; scrollbar-width: thin; scrollbar-color: #d8dfe2 transparent; }
.community-support-message { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 15px; }
.community-support-message-avatar { width: 32px; height: 32px; flex: 0 0 auto; color: #fff; background: #16afe5; font-size: 19px; }
.community-support-message-body { min-width: 0; max-width: calc(100% - 41px); }
.community-support-sender { display: block; margin: 0 0 5px 2px; color: #33444d; font-size: 12px; }
.community-support-message.history { margin-bottom: 15px; }
.community-support-message.history.visitor { justify-content: flex-end; }
.community-support-message.history.visitor .community-support-message-body { display: flex; flex-direction: column; align-items: flex-end; }
.community-support-bubble { width: fit-content; max-width: 540px; padding: 10px 13px; color: #27343a; background: #fff; border: 1px solid #e6ebed; border-radius: 3px 7px 7px 7px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; font-size: 14px; }
.community-support-message.history.visitor .community-support-bubble { color: #fff; background: #16afe5; border-color: #16afe5; border-radius: 7px 3px 7px 7px; }
.community-support-image { display: block; max-width: 440px; max-height: 360px; border-radius: 5px; object-fit: contain; }
.community-support-file { display: flex; flex-direction: column; gap: 3px; color: inherit; text-decoration: none; }
.community-support-file strong { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-support-file small { opacity: .7; }
.community-support-file-actions { display: flex; align-items: center; gap: 5px; margin-top: 9px; padding-top: 8px; border-top: 1px solid #e4eaed; }
.community-support-file-actions button,
.community-support-file-actions a { min-width: 48px; height: 26px; padding: 0 8px; color: #167fa8; background: #f4fafc; border: 1px solid #cde5ee; border-radius: 4px; font: inherit; font-size: 11px; line-height: 24px; text-align: center; text-decoration: none; cursor: pointer; }
.community-support-file-actions button:hover,
.community-support-file-actions a:hover { color: #fff; background: #169fd1; border-color: #169fd1; }
.community-support-attachment { flex: 0 0 auto; display: flex; gap: 8px; align-items: center; padding: 6px 13px; color: #54636a; background: #f0f8fb; border-top: 1px solid #d9edf5; font-size: 11px; }
.community-support-attachment span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-support-attachment button { color: #d94f4f; background: transparent; border: 0; font-size: 11px; cursor: pointer; }
.community-support-typing { flex: 0 0 18px; min-height: 18px; padding: 2px 14px; color: #859198; background: #fff; font-size: 10px; }
.community-support-composer { position: relative; flex: 0 0 150px; display: grid; grid-template-rows: minmax(0, 1fr) 46px; background: #fff; border-top: 1px solid #e5eaed; }
.community-support-composer textarea { width: 100%; min-height: 70px; padding: 12px 13px 4px; color: #18242b; background: #fff; border: 0; outline: none; resize: none; line-height: 1.5; font-family: inherit; font-size: 13px; }
.community-support-composer textarea::placeholder { color: #bdc6ca; }
.community-support-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 7px 11px; }
.community-support-tools { display: flex; gap: 1px; }
.community-support-tools button { width: 34px; height: 32px; padding: 0; color: #33434b; background: transparent; border: 0; border-radius: 5px; font-size: 21px; cursor: pointer; }
.community-support-tools button:hover { background: #eff5f7; }
.community-support-send { min-width: 62px; height: 32px; padding: 0 14px; color: #fff; background: #16afe5; border: 0; border-radius: 5px; font-weight: 700; cursor: pointer; }
.community-support-send:hover { background: #0798d0; }
.community-support-send:disabled { cursor: not-allowed; opacity: .5; }
.community-support-emoji-picker { position: absolute; left: 10px; bottom: 48px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; width: 230px; padding: 9px; background: #fff; border: 1px solid #dfe5e7; border-radius: 6px; box-shadow: 0 8px 24px rgba(27, 52, 62, .16); }
.community-support-emoji-picker button { width: 28px; height: 28px; padding: 0; background: transparent; border: 0; border-radius: 4px; font-size: 18px; cursor: pointer; }
.community-support-emoji-picker button:hover { background: #eff5f7; }

@media (max-width: 600px) {
  .community-support-launcher { display: none !important; }
  .community-support-widget { inset: 0; width: 100%; height: 100dvh; border: 0; border-radius: 0; transform: none; }
  .community-support-header { flex-basis: 60px; padding: 0 14px; }
  .community-support-messages { padding: 12px 10px 24px; }
  .community-support-bubble { max-width: min(275px, calc(100vw - 72px)); font-size: 13px; }
  .community-support-image { max-width: 240px; max-height: 220px; }
  .community-support-composer { flex-basis: 122px; }
}
