/* =========================================================
   social.css · 社交模块样式（聊天 / 会话 / 好友 / 工作坊 / 通知 / 分享）
   ========================================================= */

/* 空状态的紧凑变体 */
.empty.sm {
  padding: 20px 0;
}

/* ---------------- 通用小组件 ---------------- */
.me-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.me-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--t2);
}

.me-hint .ico {
  vertical-align: -3px;
}

.sec-title {
  margin: 16px 0 8px;
  font-size: 13px;
  font-weight: 650;
  color: var(--t3);
  letter-spacing: .04em;
}

.badge-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--red);
  vertical-align: middle;
}

.dot-red {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--red);
  vertical-align: middle;
}

/* ---------------- 会话卡片 ---------------- */
.conv-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--glass-2);
  box-shadow: var(--sh-1);
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}

.conv-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--sh-2);
}

.conv-ic {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
}

.conv-ic-notice {
  background: var(--orange-soft);
  color: var(--orange);
}

.conv-main {
  flex: 1 1 auto;
  min-width: 0;
}

.conv-name {
  font-size: 15px;
  font-weight: 620;
  color: var(--t1);
}

.conv-last {
  margin-top: 2px;
  font-size: 13px;
  color: var(--t2);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.conv-act {
  flex: 0 0 auto;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.conv-time {
  font-size: 12px;
  color: var(--t3);
}

.unread-n {
  min-width: 18px;
  padding: 0 5px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  font-size: 11px;
  color: #fff;
  background: var(--red);
  border-radius: 9px;
}

/* ---------------- 好友 / 工作坊行 ---------------- */
.fr-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fr-name {
  font-size: 15px;
  font-weight: 620;
  color: var(--t1);
}

.fr-sub {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--t3);
}

.ws-ic {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--purple-soft);
  color: var(--purple);
}

/* ---------------- 分享弹窗：选择接收方 ---------------- */
.share-q {
  max-height: 190px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--glass-2);
}

.pick-scroll {
  max-height: 200px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--glass-2);
}

.pick-group {
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 650;
  color: var(--t3);
  letter-spacing: .04em;
}

.pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--r-s);
  cursor: pointer;
  transition: background .16s var(--ease);
}

.pick-row:hover {
  background: var(--blue-soft);
}

.pick-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.pick-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.pick-ws {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--purple-soft);
  color: var(--purple);
}

.pick-info {
  min-width: 0;
}

.pick-name {
  font-size: 14.5px;
  font-weight: 620;
  color: var(--t1);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pick-sub {
  font-size: 12px;
  color: var(--t3);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ---------------- 聊天窗口 ---------------- */
.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.chat-name {
  font-size: 15px;
  font-weight: 650;
  color: var(--t1);
}

.chat-sub {
  font-size: 12.5px;
  color: var(--t3);
}

.chat-log {
  height: 46vh;
  min-height: 240px;
  overflow-y: auto;
  padding: 6px 2px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 82%;
}

.chat-row.mine {
  margin-left: auto;
  flex-direction: row-reverse;
}

.chat-avatar {
  flex: 0 0 32px;
}

.chat-col {
  min-width: 0;
}

.chat-meta {
  font-size: 11.5px;
  color: var(--t3);
  margin-bottom: 3px;
}

.chat-row.mine .chat-meta {
  text-align: right;
}

.chat-text {
  padding: 8px 11px;
  border-radius: 14px;
  background: var(--glass-2);
  border: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--t1);
  word-break: break-word;
}

.chat-row.mine .chat-text {
  background: var(--blue-soft);
  border-color: transparent;
}

.chat-card {
  padding: 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-s);
  background: var(--glass-solid);
  max-width: 420px;
}

.chat-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--purple);
  background: var(--purple-soft);
}

.chat-sys {
  align-self: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--t2);
  background: rgba(24, 31, 43, 0.06);
}

.chat-imgs:not(:empty) {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0;
}

.chat-imgs .thumb {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.chat-imgs .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-imgs .thumb button {
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  line-height: 16px;
  text-align: center;
  border: none;
  border-radius: 0 0 0 8px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}

.chat-bar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.chat-bar textarea {
  flex: 1 1 auto;
  min-height: 42px;
  max-height: 120px;
  resize: none;
}

.chat-bar .icon-btn {
  flex: 0 0 auto;
  padding: 9px 10px;
}

@media (max-width: 640px) {
  .chat-log { height: 40vh; }
  .chat-row { max-width: 92%; }
}

/* ---------------- 官方通知 ---------------- */
.notice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notice-item {
  position: relative;
  padding: 12px 14px 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--glass-2);
  overflow: hidden;
}

.notice-item.unread::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--blue);
}

.notice-item.unread {
  background: var(--glass-solid);
}

.notice-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 650;
  color: var(--t1);
}

.notice-body {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--t2);
  white-space: pre-wrap;
  word-break: break-word;
}

.notice-time {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--t3);
}

/* =========================================================
   动态通知（谁评论了你的帖子 / 谁做了你的题 / 回答被采纳）
   ---------------------------------------------------------
   与 .conv-card（会话）刻意做得不一样：会话是「点进去继续聊」，
   通知是「看一眼、跳过去」。所以通知用行式列表、无边框卡片，
   未读只靠左侧圆点和底色区分，避免整页都是浮起来的卡片。
   ========================================================= */
.ntf-wrap {
  margin-bottom: 14px;
}

.ntf-loading {
  font-size: 13px;
  color: var(--t3);
  padding: 10px 2px;
}

.ntf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px 6px;
}

.ntf-head > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--t2);
  letter-spacing: .2px;
}

.ntf-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-m);
  cursor: pointer;
  position: relative;
  transition: background .16s var(--ease);
}

.ntf-row + .ntf-row {
  margin-top: 2px;
}

.ntf-row:hover {
  background: rgba(29, 75, 118, .05);
}

.ntf-row.unread {
  background: rgba(29, 75, 118, .045);
}

.ntf-row.unread:hover {
  background: rgba(29, 75, 118, .08);
}

.ntf-av {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.ntf-main {
  flex: 1;
  min-width: 0;
}

.ntf-line {
  font-size: 13.5px;
  color: var(--t2);
  line-height: 1.5;
}

.ntf-line b {
  color: var(--t1);
  font-weight: 600;
}

.ntf-more {
  margin-left: 6px;
  font-size: 11.5px;
  color: var(--t3);
}

.ntf-title {
  margin-top: 2px;
  font-size: 13px;
  color: var(--t1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ntf-title.is-gone {
  color: var(--t3);
  font-style: normal;
}

.ntf-brief {
  margin-top: 1px;
  font-size: 12.5px;
  color: var(--t3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ntf-time {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--t3);
}

.ntf-dot {
  position: absolute;
  top: 14px;
  right: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}

.ntf-empty {
  font-size: 13px;
  color: var(--t3);
  line-height: 1.7;
  padding: 4px 2px 10px;
}
