/* BrewCal Calories Calculator v2 — mobile-first, editorial (no emojis, no mascot) */
.brewcalc-v2 {
  --bc2-green: #006241;
  --bc2-green-dark: #004d33;
  --bc2-cream: #faf7f0;
  --bc2-gold: #c8952f;
  --bc2-ink: #1a1a1a;
  --bc2-muted: #6b6259;
  --bc2-line: #e8e0d2;
  --bc2-card: #ffffff;
  --bc2-radius: 1rem;
  --bc2-shadow: 0 6px 24px rgba(26, 26, 26, 0.08);
  --bc2-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-sizing: border-box;
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px;
  font-family: var(--bc2-font);
  color: var(--bc2-ink);
  background: var(--bc2-cream);
  border-radius: var(--bc2-radius);
}
.brewcalc-v2 *, .brewcalc-v2 *::before, .brewcalc-v2 *::after { box-sizing: border-box; }
.brewcalc-v2 button { font-family: inherit; cursor: pointer; }
.brewcalc-v2 input { font-family: inherit; }

/* ---------- header card ---------- */
.bc2-header {
  background: var(--bc2-green);
  color: #fff;
  border-radius: var(--bc2-radius);
  padding: 20px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--bc2-shadow);
  margin-bottom: 14px;
}
.bc2-header h2 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}
.bc2-header p { margin: 0; opacity: 0.85; font-size: 0.85rem; }
.bc2-counters { display: flex; gap: 12px; }
.bc2-counter {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.75rem;
  padding: 8px 14px;
  text-align: center;
  min-width: 96px;
}
.bc2-counter strong { display: block; font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.bc2-counter span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.8; }

