/* ===== WeChat start chat chooser ===== */
.wechat-start-chat-overlay .wechat-start-chat-sheet {
  max-height: min(78dvh, 560px) !important;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.wechat-start-titlebar {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 28px;
}

.wechat-start-back {
  position: absolute;
  top: 50%;
  left: 8px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: var(--wechat-sheet-text);
  background: transparent;
  transform: translateY(-50%);
}

.wechat-start-back:active { background: var(--wechat-sheet-field); }
.wechat-start-back[hidden] { display: none !important; }
.wechat-start-back svg { width: 22px; height: 22px; stroke: currentColor; }

.wechat-start-chat-body {
  min-height: 150px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 2px;
}

.wechat-start-chat-body .wechat-section-label {
  margin: 0 16px 8px;
}

.wechat-start-home,
.wechat-start-list {
  margin: 0;
  overflow: hidden;
}

.wechat-start-option,
.wechat-start-row {
  width: 100%;
  min-height: 58px;
  padding: 9px 16px;
  border: 0;
  border-bottom: 0.5px solid var(--wechat-sheet-line);
  border-radius: 0;
  color: var(--wechat-sheet-text);
  background: var(--wechat-sheet-surface) !important;
  font: inherit;
  text-align: left;
  appearance: none;
}

.wechat-start-row {
  min-height: 60px;
  gap: 12px;
}

.wechat-start-option:disabled {
  opacity: .48;
}

.wechat-start-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  max-width: 42px;
  flex: 0 0 42px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 7px;
  font-size: 15px;
}

.wechat-start-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover !important;
}

.wechat-start-chat-overlay .wechat-create-actions.single {
  grid-template-columns: 1fr;
}

@media (max-width: 370px), (max-height: 650px) {
  .wechat-start-chat-overlay .wechat-start-chat-sheet { max-height: min(82dvh, 520px) !important; }
  .wechat-start-option,
  .wechat-start-row { padding-left: 12px; padding-right: 12px; }
  .wechat-start-chat-body .wechat-section-label { margin-left: 12px; margin-right: 12px; }
}
