/* Likes, comments and view tracking shared by the 日报 and 资讯 pages (medai-social.js).
 * Variables come from digest.css. */
.soc { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.soc-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.soc-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg-2); font-size: 13.5px; cursor: pointer;
  font-variant-numeric: tabular-nums; white-space: nowrap; transition: border-color .14s, background-color .14s, color .14s;
}
.soc-btn:hover { border-color: var(--brand); color: var(--fg); background: var(--surface-2); }
.soc-btn.on { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
:root[data-theme=dark] .soc-btn.on { color: var(--link); }
.soc-btn:disabled { opacity: .6; cursor: default; }
.soc-btn svg { width: 16px; height: 16px; }
.soc-btn .n { min-width: 1em; text-align: center; }
.soc-closed { margin-left: auto; }

.soc-comments { margin-top: 12px; }
.soc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.soc-c { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
.soc-av {
  width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 700; overflow: hidden; flex: none;
}
.soc-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.soc-c-body { min-width: 0; }
.soc-c-h { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.soc-c-h b { color: var(--fg); font-size: 14px; font-weight: 600; }
.soc-c-del { border: 0; background: none; color: var(--muted); font-size: 12px; cursor: pointer; padding: 0 4px; border-radius: 4px; }
.soc-c-del:hover { color: var(--down); background: var(--down-soft); }
.soc-c-text { margin-top: 2px; font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--fg); }
.soc-more { margin-top: 10px; border: 0; background: none; color: var(--link); font-size: 13px; cursor: pointer; padding: 0; }
.soc-empty { font-size: 13px; color: var(--muted); }

.soc-form { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.soc-form textarea {
  width: 100%; min-height: 64px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--fg); font: inherit; font-size: 14px; line-height: 1.55; resize: vertical;
}
.soc-form textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent); border-color: var(--brand); }
.soc-form-f { display: flex; align-items: center; gap: 10px; }
.soc-form-f .soc-count { font-size: 12px; color: var(--muted); margin-right: auto; font-variant-numeric: tabular-nums; }
.soc-err { margin: 0; font-size: 13px; color: var(--down); }
.soc-login { font-size: 13px; color: var(--muted); margin-top: 10px; }

@media (max-width: 720px) {
  .soc { margin-top: 14px; }
  .soc-btn { height: 32px; padding: 0 10px; font-size: 13px; }
  .soc-form textarea { font-size: 16px; }
}