/* ---------- goal ---------- */
.bc2-goal {
  background: var(--bc2-card);
  border: 1px solid var(--bc2-line);
  border-radius: var(--bc2-radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: var(--bc2-shadow);
}
.bc2-goal-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bc2-goal label { font-weight: 600; font-size: 0.9rem; }
.bc2-goal input {
  width: 110px; padding: 8px 10px;
  border: 1px solid var(--bc2-line); border-radius: 0.6rem; font-size: 1rem;
}
.bc2-btn {
  background: var(--bc2-green); color: #fff; border: 0;
  border-radius: 0.6rem; padding: 9px 16px; font-weight: 600; font-size: 0.9rem;
}
.bc2-btn:hover { background: var(--bc2-green-dark); }
.bc2-btn-ghost {
  background: transparent; color: var(--bc2-green);
  border: 1px solid var(--bc2-green);
}
.bc2-btn-gold { background: var(--bc2-gold); color: #1a1a1a; }
.bc2-btn-gold:hover { background: #b3852a; }
.bc2-progress {
  height: 10px; background: #eee5d3; border-radius: 999px;
  margin-top: 12px; overflow: hidden;
}
.bc2-progress > div {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--bc2-gold), var(--bc2-green));
  border-radius: 999px; transition: width 0.4s ease;
}
.bc2-goal-text { font-size: 0.82rem; color: var(--bc2-muted); margin-top: 6px; font-variant-numeric: tabular-nums; }

/* ---------- category cards ---------- */
.bc2-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
@media (min-width: 640px) { .bc2-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .bc2-cats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.bc2-cat {
  background: var(--bc2-card); border: 2px solid var(--bc2-line);
  border-radius: 0.85rem; padding: 12px 8px; text-align: center;
  font-weight: 600; font-size: 0.85rem; color: var(--bc2-ink);
}
.bc2-cat small { display: block; font-weight: 400; color: var(--bc2-muted); font-size: 0.75rem; margin-top: 2px; }
.bc2-cat[aria-pressed="true"] {
  border-color: var(--bc2-green); background: #eef5f0;
  box-shadow: inset 0 0 0 1px var(--bc2-green);
}

/* ---------- search ---------- */
.bc2-search { margin-bottom: 12px; }
.bc2-search input {
  width: 100%; padding: 12px 14px; font-size: 1rem;
  border: 1px solid var(--bc2-line); border-radius: 0.75rem; background: #fff;
}

/* ---------- drink list ---------- */
.bc2-list { display: flex; flex-direction: column; gap: 10px; }
.bc2-drink {
  background: var(--bc2-card); border: 1px solid var(--bc2-line);
  border-radius: var(--bc2-radius); box-shadow: var(--bc2-shadow);
  overflow: hidden;
}
.bc2-drink-head {
  width: 100%; background: none; border: 0; text-align: left;
  padding: 13px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.bc2-drink-name { font-weight: 700; font-size: 0.98rem; flex: 1 1 140px; }
.bc2-tag {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  background: #eee5d3; color: var(--bc2-muted); border-radius: 999px; padding: 3px 9px;
}
.bc2-badge {
  font-size: 0.8rem; font-weight: 800; border-radius: 999px; padding: 4px 11px;
  color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.bc2-badge.low { background: #2e7d4f; }
.bc2-badge.mid { background: #c8952f; }
.bc2-badge.high { background: #b3402e; }
.bc2-chips { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
.bc2-chip {
  font-size: 0.72rem; background: #f3ecdd; color: var(--bc2-muted);
  border-radius: 999px; padding: 3px 9px; font-variant-numeric: tabular-nums;
}
.bc2-chip.caf { background: #e7ecf3; color: #3d4c63; }

/* ---------- expanded customization ---------- */
.bc2-custom { border-top: 1px dashed var(--bc2-line); padding: 14px; background: #fffdf8; }
.bc2-opt-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--bc2-muted); margin: 12px 0 7px; }
.bc2-opt-label:first-child { margin-top: 0; }
.bc2-btnrow { display: flex; flex-wrap: wrap; gap: 8px; }
.bc2-pill {
  border: 1.5px solid var(--bc2-line); background: #fff; border-radius: 999px;
  padding: 8px 12px; font-size: 0.85rem; font-weight: 600; color: var(--bc2-ink);
}
.bc2-pill small { display: block; font-weight: 400; color: var(--bc2-muted); font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.bc2-pill[aria-pressed="true"] { border-color: var(--bc2-green); background: #eef5f0; color: var(--bc2-green-dark); }
.bc2-stepper { display: inline-flex; align-items: center; gap: 10px; }
.bc2-stepper button {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--bc2-green); background: #fff; color: var(--bc2-green);
  font-size: 1.25rem; font-weight: 700; line-height: 1;
}
.bc2-stepper output { font-size: 1.1rem; font-weight: 700; min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }
.bc2-stepper-note { font-size: 0.78rem; color: var(--bc2-muted); margin-left: 4px; }
.bc2-toggle { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.9rem; }
.bc2-toggle input { width: 20px; height: 20px; accent-color: var(--bc2-green); }

/* ---------- results ---------- */
.bc2-results { margin-top: 14px; border-top: 1px dashed var(--bc2-line); padding-top: 14px; }
.bc2-bigcal { text-align: center; margin-bottom: 12px; }
.bc2-bigcal strong { display: block; font-size: 3rem; line-height: 1; color: var(--bc2-green); font-variant-numeric: tabular-nums; }
.bc2-bigcal span { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--bc2-muted); }
.bc2-fda {
  border: 2px solid var(--bc2-ink); border-radius: 0.5rem; padding: 10px 12px;
  background: #fff; font-size: 0.85rem; margin-bottom: 12px;
}
.bc2-fda h4 { margin: 0 0 2px; font-size: 1.05rem; }
.bc2-fda .bc2-fda-sub { font-size: 0.75rem; color: var(--bc2-muted); border-bottom: 1px solid var(--bc2-ink); padding-bottom: 6px; margin-bottom: 6px; }
.bc2-fda table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.bc2-fda td { padding: 4px 0; border-bottom: 1px solid #eee; }
.bc2-fda td:last-child { text-align: right; color: var(--bc2-muted); }
.bc2-fda td:first-child { font-weight: 600; }
.bc2-cafbox {
  background: #eef5f0; border: 1px solid var(--bc2-green); border-radius: 0.75rem;
  padding: 10px 14px; font-size: 0.88rem; margin-bottom: 12px;
}
.bc2-cafbox strong { color: var(--bc2-green-dark); }
/* swap pills */
.bc2-swaps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.bc2-swap {
  background: #fff8e8; border: 1.5px dashed var(--bc2-gold); color: #7a5c14;
  border-radius: 999px; padding: 8px 13px; font-size: 0.82rem; font-weight: 600;
}
.bc2-swap:hover { background: #fdf0d3; }
.bc2-addrow { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- order panel ---------- */
.bc2-order {
  background: var(--bc2-card); border: 1px solid var(--bc2-line);
  border-radius: var(--bc2-radius); box-shadow: var(--bc2-shadow);
  padding: 18px 16px; margin-top: 16px;
}
.bc2-order h3 { margin: 0 0 12px; font-size: 1.05rem; }
.bc2-order-top { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.bc2-donut { position: relative; width: 132px; height: 132px; flex: 0 0 auto; }
.bc2-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.bc2-donut-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}
.bc2-donut-center strong { font-size: 1.35rem; color: var(--bc2-green); font-variant-numeric: tabular-nums; }
.bc2-donut-center span { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--bc2-muted); }
.bc2-macros { flex: 1 1 180px; display: flex; flex-direction: column; gap: 8px; }
.bc2-macro { font-size: 0.8rem; }
.bc2-macro .bc2-macro-top { display: flex; justify-content: space-between; margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.bc2-macro .bc2-bar { height: 8px; background: #f0e9d8; border-radius: 999px; overflow: hidden; }
.bc2-macro .bc2-bar > div { height: 100%; background: var(--bc2-gold); border-radius: 999px; transition: width 0.4s ease; }
.bc2-items { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bc2-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 1px solid var(--bc2-line); border-radius: 0.7rem; padding: 9px 12px; font-size: 0.86rem;
}
.bc2-item .bc2-item-name { flex: 1 1 160px; font-weight: 600; }
.bc2-item .bc2-item-cal { font-variant-numeric: tabular-nums; color: var(--bc2-muted); }
.bc2-item button {
  background: none; border: 1px solid var(--bc2-line); border-radius: 999px;
  padding: 4px 11px; font-size: 0.75rem; color: #a33;
}
.bc2-order-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.bc2-empty { color: var(--bc2-muted); font-size: 0.88rem; }

/* ---------- states ---------- */
.bc2-loading, .bc2-error { padding: 30px 16px; text-align: center; color: var(--bc2-muted); }
.bc2-error { color: #a33; }
.bc2-notice { font-size: 0.78rem; color: var(--bc2-muted); margin-top: 10px; }
.bc2-copied { font-size: 0.82rem; color: var(--bc2-green); font-weight: 700; margin-left: 6px; }
