/* Portal Designer P1 — portal-scoped ch-card / ch-live-grid / ch-podium
 * Mirror of home monthly challenge look from wdhc-home.css, scoped so we do NOT
 * edit public index / Grip Age / board CSS. Link only from athlete-portal dashboard.
 */

#portalChallengesLive.ch-live-grid,
#section-monthly-challenges #portalChallengesLive.ch-live-grid--home {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  margin: 0;
  padding: 0;
  text-align: left;
}

#portalChallengesLive .ch-card.portal-challenge-card {
  width: 100%;
  background: linear-gradient(165deg, rgba(160, 70, 230, 0.12) 0%, rgba(12, 8, 18, 0.96) 42%);
  border: 1px solid rgba(160, 70, 230, 0.18);
  border-radius: 14px;
  padding: 16px 14px 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  box-shadow: none;
  text-align: left;
}

#portalChallengesLive .ch-card__head {
  margin-bottom: 10px;
  text-align: left;
}

#portalChallengesLive .ch-card__title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.15;
  margin: 8px 0 6px;
  color: #fff;
}

#portalChallengesLive .ch-card__rule {
  font-size: 0.88rem;
  color: #d080f8;
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.35;
}

#portalChallengesLive .ch-card__guinness {
  font-size: 0.82rem;
  color: var(--ui-caption, #a8a8a8);
  margin: 0 0 6px;
  line-height: 1.4;
}

#portalChallengesLive .ch-card__meta {
  font-family: 'Rajdhani', 'Source Sans 3', sans-serif;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ui-caption, #a8a8a8);
  margin: 0;
}

#portalChallengesLive .status-pill {
  display: inline-block;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--accent-red, #cc0000);
  color: var(--accent-red, #cc0000);
  background: transparent;
  box-shadow: 0 0 10px rgba(204, 0, 0, 0.28);
  margin: 0;
}

#portalChallengesLive .ch-podium {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

#portalChallengesLive .ch-podium__item {
  margin: 0;
  padding: 0;
}

#portalChallengesLive .ch-podium__item:last-child .ch-podium__row {
  border-bottom: none;
}

#portalChallengesLive .ch-podium__row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#portalChallengesLive .ch-podium__row--rank-1 { background: rgba(212, 175, 55, 0.08); }
#portalChallengesLive .ch-podium__row--rank-2 { background: rgba(192, 192, 192, 0.06); }
#portalChallengesLive .ch-podium__row--rank-3 { background: rgba(205, 127, 50, 0.07); }

#portalChallengesLive .ch-podium__row.is-you {
  outline: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 8px;
}

#portalChallengesLive .ch-podium__rank {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  color: #c8c8c8;
  text-align: center;
}

#portalChallengesLive .ch-podium__rank.rank-1 { color: #d4af37; }
#portalChallengesLive .ch-podium__rank.rank-2 { color: #d0d0d0; }
#portalChallengesLive .ch-podium__rank.rank-3 { color: #cd7f32; }

#portalChallengesLive .ch-podium__name {
  font-weight: 600;
  color: #f2f2f2;
  font-size: 0.95rem;
}

#portalChallengesLive .ch-podium__val {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #ffe566;
  white-space: nowrap;
}

#portalChallengesLive .ch-podium__empty {
  padding: 12px 4px;
  color: var(--ui-caption, #a8a8a8);
  font-size: 0.9rem;
}

/* Neutralize older portal-tabs card chrome when ch-card is present */
#section-monthly-challenges #portalChallengesLive .ch-card.portal-challenge-card {
  background: linear-gradient(165deg, rgba(160, 70, 230, 0.12) 0%, rgba(12, 8, 18, 0.96) 42%);
  border: 1px solid rgba(160, 70, 230, 0.18);
  border-radius: 14px;
  padding: 16px 14px 12px;
}
