/* Eating Out Macro Picker — Train With Dave */
/* Refactored to use site design system (form-wrap/btn/css vars) */

/* ─── Chain chip multi-select — custom to this tool ──────────────────────── */
/* Matches site's .form-radio convention: light-red bg + red border when checked,
   so "selected" reads the same way as the goal/meals radio cards above. */
.mp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  cursor: pointer; user-select: none;
  background: var(--white);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .02em;
  transition: all var(--fast);
}
.mp-chip::before {
  content: "";
  width: 14px; height: 14px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  flex-shrink: 0;
  transition: all var(--fast);
}
.mp-chip:hover { border-color: var(--red); }
.mp-chip:has(input:checked) {
  background: rgba(216, 25, 32, .06);
  border-color: var(--red);
  color: var(--red);
}
.mp-chip:has(input:checked)::before {
  background: var(--red);
  border-color: var(--red);
  box-shadow: inset 0 0 0 3px var(--white);
}
.mp-chip input { display: none; }

/* ─── Output area ─────────────────────────────────────────────────────────── */
.macro-picker-output { margin-top: 2rem; padding: 1.5rem; border: 1.5px solid var(--line); border-radius: var(--radius-lg); background: var(--cream); }
.mp-daves-line { font-style: italic; color: var(--text-3); border-left: 3px solid var(--red); padding-left: 0.75rem; margin: 0 0 1.5rem; }
.mp-meals { display: grid; gap: 1rem; }
.mp-meal-card { padding: 1rem; background: var(--white); border-radius: var(--radius); border: 1.5px solid var(--line); }
.mp-meal-card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.mp-items { list-style: none; padding: 0; margin: 0 0 0.75rem; }
.mp-items li { padding: 0.4rem 0; border-bottom: 1px dashed var(--line); }
.mp-item-macros { display: block; font-size: 0.875rem; color: var(--text-3); margin-top: 0.25rem; }
.mp-meal-total { font-weight: 600; font-size: 0.95rem; padding-top: 0.5rem; border-top: 1.5px solid var(--line); }
.mp-day-total { margin-top: 1.5rem; padding: 1.25rem; background: var(--white); border-radius: var(--radius); border: 2px solid var(--black); }
.mp-day-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 0.75rem 0; }
.mp-day-stats > div { display: flex; flex-direction: column; }
.mp-stat-label { font-size: 0.75rem; text-transform: uppercase; color: var(--muted); }
.mp-stat-val { font-size: 1.5rem; font-weight: 700; }
.mp-stat-target { font-size: 0.75rem; color: var(--muted); }
.mp-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.mp-badge { padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.mp-badge-green { background: #d4f4d4; color: #1d6c1d; }
.mp-badge-yellow { background: #fff4cc; color: #806000; }
.mp-badge-red { background: #fdd; color: #8b1a1a; }
.mp-advisory { margin: 0.75rem 0 0; font-size: 0.9rem; color: var(--text-3); }

/* ─── CTA card ────────────────────────────────────────────────────────────── */
.macro-picker-cta { margin: 3rem 0; }
.mp-cta-card { padding: 2rem 1.5rem; background: var(--black); color: var(--white); border-radius: var(--radius-lg); text-align: center; }
.mp-cta-card h2 { color: var(--white); margin: 0 0 0.5rem; font-size: 1.75rem; }
.mp-cta-card p { color: rgba(255,255,255,.75); margin: 0 0 1rem; max-width: 580px; margin-left: auto; margin-right: auto; }
.mp-cta-secondary { font-size: 0.9rem; margin-top: 1rem; }
.mp-cta-secondary a { color: rgba(255,255,255,.75); text-decoration: underline; }

/* ─── Intro / lede ────────────────────────────────────────────────────────── */
.macro-picker-intro p { margin-bottom: 1.25rem; }
.macro-picker-intro h2 {
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  letter-spacing: -.02em;
}
.macro-picker-intro ul,
.macro-picker-intro ol {
  margin: 0 0 1.5rem 1.25rem;
  padding-left: 0;
}
.macro-picker-intro ul { list-style: disc; }
.macro-picker-intro ol { list-style: decimal; }
.macro-picker-intro li { margin-bottom: 0.6rem; line-height: 1.65; padding-left: 0.25rem; }
.macro-picker-intro li:last-child { margin-bottom: 0; }
.mp-lede {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 1.5rem;
}
.mp-cta-inline { font-weight: 700; margin-top: 2rem; color: var(--text); }

/* ─── FAQ ─────────────────────────────────────────────────────────────────── */
.macro-picker-faq { margin-top: 3rem; }
.macro-picker-faq h2 { margin-bottom: 1rem; }
.macro-picker-faq details {
  padding: 16px 20px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  background: var(--white);
  transition: all var(--fast);
}
.macro-picker-faq details[open] { border-color: var(--red); }
.macro-picker-faq summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .01em;
}
.macro-picker-faq details[open] summary { margin-bottom: 12px; color: var(--red); }
.macro-picker-faq p { margin: 0; line-height: 1.6; }

/* ─── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .mp-day-stats { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .mp-meal-card h3 { font-size: 1rem; }
  .mp-stat-val { font-size: 1.25rem; }
  .mp-cta-card { padding: 1.5rem 1rem; }
  .mp-cta-card h2 { font-size: 1.4rem; }
}
