/* ============================================================
   community.css — EMSConferences.com community styles
   Used by: forums.html, thread.html, messages.html,
            moderation.html, conference.html (community widgets)
   ============================================================ */

/* ── PAGE SCAFFOLD ────────────────────────────────────────── */
.cm-wrap { max-width: 1080px; margin: 0 auto; padding: 28px 24px 64px; }
.cm-state { text-align: center; padding: 80px 24px; color: var(--tm); }
.cm-state i { font-size: 30px; color: var(--g10); display: block; margin-bottom: 14px; }
.cm-state h2 { font-family: 'Bebas Neue', sans-serif; font-size: 30px; color: var(--nvy); letter-spacing: .5px; margin-bottom: 6px; }
.cm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.cm-h1 { font-family: 'Bebas Neue', sans-serif; font-size: 38px; letter-spacing: .5px; color: var(--nvy); line-height: 1; }
.cm-sub { font-size: 13px; color: var(--tm); margin-top: 6px; }
.cm-back { font-size: 12px; font-weight: 700; color: var(--nm); margin-bottom: 10px; display: inline-flex; align-items: center; gap: 6px; }
.cm-back:hover { text-decoration: underline; }

/* ── BOARD GRID ───────────────────────────────────────────── */
.cm-boards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 34px; }
.cm-board {
  background: #fff; border: 1px solid var(--br); border-radius: var(--ra);
  padding: 18px; display: flex; gap: 14px; align-items: flex-start;
  transition: box-shadow .15s, border-color .15s; cursor: pointer;
}
.cm-board:hover { border-color: var(--n2); box-shadow: 0 3px 14px rgba(4,44,83,0.08); }
.cm-board-ic {
  width: 42px; height: 42px; border-radius: var(--ra); flex-shrink: 0;
  background: var(--nl); color: var(--n3); display: flex; align-items: center;
  justify-content: center; font-size: 17px;
}
.cm-board-n { font-size: 15px; font-weight: 800; color: var(--nvy); }
.cm-board-d { font-size: 12px; color: var(--tm); line-height: 1.5; margin: 3px 0 7px; }
.cm-board-m { font-size: 11px; color: var(--tf); }

