/* /challenges list page: business challenge cards and the section extras.
   Loaded only by challenges.html. The card itself reuses .challenge-list-card
   from styles.css; this file adds the SPONSORED ribbon, the "Posted by" line,
   the badges, and an empty state that mirrors .ev-empty on /events. */

/* Anchors (#business, #events, #community, #past) land below the nav. */
#business, #events, #community, #past { scroll-margin-top: 88px; }

.biz-list-intro {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 640px;
  margin: -4px 0 24px;
}
.biz-post-cta {
  margin: 4px 0 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.biz-post-cta a {
  color: var(--purple);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.biz-list-error {
  text-align: center;
  color: var(--text-muted);
  padding: 24px;
}

/* Card */
.biz-card .challenge-list-card-image {
  background: radial-gradient(120% 90% at 30% 20%, #2a3a00 0%, #0d0d0d 65%);
}
.challenge-ribbon-business {
  background: linear-gradient(135deg, #111 0%, #2b2b2b 100%);
  color: var(--accent);
  /* SPONSORED is a letter longer than the other ribbon words; at the base
     0.15em its first S ran into the card's clipped corner. */
  letter-spacing: 0.08em;
}
.biz-posted-by {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--purple);
}
.biz-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.biz-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.biz-badge svg { flex-shrink: 0; }
.biz-badge-prize {
  background: #0d0d0d;
  border-color: #0d0d0d;
  color: var(--accent);
}
.biz-badge-private {
  background: var(--purple-soft);
  border-color: rgba(124, 58, 237, 0.2);
  color: var(--purple);
}

/* Coming soon (js/business-challenges-list.js isComingSoon): the card stays
   on the list but opens nothing, so it never lifts on hover and its action is
   a quiet label the size of the VIEW CHALLENGE button, not a button. */
.biz-card-soon:hover {
  transform: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  border-color: var(--border);
}
.biz-card-soon .challenge-list-card-link { cursor: default; }
.biz-soon-pill {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* Empty state: same look as .ev-empty on /events */
.biz-empty {
  background: #0d0d0d;
  border: 1px solid rgba(200, 255, 0, 0.22);
  border-radius: var(--radius-lg);
  padding: 56px 32px;
  margin-bottom: 24px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  position: relative;
  overflow: hidden;
}
.biz-empty::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% -10%, rgba(200, 255, 0, 0.12), transparent 60%);
  pointer-events: none;
}
.biz-empty-badge {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(200, 255, 0, 0.14);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 0 26px rgba(200, 255, 0, 0.28);
}
.biz-empty-badge svg { width: 28px; height: 28px; }
.biz-empty h3 {
  position: relative;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--accent);
}
.biz-empty p {
  position: relative;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 auto;
  max-width: 420px;
  line-height: 1.6;
}

@media (max-width: 480px) {
  .biz-empty { padding: 40px 20px; }
  .biz-badge { white-space: normal; }
}

/* Sponsored | Event | Community toggle (challenges.html, applyKindTabs).
   It reuses Explore's .feed-tabs pill from styles.css; this only centres it
   under the page title and adds the open-challenge count. On a phone the
   tabs get tighter padding so the three fit from 360px wide. The bar is
   never centred with justify-content: the header's text-align centres it
   when it fits, and on a narrower screen it overflows from the start and
   scrolls (a centred overflow would cut the first tab off where it cannot
   be scrolled to). The styles.css fade-out mask stays off, because it would
   also fade the last tab whenever the bar fits. */
.ch-kind-tabs {
  display: inline-flex;
  margin: 22px auto 0;
}
.ch-kind-tabs .feed-tab[hidden] { display: none; }
/* Inset focus ring: the bar scrolls on narrow phones (overflow-x: auto in
   styles.css), which would clip an outer outline. */
.ch-kind-tabs .feed-tab:focus-visible { outline: 2px solid var(--text); outline-offset: -3px; }
.ch-kind-tabs .feed-tab.active:focus-visible { outline-color: #fff; }
.ch-kind-count:empty { display: none; }
.ch-kind-count {
  display: inline-block;
  margin-left: 6px;
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
  background: var(--border);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.feed-tab.active .ch-kind-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}
@media (max-width: 768px) {
  .ch-kind-tabs {
    -webkit-mask-image: none;
            mask-image: none;
  }
  .ch-kind-tabs { gap: 4px; }
  .ch-kind-tabs .feed-tab { padding: 8px 10px; }
  .ch-kind-count { margin-left: 4px; }
}
