/*
 * community.css — community feed (text post list).
 */
.wg-feed h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 14px; }

.wg-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.wg-filters select {
  flex: 1 1 40%;
  min-width: 120px;
  padding: 9px 34px 9px 12px;
  font: inherit;
  font-weight: 500;
  border: 1px solid var(--wg-border);
  border-radius: 12px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23889' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16,24,32,0.04);
}
.wg-filters select:hover { border-color: var(--wg-color); }

.wg-clist { display: flex; flex-direction: column; gap: 10px; }

.wg-citem {
  display: block;
  border: 1px solid var(--wg-border-soft, #e6efe9);
  border-radius: var(--wg-radius-card, 14px);
  padding: 12px 14px;
  background: #fff;
  color: var(--wg-text);
  text-decoration: none;
  box-shadow: var(--wg-shadow-card);
  transition: box-shadow .2s ease, transform .2s var(--wg-ease-spring, ease), border-color .16s ease;
  animation: wg-page-in .3s var(--wg-ease-out, ease) both;
}
.wg-citem:hover { box-shadow: var(--wg-shadow-hover); transform: translateY(-2px); border-color: #d8e6dd; text-decoration: none; }
.wg-citem:active { transform: scale(0.99); }
@media (prefers-reduced-motion: reduce) { .wg-citem { animation: none; transition: none; } .wg-citem:hover, .wg-citem:active { transform: none; } }
/* Post with an image: small thumbnail to the left of the text. */
.wg-citem.has-img { display: flex; gap: 12px; align-items: flex-start; }
.wg-citem-thumb { flex: none; width: 66px; height: 66px; border-radius: 8px; overflow: hidden; background: #f1f3f5; }
.wg-citem-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wg-citem-main { flex: 1; min-width: 0; }

.wg-ctype {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--wg-color-dark);
  background: #e7f7ee;
  padding: 2px 7px;
  border-radius: 999px;
}
.wg-ctitle { font-weight: 700; margin: 6px 0 2px; }
.wg-cexcerpt { color: var(--wg-muted); font-size: 0.88rem; line-height: 1.4; }
.wg-cmeta {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  color: var(--wg-muted);
  font-size: 0.78rem;
}

.wg-feed-empty { text-align: center; color: var(--wg-muted); padding: 32px 0; }
#wg-load-more { margin: 16px auto 0; max-width: 220px; }

/* Admin-pinned indicator */
.wg-pin-badge {
  display: inline-block; margin-bottom: 4px;
  background: #fff7e0; color: #8a6d00; border: 1px solid #f0d98a;
  font-size: 0.68rem; font-weight: 700; padding: 1px 8px; border-radius: 999px;
}

/* Featured (pinned) posts — compact carousel so pinned posts don't dominate */
.wg-cfeatured { background: #eef8f1; border: 1px solid #dcefe3; border-radius: 16px; padding: 14px 16px; margin: 12px 0 16px; }
.wg-cfeatured[hidden] { display: none; }
.wg-cfeatured-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.wg-cfeatured-ico { flex: none; width: 38px; height: 38px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; color: var(--wg-color); }
.wg-cfeatured-ico .wg-ico { width: 18px; height: 18px; }
.wg-cfeatured-titles h2 { margin: 0; font-size: 1rem; color: var(--wg-text); }
.wg-cfeatured-titles p { margin: 1px 0 0; font-size: 0.78rem; color: var(--wg-muted); }
.wg-cfeatured-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.wg-cfcard { flex: 0 0 168px; scroll-snap-align: start; background: #fff; border: 1px solid var(--wg-border); border-radius: 10px; padding: 10px; text-decoration: none; color: inherit; }
.wg-cfcard-top { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-bottom: 5px; }
.wg-cfcard-top .wg-pin-badge, .wg-cfcard-top .wg-ctype { font-size: 0.62rem; padding: 1px 6px; }
.wg-cfcard-title { font-weight: 600; font-size: 0.82rem; line-height: 1.3; color: var(--wg-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wg-cfcard-meta { font-size: 0.68rem; color: var(--wg-muted); margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Type tabs (replace the type dropdown) — springy chips like the marketplace */
.wg-ctabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; margin-bottom: 8px; -webkit-overflow-scrolling: touch; }
.wg-ctab {
  flex: 0 0 auto; padding: 7px 14px; border: 1px solid var(--wg-border); border-radius: 999px;
  background: #fff; color: var(--wg-muted); font-size: 0.85rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .14s var(--wg-ease-spring, ease), background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.wg-ctab:hover { border-color: var(--wg-color); color: var(--wg-text); transform: translateY(-1px); }
.wg-ctab:active { transform: scale(0.93); }
.wg-ctab.is-on { background: var(--wg-color); color: #fff; border-color: var(--wg-color); box-shadow: 0 2px 9px rgba(14,175,76,0.30); }
@media (prefers-reduced-motion: reduce) { .wg-ctab { transition: none; } .wg-ctab:hover, .wg-ctab:active { transform: none; } }

/* Featured card + carousel polish */
.wg-cfcard { transition: box-shadow .18s ease, transform .18s var(--wg-ease-spring, ease), border-color .16s ease; }
.wg-cfcard:hover { border-color: #d8e6dd; box-shadow: var(--wg-shadow-hover); transform: translateY(-2px); text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .wg-cfcard { transition: none; } .wg-cfcard:hover { transform: none; } }
