/* Ported from legacy campaignDisplay.css (progress / matching) */

.campaign-summary {
  padding: calc(var(--card-spacer-y) / 2) var(--card-spacer-x) var(--card-spacer-y);
}

/* the title block, then the org row (orgLink), then the details */
.campaign-summary--title {
  --title-line: 1.92rem; /* the title's line box: 1.6rem x 1.2 */
  padding-top: 0.75rem;
  padding-bottom: 0.25rem;
}

.campaign-summary--details {
  padding-top: 0.5rem;
}

.campaign-summary__title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 1.6rem;
  line-height: var(--title-line);
  color: var(--text-title);
}

/* "By ... · Posted 1 wk ago" */
.campaign-summary__by {
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.campaign-summary__age {
  color: var(--text-secondary);
  font-weight: 400;
}

.campaign-summary__share {
  opacity: 0.6;
}

/* beside the title: as tall as its first line, so the icon sits centred on it
   however many lines the title wraps to; the negative margin lines the icon up
   with the content's right edge rather than the button's */
.campaign-summary--title .campaign-summary__share {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--title-line);
  padding: 0 0.5rem;
  margin-right: -0.5rem;
  border: 0;
}

.campaign-summary--title .dropdown {
  flex: none;
}

.campaign-summary__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* the gap below only when a badge shows */
.campaign-summary__badges:has(.badge:not([hidden])) {
  margin-bottom: 0.75rem;
}

.campaign-summary__finished {
  background-color: var(--brand-primary);
}

.campaign-summary__visibility {
  background-color: var(--text-secondary);
}

.campaign-summary__goal .progress {
  border-radius: var(--progress-radius);
  height: var(--progress-height);
  background: var(--progress-track);
}

.campaign-summary__figures {
  font-weight: 500;
  color: var(--text-secondary);
  padding-top: 0.25rem;
}

.bar-raised { background: var(--progress-raised); }
.bar-unmatched { background-color: var(--bg-tertiary); }
.bar-matchzone { background: var(--progress-match); }
.bar-matchzone-badge { background: var(--progress-match-badge); }
.match-remaining { color: var(--brand-primary); }

.campaign-summary__matching {
  margin: 1rem 0;
  border-color: var(--border-color);
}

.campaign-summary__blurb {
  margin-top: 1rem;
  white-space: pre-wrap;
}

/* skeleton, while the app loads */
.campaign-summary__skeleton {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: var(--card-spacer-y) var(--card-spacer-x);
}

.campaign-summary__skeleton-title {
  width: 55%;
  height: 1.75rem;
  --flux-skeleton-radius: var(--bs-border-radius);
}

.campaign-summary__skeleton-line {
  height: 1rem;
  --flux-skeleton-radius: var(--bs-border-radius-sm);
}
