/* Group page. Mobile-first: most visitors arrive by phone from a printed QR code. */

.loading-note { color: var(--muted); padding-block: 2rem; }

.group-header { padding-block: 1rem 1.5rem; }
.group-logo { max-height: 72px; width: auto; margin-bottom: .75rem; }
.group-header h1 { margin: 0 0 .25rem; }

/* Goal bar */
.goal { margin-block: 1rem 1.75rem; }
.goal-figures { font-size: 1.05rem; margin-bottom: .5rem; }
.goal-figures strong { font-size: 1.25rem; }
.goal-figures span { color: var(--muted); }
.goal-track {
  height: 14px; border-radius: 999px; overflow: hidden;
  background: color-mix(in srgb, var(--fg) 10%, transparent);
}
.goal-fill {
  height: 100%; background: var(--accent); border-radius: 999px;
  transition: width .4s ease;
}
.goal-meta { margin: .5rem 0 0; color: var(--muted); font-size: .92rem; }

/* Disclosure — commercial co-venturer notice, kept next to the prices. */
.disclosure {
  border-left: 4px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  padding: .85rem 1rem; border-radius: 0 .5rem .5rem 0;
  font-size: .95rem; margin-block: 1.5rem;
}

/* Products */
.products h2 { margin-top: 2rem; }
.product {
  border: 1px solid color-mix(in srgb, var(--fg) 14%, transparent);
  border-radius: .85rem; padding: 1.1rem; margin-bottom: 1.25rem;
  background: color-mix(in srgb, var(--bg) 60%, #fff);
}
.product h3 { margin: 0 0 .25rem; }
.product-desc { margin: 0 0 .75rem; color: var(--muted); font-size: .95rem; }

/* Live wording preview — a plain 2D stand-in for the printed item. */
.preview {
  display: grid; place-content: center; gap: .15rem; text-align: center;
  min-height: 92px; margin-bottom: .9rem; padding: .75rem;
  border-radius: .6rem; border: 2px dashed color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  overflow-wrap: anywhere;
}
.preview-line { font-weight: 600; }
.preview-line.primary { font-size: 1.2rem; }
.preview-placeholder { color: var(--muted); font-style: italic; font-size: .9rem; }

.field { margin-bottom: .85rem; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
.field input {
  width: 100%; padding: .7rem .75rem; font-size: 1rem; /* 16px avoids iOS zoom-on-focus */
  border: 1px solid color-mix(in srgb, var(--fg) 25%, transparent);
  border-radius: .5rem; background: #fff; color: var(--fg);
  min-height: 44px;
}
.field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.hint { display: block; font-size: .82rem; color: var(--muted); margin-top: .25rem; }
.field-error { color: #b3261e; font-size: .92rem; margin: .5rem 0 0; min-height: 1.2em; }

.product-actions { display: flex; gap: .6rem; align-items: center; }
.qty {
  width: 4.5rem; padding: .7rem .5rem; font-size: 1rem; min-height: 44px;
  border: 1px solid color-mix(in srgb, var(--fg) 25%, transparent); border-radius: .5rem;
}
.cta.secondary { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
button.cta { border: none; cursor: pointer; font: inherit; font-weight: 600; }
button.cta:disabled { opacity: .5; cursor: not-allowed; }

/* Cart */
.cart {
  margin-top: 2rem; padding: 1.1rem; border-radius: .85rem;
  border: 2px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.cart h2 { margin-top: 0; }
.empty { color: var(--muted); }
.cart-line {
  display: grid; grid-template-columns: 1fr auto auto; gap: .5rem .75rem;
  align-items: baseline; padding-block: .6rem;
  border-bottom: 1px solid color-mix(in srgb, var(--fg) 10%, transparent);
}
.cart-line-main { display: flex; flex-wrap: wrap; gap: .4rem; align-items: baseline; }
.cart-qty { font-weight: 700; }
.cart-detail { color: var(--muted); font-size: .9rem; width: 100%; }
.cart-price { font-variant-numeric: tabular-nums; }
.remove {
  background: none; border: none; color: var(--muted); cursor: pointer;
  text-decoration: underline; font-size: .85rem; padding: .25rem;
}
.addon-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .9rem; }
.addon-label { font-size: .9rem; color: var(--muted); }
.addon {
  background: transparent; border: 1px dashed var(--accent); color: var(--accent);
  border-radius: 999px; padding: .45rem .8rem; cursor: pointer; font: inherit; font-size: .88rem;
}
.cart-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-block: 1rem; font-size: 1.15rem;
}
.checkout { width: 100%; text-align: center; margin-top: .5rem; }

.closed-note {
  border: 1px solid color-mix(in srgb, var(--fg) 15%, transparent);
  border-radius: .85rem; padding: 1.5rem; margin-block: 1.5rem;
  background: color-mix(in srgb, var(--fg) 4%, transparent);
}
.closed-note h1, .closed-note h2 { margin-top: 0; }

/* Thanks page */
.thanks h1 { margin-bottom: .5rem; }
.share { margin-block: 2rem; }
.share-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.share-status { color: var(--muted); font-size: .92rem; min-height: 1.2em; }
.fine { color: var(--muted); font-size: .9rem; }

@media (prefers-reduced-motion: reduce) {
  .goal-fill { transition: none; }
}

/* Organizer dashboard + lead form */
.card-block {
  border: 1px solid color-mix(in srgb, var(--fg) 14%, transparent);
  border-radius: .85rem; padding: 1.1rem; margin-block: 1.25rem;
}
.card-block h2 { margin-top: 0; font-size: 1.05rem; }
.share-figure { font-size: 2rem; font-weight: 700; margin: .25rem 0; color: var(--accent); }
.item-tally { list-style: none; padding: 0; margin: 0; }
.item-tally li { padding-block: .35rem; border-bottom: 1px solid color-mix(in srgb, var(--fg) 8%, transparent); }
.lead-form { max-width: 34rem; }
.lead-form textarea {
  width: 100%; padding: .7rem .75rem; font: inherit; font-size: 1rem;
  border: 1px solid color-mix(in srgb, var(--fg) 25%, transparent);
  border-radius: .5rem; background: #fff; color: var(--fg); resize: vertical;
}
.lead-form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
