/* The "Posted on" block rendered by /blog-social.js at the foot of a blog
   post. Two post shells use it — the feature posts (feature-post.css: --line,
   --soft, --cyan) and the announcement post (styles.css: --border,
   --card-soft, --accent-bright) — so every colour falls back through both
   before landing on a literal. */

.blog-social {
  /* One column template for both grids: each share draft lines up under the
     "Posted on" slot for the same network. */
  --blog-social-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 48px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line, var(--border, #252525));
}

.blog-social-title {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--muted, #9a9a94);
}

.blog-social-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: var(--blog-social-columns);
  gap: 14px;
}

.blog-social-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line, var(--border, #252525));
  border-radius: 12px;
  background: var(--soft, var(--card-soft, #141414));
  font-size: 14px;
  min-width: 0;
}

.blog-social-label {
  color: var(--muted, #9a9a94);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.blog-social-link {
  color: var(--cyan, var(--accent-bright, #76d8f6));
  overflow-wrap: anywhere;
}

.blog-social-link:hover {
  text-decoration: underline;
}

/* An unannounced network still holds its slot: the row reads as empty rather
   than disappearing, so a missing permalink is visible as a missing one. */
.blog-social-item.is-empty {
  border-style: dashed;
  background: none;
}

.blog-social-empty {
  color: var(--muted, #9a9a94);
  font-style: italic;
}

/* A slot with no saved permalink that the referrer board shows is sending
   readers: the source is known even though the exact post link is not, so the
   slot names it rather than claiming the network was never posted to. */
.blog-social-item.is-detected {
  border-style: dashed;
}

.blog-social-detected-note {
  color: var(--muted, #9a9a94);
  font-size: 12px;
}

/* Administrator editing: the same slot, with the permalink as a field instead
   of a link. Everyone else sees the rendered link or "Not posted yet". */
.blog-social-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--line, var(--border, #252525));
  border-radius: 8px;
  background: color-mix(in srgb, var(--soft, #141414) 72%, #000);
  color: inherit;
  font: inherit;
  font-size: 13px;
}

.blog-social-input:focus-visible {
  outline: 2px solid var(--cyan, var(--accent-bright, #76d8f6));
  outline-offset: 1px;
}

.blog-social-admin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.blog-social-save {
  padding: 7px 14px;
  border: 1px solid var(--cyan, var(--accent-bright, #76d8f6));
  border-radius: 9px;
  background: none;
  color: var(--cyan, var(--accent-bright, #76d8f6));
  font-weight: 700;
  cursor: pointer;
}

.blog-social-save[disabled] {
  cursor: progress;
  opacity: 0.6;
}

.blog-social-status {
  color: var(--muted, #9a9a94);
  font-size: 12px;
}

.blog-social-status[data-state="ok"] {
  color: var(--cyan, var(--accent-bright, #76d8f6));
}

.blog-social-status[data-state="error"] {
  color: #f6768c;
}

.blog-social-draft-title {
  margin-top: 30px;
}

.blog-social-drafts {
  display: grid;
  grid-template-columns: var(--blog-social-columns);
  gap: 14px;
}

.blog-social-draft,
.blog-social-metrics {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line, var(--border, #252525));
  border-radius: 14px;
  background: var(--soft, var(--card-soft, #141414));
}

.blog-social-draft h3,
.blog-social-metrics h2,
.blog-social-metrics h3 {
  margin: 0 0 6px;
}

.blog-social-count,
.blog-social-metric-counts,
.blog-social-metric-hint {
  display: block;
  margin: 0 0 10px;
  color: var(--muted, #9a9a94);
  font-size: 12px;
}

.blog-social-metric-counts {
  margin-bottom: 2px;
}

/* The alt text is its own field beside the post body, because it belongs in
   the network's image-description box rather than in the post. */
.blog-social-field + .blog-social-field {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line, var(--border, #252525));
}

.blog-social-field-label {
  margin: 0 0 4px;
  color: var(--muted, #9a9a94);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.blog-social-hint {
  margin: 7px 0 0;
  color: var(--muted, #9a9a94);
  font-size: 12px;
}

.blog-social-draft textarea {
  box-sizing: border-box;
  width: 100%;
  resize: vertical;
  padding: 11px;
  border: 1px solid var(--line, var(--border, #252525));
  border-radius: 9px;
  background: color-mix(in srgb, var(--soft, #141414) 72%, #000);
  color: inherit;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.blog-social-prefill {
  display: inline-flex;
  margin-top: 11px;
  color: var(--cyan, var(--accent-bright, #76d8f6));
  font-weight: 700;
}

.blog-social-metrics {
  margin: 0 0 28px;
}

.blog-social-referrers {
  margin: 10px 0 0;
  padding-left: 22px;
}

.blog-social-referrers li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
}

.blog-social-referrers a {
  color: var(--cyan, var(--accent-bright, #76d8f6));
}

.blog-social-referrers span {
  color: var(--muted, #9a9a94);
  white-space: nowrap;
}