/* ── THREAD LIST ──────────────────────────────────────────── */
.cm-list { background: #fff; border: 1px solid var(--br); border-radius: var(--ra); overflow: hidden; }
.cm-row {
  display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--br);
  align-items: flex-start; cursor: pointer; transition: background .12s;
}
.cm-row:last-child { border-bottom: none; }
.cm-row:hover { background: #fbfaf7; }
.cm-row-main { flex: 1; min-width: 0; }
.cm-row-t { font-size: 14px; font-weight: 700; color: var(--tx); line-height: 1.35; }
.cm-row-t .fa-thumbtack { color: var(--amb); font-size: 11px; margin-right: 5px; }
.cm-row-t .fa-lock { color: var(--tf); font-size: 11px; margin-right: 5px; }
.cm-row-m { font-size: 11.5px; color: var(--tf); margin-top: 3px; }
.cm-row-m b { color: var(--tm); font-weight: 600; }
.cm-row-stats { display: flex; gap: 12px; font-size: 11.5px; color: var(--tf); flex-shrink: 0; padding-top: 2px; }
.cm-row-stats i { margin-right: 3px; }
.cm-tag {
  display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .8px;
  text-transform: uppercase; padding: 2px 7px; border-radius: 10px;
  background: var(--nl); color: var(--n3); margin-right: 6px; vertical-align: 1px;
}

/* ── AVATARS ──────────────────────────────────────────────── */
.cm-av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1.5px solid var(--br); }
.cm-av-ph {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.cm-av-sm, .cm-av-ph.cm-av-sm { width: 26px; height: 26px; font-size: 10px; }

/* ── THREAD VIEW / POSTS ──────────────────────────────────── */
.cm-thread-card { background: #fff; border: 1px solid var(--br); border-radius: var(--ra); padding: 20px; margin-bottom: 16px; }
.cm-thread-title { font-family: 'Bebas Neue', sans-serif; font-size: 30px; letter-spacing: .4px; color: var(--nvy); line-height: 1.1; margin-bottom: 10px; }
.cm-post { background: #fff; border: 1px solid var(--br); border-radius: var(--ra); padding: 14px 16px; margin-bottom: 10px; }
.cm-post.cm-hidden { background: #faf9f5; border-style: dashed; }
.cm-post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cm-post-who { flex: 1; min-width: 0; }
.cm-post-name { font-size: 13px; font-weight: 800; color: var(--tx); }
.cm-post-name a { color: inherit; }
.cm-post-name a:hover { color: var(--nm); }
.cm-post-name span { font-weight: 400; color: var(--tf); font-size: 11px; }
.cm-post-time { font-size: 11px; color: var(--tf); }
.cm-post-body { font-size: 14px; color: var(--tx); line-height: 1.65; white-space: pre-wrap; word-wrap: break-word; }
.cm-post-body.cm-muted { color: var(--tf); font-style: italic; }
.cm-replyto { font-size: 11px; color: var(--nm); background: var(--nl); border-radius: 4px; padding: 2px 8px; display: inline-block; margin-bottom: 6px; }
.cm-acts { display: flex; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.cm-act {
  background: none; border: none; font-size: 11.5px; font-weight: 700;
  color: var(--tf); padding: 5px 9px; border-radius: var(--rs); cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px; font-family: 'Karla', sans-serif;
  transition: all .12s;
}
.cm-act:hover { background: var(--g50); color: var(--tm); }
.cm-act.on { color: var(--red); }
.cm-act.on:hover { background: var(--rdl); }

/* ── COMPOSERS ────────────────────────────────────────────── */
.cm-composer { background: #fff; border: 1px solid var(--br); border-radius: var(--ra); padding: 16px; margin-top: 18px; }
.cm-composer textarea {
  width: 100%; min-height: 88px; border: 1px solid var(--bm); border-radius: var(--rs);
  padding: 10px 12px; font-size: 13px; font-family: 'Karla', sans-serif; outline: none;
  resize: vertical; color: var(--tx);
}
.cm-composer textarea:focus, .cm-composer input:focus { border-color: var(--nm); }
.cm-composer input {
  width: 100%; border: 1px solid var(--bm); border-radius: var(--rs);
  padding: 10px 12px; font-size: 13px; font-family: 'Karla', sans-serif; outline: none;
  margin-bottom: 10px; color: var(--tx);
}
.cm-composer-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 10px; }
.cm-count { font-size: 11px; color: var(--tf); }
.cm-locknote { font-size: 13px; color: var(--tm); text-align: center; padding: 16px; background: var(--g50); border-radius: var(--ra); margin-top: 18px; }

/* ── MESSAGES (DM) ────────────────────────────────────────── */
.cm-dm-grid { display: grid; grid-template-columns: 320px 1fr; gap: 0; background: #fff; border: 1px solid var(--br); border-radius: var(--ra); overflow: hidden; min-height: 560px; }
.cm-dm-list { border-right: 1px solid var(--br); overflow-y: auto; max-height: 72vh; }
.cm-dm-item { display: flex; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--br); cursor: pointer; align-items: center; }
.cm-dm-item:hover, .cm-dm-item.act { background: #fbfaf7; }
.cm-dm-item.act { border-left: 3px solid var(--red); padding-left: 11px; }
.cm-dm-meta { flex: 1; min-width: 0; }
.cm-dm-name { font-size: 13px; font-weight: 800; color: var(--tx); display: flex; justify-content: space-between; gap: 8px; }
.cm-dm-name time { font-size: 10px; color: var(--tf); font-weight: 500; flex-shrink: 0; }
.cm-dm-prev { font-size: 11.5px; color: var(--tf); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.cm-dm-unread .cm-dm-prev, .cm-dm-unread .cm-dm-name { color: var(--tx); }
.cm-pill {
  min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 800; display: inline-flex; align-items: center;
  justify-content: center; padding: 0 5px; flex-shrink: 0;
}
.cm-dm-pane { display: flex; flex-direction: column; max-height: 72vh; }
.cm-dm-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--br); }
.cm-dm-head .cm-post-name { font-size: 14px; }
.cm-dm-menu { margin-left: auto; position: relative; }
.cm-dm-scroll { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 8px; background: #fbfaf8; }
.cm-bubble { max-width: 72%; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; position: relative; }
.cm-bubble.mine { align-self: flex-end; background: var(--nvy); color: #fff; border-bottom-right-radius: 4px; }
.cm-bubble.theirs { align-self: flex-start; background: #fff; border: 1px solid var(--br); color: var(--tx); border-bottom-left-radius: 4px; }
.cm-bubble time { display: block; font-size: 9.5px; opacity: .55; margin-top: 4px; }
.cm-bubble .cm-msgflag { position: absolute; right: -26px; top: 6px; opacity: 0; font-size: 11px; color: var(--tf); background: none; border: none; cursor: pointer; padding: 4px; }
.cm-bubble.theirs:hover .cm-msgflag { opacity: 1; }
/* Inline mentor Accept/Decline prompt shown inside a mentorship-request DM thread */
.cm-dm-mentor { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--br); background: #eef4fb; }
.cm-dm-mentor-txt { font-size: 12.5px; line-height: 1.45; color: var(--tx); flex: 1; min-width: 200px; }
.cm-dm-mentor-btns { display: flex; gap: 8px; flex-shrink: 0; }
.cm-dm-mentor-btns .btn { font-size: 13px; padding: 7px 16px; }
.cm-mentor-decline { background: #fff; color: #b91c1c; border: 1px solid #e5b4b4; }
.cm-dm-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--br); background: #fff; }
.cm-dm-input textarea {
  flex: 1; border: 1px solid var(--bm); border-radius: var(--ra); padding: 10px 12px;
  font-size: 13px; font-family: 'Karla', sans-serif; outline: none; resize: none; height: 44px; max-height: 120px;
}
.cm-dm-input textarea:focus { border-color: var(--nm); }
.cm-dm-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--tf); font-size: 13px; gap: 10px; }
.cm-dm-empty i { font-size: 28px; color: var(--g10); }

/* ── MODERATION ───────────────────────────────────────────── */
.cm-flag-card { background: #fff; border: 1px solid var(--br); border-left: 3px solid var(--amb); border-radius: var(--ra); padding: 16px; margin-bottom: 12px; }
.cm-flag-meta { font-size: 11.5px; color: var(--tm); margin-bottom: 8px; }
.cm-flag-meta b { color: var(--tx); }
.cm-flag-content { background: #fbfaf7; border: 1px solid var(--br); border-radius: var(--rs); padding: 10px 12px; font-size: 13px; white-space: pre-wrap; margin-bottom: 10px; max-height: 180px; overflow-y: auto; }
.cm-flag-acts { display: flex; gap: 8px; }
.cm-modlog { font-size: 12px; color: var(--tm); }
.cm-modlog td { padding: 7px 10px; border-bottom: 1px solid var(--br); }
.cm-modlog table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--br); border-radius: var(--ra); overflow: hidden; }

/* ── CONFERENCE PAGE WIDGETS ──────────────────────────────── */
.cm-follow-btn { width: 100%; justify-content: center; margin-bottom: 8px; }
.cm-follow-btn.on { background: var(--tll); color: var(--tlk); border: 1px solid var(--tel); }
.cm-follow-count { font-size: 11px; color: var(--tf); text-align: center; margin-bottom: 4px; }
.cm-pulse-item { display: flex; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--br); font-size: 12px; align-items: flex-start; }
.cm-pulse-item:last-child { border-bottom: none; }
.cm-pulse-item i { color: var(--red); margin-top: 2px; }
.cm-pulse-item .t { color: var(--tx); font-weight: 700; }
.cm-pulse-item .m { color: var(--tf); font-size: 11px; margin-top: 1px; }
.cm-pulse-form select, .cm-pulse-form input {
  width: 100%; border: 1px solid var(--bm); border-radius: var(--rs); padding: 8px 10px;
  font-size: 12px; font-family: 'Karla', sans-serif; margin-bottom: 8px; outline: none; background: #fff; color: var(--tx);
}
.cm-teaser { font-size: 12px; color: var(--tm); line-height: 1.55; }

/* ── NAV BADGE ────────────────────────────────────────────── */
.nav-msg-badge {
  position: absolute; top: 2px; right: 0; min-width: 15px; height: 15px;
  border-radius: 8px; background: var(--red); color: #fff; font-size: 9px;
  font-weight: 800; display: none; align-items: center; justify-content: center; padding: 0 4px;
}

/* ── MISC ─────────────────────────────────────────────────── */
.cm-loadmore { display: block; margin: 16px auto 0; }
.cm-empty { text-align: center; color: var(--tf); font-size: 13px; padding: 34px 16px; }
.cm-empty i { display: block; font-size: 24px; color: var(--g10); margin-bottom: 10px; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .cm-boards { grid-template-columns: 1fr; }
  .cm-wrap { padding: 20px 14px 48px; }
  .cm-h1 { font-size: 30px; }
  .cm-dm-grid { grid-template-columns: 1fr; min-height: 0; }
  .cm-dm-list { max-height: none; border-right: none; }
  .cm-dm-grid.in-convo .cm-dm-list { display: none; }
  .cm-dm-grid:not(.in-convo) .cm-dm-pane { display: none; }
  .cm-dm-pane { max-height: none; min-height: 70vh; }
  .cm-bubble { max-width: 85%; }
  .cm-bubble .cm-msgflag { opacity: 1; right: -24px; }
  .cm-row-stats { flex-direction: column; gap: 2px; }
}
