/* PostsFeed.module.css — dark theme post cards for creator profile */

.section {
  margin-top: 2.5rem;
}

.sectionHeader {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.sectionTitle {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
}

.postCount {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  font-weight: 400;
}

/* ── Feed list ─────────────────────────────────────────────────────────────── */

.feed {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ── Post card ─────────────────────────────────────────────────────────────── */

.card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.15s;
}

.card:hover {
  border-color: var(--color-border-active, var(--color-border));
}

.cardTitle {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 0.5rem;
}

.cardMeta {
  font-size: 0.8rem;
  color: var(--color-text-muted, var(--color-text-secondary));
  margin-bottom: 1rem;
}

/* ── Rich text body ────────────────────────────────────────────────────────── */

.cardBody {
  font-size: 0.925rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
  overflow: hidden;
}

.cardBody h1,
.cardBody h2,
.cardBody h3 {
  color: var(--color-text-primary);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.cardBody p {
  margin: 0 0 0.75rem;
}

.cardBody ul,
.cardBody ol {
  padding-left: 1.5rem;
  margin: 0 0 0.75rem;
}

.cardBody blockquote {
  border-left: 3px solid var(--color-accent, #22d3ee);
  padding-left: 1rem;
  margin: 0 0 0.75rem;
  color: var(--color-text-muted, var(--color-text-secondary));
  font-style: italic;
}

.cardBody a {
  color: var(--color-accent, #22d3ee);
  text-decoration: underline;
}

.cardBody code {
  background: var(--color-bg-input, #1e293b);
  padding: 0.15em 0.35em;
  border-radius: 4px;
  font-size: 0.875em;
}

.cardBody pre {
  background: var(--color-bg-input, #1e293b);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0 0 0.75rem;
}

/* ── Attachments ───────────────────────────────────────────────────────────── */

.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.attachment {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-bg-input, #1e293b);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.825rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
}

.attachment:hover {
  background: var(--color-bg-surface-hover, #334155);
  border-color: var(--color-accent, #22d3ee);
}

.attachmentIcon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--color-accent, #22d3ee);
}

.attachmentName {
  font-weight: 500;
  color: var(--color-text-primary);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachmentSize {
  color: var(--color-text-muted, var(--color-text-secondary));
  font-size: 0.75rem;
}

/* ── States ────────────────────────────────────────────────────────────────── */

.loading {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  padding: 1.5rem 0;
}

.empty {
  color: var(--color-text-muted, var(--color-text-secondary));
  font-size: 0.925rem;
  padding: 1.5rem 0;
}

.error {
  color: var(--color-error, #ef4444);
  font-size: 0.925rem;
  padding: 1.5rem 0;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .card {
    padding: 1rem;
  }

  .attachments {
    flex-direction: column;
  }

  .attachment {
    width: 100%;
  }
}
