/* 私聊输入栏：使用系统键盘发送，更多操作收纳在 + 面板中。 */
.community-chat-form {
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
}

.community-chat-form .community-chat-plus-btn {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid var(--divider);
  border-radius: 50%;
  color: var(--ink);
  background: var(--raised-bg);
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}

.community-chat-form .community-chat-plus-btn.is-open {
  color: var(--muted);
  font-size: 28px;
}

.community-chat-tools {
  position: fixed;
  z-index: 49;
  bottom: calc(62px + env(safe-area-inset-bottom));
  left: 50%;
  width: min(430px, 100vw);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 16px 18px 18px;
  transform: translateX(-50%);
  background: var(--topbar-bg);
  border-top: 1px solid var(--divider);
  box-shadow: 0 -7px 18px rgba(31, 42, 51, .06);
}

.community-chat-tools button {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 0;
  color: var(--text);
  background: transparent;
}

.community-chat-tools button > span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--ink);
  background: var(--raised-bg);
}

.community-chat-tools button.is-holding > span {
  color: #fff;
  background: var(--accent);
  transform: scale(.94);
}

.community-chat-tools button.is-holding b::after {
  content: " · 录像";
}

.community-chat-tools svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.community-chat-tools b {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.community-chat-page.chat-tools-open .community-chat-list {
  padding-bottom: calc(190px + env(safe-area-inset-bottom));
}

.community-message-media {
  width: min(72vw, 258px);
  max-width: 78%;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--divider);
  border-radius: 14px;
  background: var(--section-bg);
}

.community-message.mine .community-message-media {
  justify-self: end;
}

.community-message.theirs .community-message-media {
  justify-self: start;
}

.community-message-media img,
.community-message-media video {
  width: 100%;
  max-height: 320px;
  display: block;
  object-fit: cover;
}

.community-message-media.is-video {
  position: relative;
}

.community-message-media.is-video i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, .55);
  font-size: 18px;
  font-style: normal;
}

.keyboard-open .community-chat-tools {
  display: none !important;
}

html[data-theme-color="dark"] .community-chat-tools,
html[data-theme-color="dark"] .community-chat-form .community-chat-plus-btn,
html[data-theme-color="dark"] .community-chat-tools button > span,
html[data-theme-color="dark"] .community-message-media {
  border-color: #303033 !important;
  background: #202020 !important;
}
