/* Community (좋아요 · 댓글 · 신고).
 *
 * Loaded after style.css on both public pages, so it inherits the same
 * variables (--muted, --line, --brand, ...) and only adds what the community
 * block needs. Nothing here restyles an existing class.
 */

/* ------------------------------------------------- counts on a result card */

.engagement {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  min-height: 16px;          /* holds the row before the counts arrive */
}

.engagement-item { display: inline-flex; align-items: center; gap: 4px; }
.engagement-heart { color: #c8ced6; }
.engagement-item.liked { color: #c0392b; }
.engagement-item.liked .engagement-heart { color: #c0392b; }

/* --------------------------------------------- the block inside the dialog */

.community { border-top: 1px solid var(--line); padding-top: 16px; }

.community-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.community-like {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.community-like:hover:not(:disabled) { background: #f0f4fa; border-color: #c3ccd8; }
.community-like:disabled { opacity: .55; cursor: default; }
.community-like.on { background: #fdeceb; border-color: #f3c7c4; color: #a12822; }
.community-heart { font-size: 15px; line-height: 1; }
.community-like-count { font-variant-numeric: tabular-nums; }

.community-comment-count { font-size: 13px; color: var(--muted); }

.community-notice {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--warn-ink);
  background: var(--warn-bg);
  border-radius: 6px;
  padding: 8px 10px;
}
.community-notice a { color: inherit; font-weight: 600; }

/* ------------------------------------------------------------ comment form */

.community-form { margin-top: 12px; }

.community-guidance {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted);
}

.community-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit;
  font-size: 14px;
  resize: vertical;
}
.community-input:focus { outline: 2px solid #c3d9f5; border-color: var(--brand); }
.community-input[readonly] { background: #f7f8fa; color: var(--muted); cursor: pointer; }

.community-form-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ------------------------------------------------------------ comment list */

.community-list { margin-top: 16px; }

.comment {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.comment:first-child { border-top: 0; }

.comment-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.comment-nick { font-weight: 600; color: var(--ink); font-size: 13px; }
.comment-edited { font-size: 11px; }
.comment-actions { margin-left: auto; display: flex; gap: 6px; }

.link-btn.tiny { padding: 2px 8px; font-size: 12px; }

.comment-body {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;    /* a pasted URL must not widen the dialog */
}

.edit-form { margin-top: 8px; }

.community-more { margin-top: 12px; text-align: center; }

/* ------------------------------------------------------------ report form */

.report-form {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
}
.report-field {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}
.report-field select,
.report-field input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
}

/* ---------------------------------------------- recommendation sort tabs */

.sort-tabs { margin: 0 0 12px; }

@media (max-width: 640px) {
  .comment-actions { margin-left: 0; }
}

/* ------------------------------------------------- 보리수 톡 (상세 모달) */
/* Kept visually separate from the eligibility and XAI sections above: chat
   activity is not evidence, and the styling should not suggest it is. Plain
   rows rather than cards, so the dialog does not turn into a wall of boxes. */
.program-talk .ptalk-note,
.program-talk .ptalk-create-note { font-size: 0.82rem; color: #6b7480; margin: 4px 0 10px; }
.ptalk-rooms { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.ptalk-room {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border: 1px solid #e2e5ea; border-radius: 8px;
  background: #fbfcfd;
}
.ptalk-room.closed { opacity: 0.72; }
.ptalk-room-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ptalk-room-title {
  font-weight: 600; font-size: 0.95rem;
  /* A long room name must not push the dialog sideways on a phone. */
  overflow-wrap: anywhere;
}
.ptalk-room-meta { font-size: 0.82rem; color: #6b7480; overflow-wrap: anywhere; }
.ptalk-enter {
  flex: 0 0 auto; font-size: 0.85rem; font-weight: 600; text-decoration: none;
  padding: 6px 12px; border: 1px solid #c8d0da; border-radius: 6px; color: #1f2328;
  background: #fff; white-space: nowrap;
}
.ptalk-enter:hover { border-color: #9aa5b4; background: #f4f7fa; }
.ptalk-closed-label {
  font-size: 0.82rem; color: #6b7480; margin: 14px 0 6px; font-weight: 600;
}
.ptalk-notice { font-size: 0.88rem; margin: 10px 0 0; }
.ptalk-notice a { font-weight: 600; margin-left: 6px; }
.ptalk-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 12px 0 0; }
.ptalk-cta button {
  font-size: 0.88rem; font-weight: 600; padding: 7px 14px;
  border: 1px solid #c8d0da; border-radius: 6px; background: #fff; cursor: pointer;
}
.ptalk-cta button:hover { border-color: #9aa5b4; background: #f4f7fa; }
.ptalk-all { font-size: 0.85rem; }
.ptalk-create { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 0; }
.ptalk-create label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; }
.ptalk-create input, .ptalk-create select, .ptalk-create textarea {
  width: 100%; max-width: 100%; box-sizing: border-box;
  padding: 8px 10px; border: 1px solid #c8d0da; border-radius: 6px; font: inherit;
}
.ptalk-create textarea { resize: vertical; }
.ptalk-create-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ptalk-create-actions button { padding: 7px 14px; border-radius: 6px; font-size: 0.88rem; cursor: pointer; }

@media (max-width: 520px) {
  .ptalk-room { flex-direction: column; align-items: stretch; }
  .ptalk-enter { text-align: center; }
}
