/*
 * BMI Cruncher calculators: Health Cruncher's look on bmicruncher.com.
 * Tokens mirror the app (app/src/theme/colors.ts, brand #3BADD6). Everything is
 * scoped under .bmic so the WordPress theme's styles can't leak in or out.
 */
.bmic {
  --bmic-brand: #3BADD6;
  --bmic-brand-dark: #2593BC;
  --bmic-action: #36ACE2;      /* the site's existing button blue (owner's call, 2026-10-29) */
  --bmic-action-hover: #2593BC;
  --bmic-link: #1F7FA6;        /* text links stay darker so they read on white */
  --bmic-navy: #0B2A4F;
  --bmic-bg: #F2F2F7;
  --bmic-surface: #FFFFFF;
  --bmic-label: #1C1C1E;
  --bmic-label2: #3A3A3C;
  --bmic-label3: #6E6E73;
  --bmic-sep: #E5E5EA;
  --bmic-input: #F2F2F7;
  --bmic-red: #FF3B30;
  --bmic-green: #34C759;
  --bmic-radius: 16px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--bmic-label);
  max-width: 520px;
  margin: 24px auto;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
.bmic *, .bmic *::before, .bmic *::after { box-sizing: border-box; }

.bmic-card {
  background: var(--bmic-surface);
  border-radius: var(--bmic-radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
  padding: 22px;
  margin: 0 0 16px;
}

/* ---- form ---- */
.bmic-form { display: flex; flex-direction: column; gap: 16px; }
.bmic-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.bmic-field > label, .bmic-field > legend {
  display: block; font-size: 14px; font-weight: 600; color: var(--bmic-label2); margin: 0 0 6px; padding: 0;
}
.bmic-hint { font-weight: 400; color: var(--bmic-label3); }
.bmic-row { display: flex; gap: 10px; }
.bmic-row[hidden], .bmic-hip[hidden] { display: none; }
.bmic-row > * { flex: 1; }

.bmic-input-unit { position: relative; }
.bmic input[type="number"], .bmic input[type="text"], .bmic input[type="email"], .bmic input[type="password"], .bmic select {
  width: 100%; height: 50px; margin: 0;
  background: var(--bmic-input); border: 1.5px solid transparent; border-radius: 12px;
  padding: 0 14px; font: inherit; font-size: 17px; color: var(--bmic-label);
  -webkit-appearance: none; appearance: none; box-shadow: none;
}
.bmic select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238E8E93' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.bmic-input-unit input { padding-right: 56px; }
.bmic input::placeholder { color: #C7C7CC; opacity: 1; }
.bmic input:focus, .bmic select:focus { outline: none; border-color: var(--bmic-brand); background-color: #fff; }
.bmic input::-webkit-outer-spin-button, .bmic input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bmic input[type="number"] { -moz-appearance: textfield; }
.bmic-unit {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 15px; color: var(--bmic-label3); pointer-events: none;
}

/* segmented control (units, sex, goal) */
.bmic-seg { display: flex; background: var(--bmic-input); border-radius: 12px; padding: 3px; gap: 3px; }
.bmic-seg-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; margin: 0; border: 0; border-radius: 9px; background: transparent;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--bmic-label2); cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.bmic-seg-btn input { position: absolute; opacity: 0; pointer-events: none; }
/* Selected = filled with the action blue, so the choice reads at a glance (white-on-grey didn't). */
.bmic-seg-btn:not(.is-on) { color: #8E8E93; }
.bmic-seg-btn:not(.is-on):hover { color: var(--bmic-label); }
.bmic-seg-btn.is-on { background: var(--bmic-action); color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.bmic-seg-btn:focus-within { outline: 2px solid var(--bmic-brand); outline-offset: 1px; }

/* buttons */
.bmic-btn {
  display: flex; align-items: center; justify-content: center; width: 100%;
  min-height: 52px; padding: 0 20px; margin: 0; border: 0; border-radius: 14px;
  font: inherit; font-size: 17px; font-weight: 600; text-decoration: none !important; cursor: pointer;
  transition: background .15s, transform .05s;
}
.bmic-btn:active { transform: scale(.99); }
.bmic-btn-primary { background: var(--bmic-action); color: #fff !important; }
.bmic-btn-primary:hover { background: var(--bmic-action-hover); }
.bmic-btn-primary[disabled] { opacity: .6; cursor: default; }
.bmic-btn-secondary { background: #fff; color: var(--bmic-navy) !important; box-shadow: inset 0 0 0 2px var(--bmic-navy); }
.bmic-btn-secondary:hover { background: #F2F2F7; }
.bmic-btn + .bmic-btn { margin-top: 10px; }
.bmic-btn-ghost { background: var(--bmic-input); color: var(--bmic-label) !important; }
.bmic-actions { display: flex; gap: 10px; align-items: stretch; }
.bmic-actions .bmic-btn + .bmic-btn { margin-top: 0; } /* side by side, not stacked */
.bmic-actions .bmic-btn-ghost { flex: 0 0 34%; }

.bmic-error { margin: 0; color: var(--bmic-red); font-size: 15px; }
.bmic-error[hidden] { display: none; }
.bmic-error a { color: inherit; font-weight: 600; }

/* ---- results ---- */
.bmic-loading { display: flex; align-items: center; gap: 12px; color: var(--bmic-label3); }
.bmic-spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid var(--bmic-sep); border-top-color: var(--bmic-brand);
  animation: bmic-spin .8s linear infinite;
}
@keyframes bmic-spin { to { transform: rotate(360deg); } }

.bmic-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--bmic-label3); }

/* Result headers, matching the app's tool screens */
.bmic-hero { display: flex; flex-direction: column; align-items: center; text-align: center; border-radius: 20px; padding: 28px 20px; margin: 0 0 16px; }
.bmic-hero--gauge .bmic-gauge { display: block; max-width: 100%; height: auto; }
.bmic-hero--gauge .bmic-hero-value { font-size: 44px; font-weight: 800; line-height: 48px; margin-top: 6px; }
.bmic-hero-cat { font-size: 19px; font-weight: 700; margin-top: 2px; }
.bmic-hero--gauge .bmic-hero-sub { font-size: 15px; color: var(--bmic-label3); margin-top: 10px; }
.bmic-hero--gauge .bmic-band-legend { margin: 18px 0 0; gap: 8px 12px; font-size: 13px; }
.bmic-hero--accent { color: #fff; }
.bmic-hero--accent .bmic-hero-label { font-size: 15px; color: rgba(255, 255, 255, .85); margin-bottom: 4px; }
.bmic-hero--accent .bmic-hero-value { font-size: 56px; font-weight: 700; line-height: 64px; letter-spacing: -.01em; }
.bmic-hero--accent .bmic-hero-unit { font-size: 16px; font-weight: 600; }
.bmic-hero--accent .bmic-hero-sub { font-size: 14px; color: rgba(255, 255, 255, .85); margin-top: 6px; }
.bmic-needle { animation: bmic-sweep .9s cubic-bezier(.33, 1, .68, 1) both; }
@keyframes bmic-sweep { from { transform: rotate(var(--bmic-sweep)); } to { transform: rotate(0); } }
@media (prefers-reduced-motion: reduce) { .bmic-needle { animation: none; } }

.bmic-band { position: relative; display: flex; height: 10px; border-radius: 5px; overflow: visible; margin: 6px 0 10px; }
.bmic-band span:first-child { border-radius: 5px 0 0 5px; }
.bmic-band span:nth-last-child(2) { border-radius: 0 5px 5px 0; }
.bmic-band-marker {
  position: absolute; top: -5px; width: 4px; height: 20px; margin-left: -2px;
  background: var(--bmic-label); border-radius: 2px; box-shadow: 0 0 0 2px #fff;
}
.bmic-band-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; font-size: 12px; color: var(--bmic-label3); margin-bottom: 8px; }
.bmic-band-legend b { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }

.bmic-rows { border-top: 1px solid var(--bmic-sep); margin: 8px 0 4px; }
.bmic-row-item { display: flex; justify-content: space-between; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--bmic-sep); font-size: 16px; color: var(--bmic-label2); }
.bmic-row-value { font-weight: 600; color: var(--bmic-label); white-space: nowrap; }
.bmic-row-item.is-strong { color: var(--bmic-label); font-weight: 600; }
.bmic-row-item.is-strong .bmic-row-value { color: var(--bmic-brand-dark); }

.bmic-note { font-size: 14px; color: var(--bmic-label3); margin: 12px 0 0; }
.bmic-lead { font-size: 17px; margin: 0 0 14px; }
.bmic-disclaimer { font-size: 12px; color: var(--bmic-label3); margin: 14px 0 0; text-align: center; }

/* ---- CTA + onboarding ---- */
.bmic-cta { background: linear-gradient(160deg, #EAF7FC 0%, #FFFFFF 70%); border: 1px solid #D6EFF8; }
.bmic-cta .bmic-eyebrow { color: var(--bmic-brand-dark); }
.bmic-cta-title { font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin: 6px 0 8px; color: var(--bmic-label); }
.bmic-cta p { margin: 0 0 16px; color: var(--bmic-label2); }
.bmic-fine { font-size: 13px !important; color: var(--bmic-label3) !important; text-align: center; margin: 12px 0 0 !important; }
.bmic-fine a { color: inherit; text-decoration: underline; }

/* Colour test variants (see CTA_VARIANTS in bmic.js). "light" is the base card above. */
.bmic-cta--navy, .bmic-cta--blue { border: 0; color: #fff; }
.bmic-cta--navy { background: var(--bmic-navy); }
.bmic-cta--blue { background: #1F7FA6; }
.bmic-cta--navy .bmic-eyebrow, .bmic-cta--blue .bmic-eyebrow { color: #BFE6F4; }
.bmic-cta--navy .bmic-cta-title, .bmic-cta--blue .bmic-cta-title { color: #fff; }
.bmic-cta--navy p { color: #E3EEF7; }
.bmic-cta--blue p { color: #fff; }
.bmic-cta--navy .bmic-fine { color: #C9DCEB !important; }
.bmic-cta--blue .bmic-fine { color: #fff !important; }
.bmic-cta--navy .bmic-btn-primary { background: #3BADD6; color: #0B2A4F !important; }
.bmic-cta--blue .bmic-btn-primary { background: #fff; color: #0B2A4F !important; }

.bmic-progress { display: flex; gap: 6px; margin: 0 0 18px; }
.bmic-progress span { flex: 1; height: 4px; border-radius: 2px; background: var(--bmic-sep); }
.bmic-progress span.is-done { background: var(--bmic-brand); }
.bmic-onboard .bmic-cta-title { margin-top: 0; }
.bmic-turnstile:empty { display: none; }

.bmic-onboard.is-success { text-align: center; }
.bmic-check {
  width: 56px; height: 56px; margin: 4px auto 10px; border-radius: 50%;
  background: var(--bmic-green); color: #fff; font-size: 30px; font-weight: 700; line-height: 56px;
}

@media (max-width: 480px) {
  .bmic { margin: 12px auto; }
  .bmic-card { padding: 18px; border-radius: 14px; }
  .bmic-hero-value { font-size: 48px; }
}

/* "Run it again" link on results: kept for the click-N conversions, styled as a quiet link. */
.bmic-run-again-wrap { text-align: center; margin: 0 0 16px; }
/* "Run … again": a secondary button. It's #calculateButton with click-N classes, i.e. the
   2nd_button_click Google Ads conversion, so it should look clickable. */
.bmic-run-again.bmic-btn { display: inline-flex; width: auto; min-height: 46px; padding: 0 22px; font-size: 16px; }
.bmic-save-back { font-size: 15px; font-weight: 600; color: var(--bmic-link) !important; text-decoration: none !important; }

/* ---- copy carried over from the old results pages ---- */
.bmic-copy { font-size: 16px; line-height: 1.55; color: var(--bmic-label2); margin: 14px 0 0; }
.bmic-copy a, .bmic-promo a { color: var(--bmic-link); font-weight: 600; }
.bmic-h3 { font-size: 17px; font-weight: 700; margin: 22px 0 6px; color: var(--bmic-label); }
.bmic-promo { margin: 16px 0 0; padding: 14px 16px; border-radius: 14px; background: #F0F8FC; border: 1px solid #D6ECF6; }
.bmic-promo-text { margin: 0; font-size: 15px; line-height: 1.55; color: var(--bmic-label); }
.bmic-btn-inline { margin-top: 12px; }
.bmic-table-wrap { margin: 8px 0 4px; overflow-x: auto; }
.bmic .bmic-table { width: 100% !important; margin: 0 !important; border: 0 !important; border-collapse: collapse; font-size: 15px; font-family: inherit !important; }
.bmic .bmic-table th { background: none !important; color: var(--bmic-label3) !important; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; text-align: left; padding: 8px 4px !important; border: 0 !important; border-bottom: 1px solid var(--bmic-sep) !important; }
.bmic .bmic-table td { padding: 10px 4px !important; border: 0 !important; border-bottom: 1px solid var(--bmic-sep) !important; color: var(--bmic-label2); text-align: left; vertical-align: middle; }
.bmic .bmic-table td:last-child, .bmic .bmic-table th:last-child { text-align: right; }
.bmic .bmic-table tr.is-strong td { color: var(--bmic-label); font-weight: 600; }
.bmic .bmic-table tbody tr:nth-child(even) { background: none; }
.bmic-product { display: inline-flex; align-items: center; gap: 10px; color: var(--bmic-link); font-weight: 600; text-decoration: none; }
.bmic-product img { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: #fff; border: 1px solid var(--bmic-sep); }
.bmic-products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 8px 0 0; }
.bmic-products .bmic-product { flex-direction: column; text-align: center; font-size: 14px; padding: 12px 8px; border-radius: 14px; background: var(--bmic-input); }
.bmic-products .bmic-product img { width: 72px; height: 72px; }

/* inline results (calculators without a results page) and date calculators */
.bmic-inline-result:not(:empty) { margin-top: 16px; scroll-margin-top: 90px; }
.bmic-date { width: 100%; box-sizing: border-box; height: 48px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--bmic-input); color: var(--bmic-label); font: inherit; font-size: 17px; }
.bmic-meter { height: 10px; border-radius: 999px; background: var(--bmic-input); overflow: hidden; margin: 12px 0 4px; }
.bmic-meter span { display: block; height: 100%; border-radius: 999px; background: #FF2D55; }
.bmic-italic { font-style: italic; }

/* ---- graphics ---- */
.bmic-stack { display: flex; height: 14px; border-radius: 999px; overflow: hidden; margin: 10px 0 12px; background: var(--bmic-input); }
.bmic-stack > span { display: block; height: 100%; }
.bmic-stack--comp { height: 28px; }
.bmic-stack--comp em { display: block; color: #fff; font-size: 12px; font-weight: 700; font-style: normal; line-height: 28px; padding: 0 10px; white-space: nowrap; overflow: hidden; }
.bmic-macro-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bmic-macro-tile { padding: 12px 10px; border-radius: 12px; background: var(--bmic-input); text-align: center; }
.bmic-macro-tile b { display: block; width: 10px; height: 10px; border-radius: 99px; margin: 0 auto 6px; }
.bmic-macro-tile strong { display: block; font-size: 20px; font-weight: 800; color: var(--bmic-label); }
.bmic-macro-tile span { font-size: 13px; color: var(--bmic-label3); }
.bmic-zones { display: grid; gap: 8px; margin: 8px 0 4px; }
.bmic-zone { display: grid; gap: 4px; }
.bmic-zone-label { font-size: 13px; font-weight: 600; color: var(--bmic-label2); }
.bmic-zone-bar { display: flex; align-items: center; justify-content: flex-end; height: 30px; border-radius: 8px; padding: 0 10px; box-sizing: border-box; }
.bmic-zone-bar span { color: #fff; font-size: 13px; font-weight: 700; }
.bmic-range { margin: 4px 0 12px; }
.bmic-range-track { position: relative; height: 12px; border-radius: 999px; background: var(--bmic-input); }
.bmic-range-band { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: #A8E6B8; }
.bmic-range-band--inner { background: #1E9E46; min-width: 6px; }
.bmic-range-key--inner { background: #1E9E46 !important; }
.bmic-range-dot { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 99px; background: var(--bmic-navy); border: 3px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.bmic-range-labels { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; margin-top: 8px; font-size: 13px; color: var(--bmic-label3); }
.bmic-range-you { font-weight: 700; color: var(--bmic-navy); }

/* Slim "save" strip under the result's headline number; the full save card stays at the end. */
.bmic-save-strip {
  display: flex; align-items: center; gap: 12px; margin: 12px 0; padding: 12px 12px 12px 16px;
  background: var(--bmic-navy); color: #fff; border-radius: 14px;
}
.bmic-save-strip p { flex: 1; margin: 0; font-size: 15px; line-height: 1.35; color: #E3EEF7; }
.bmic-save-strip strong { color: #fff; }
.bmic-save-strip .bmic-btn { width: auto; flex: 0 0 auto; min-height: 42px; padding: 0 16px; font-size: 15px; background: #3BADD6; color: #0B2A4F !important; }
.bmic-save-strip .bmic-btn:hover { background: #5BC0E3; }
.bmic-range-labels span { display: inline-flex; align-items: center; gap: 6px; }
.bmic-range-key { display: inline-block; width: 12px; height: 8px; border-radius: 99px; background: #A8E6B8; }
.bmic-range-key--you { width: 10px; height: 10px; background: var(--bmic-navy); }

/* [bmic_save] signup page */
.bmic-save { max-width: 520px; margin: 0 auto; }
.bmic-save-recap { text-align: center; margin: 0 0 10px; }
.bmic-save-value { font-size: 52px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; color: var(--bmic-navy); margin-top: 6px; }
.bmic-save-value span { font-size: 20px; font-weight: 700; color: var(--bmic-label3); }
.bmic-save-label { font-size: 17px; font-weight: 600; color: var(--bmic-label2); margin-top: 2px; }
.bmic-save-lead { text-align: center; color: var(--bmic-label2); margin: 0 0 16px; }

/* BMR: two estimates side by side, then calories by activity as bars */
.bmic-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 8px; }
.bmic-method { background: var(--bmic-input); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.bmic-method span { font-size: 13px; font-weight: 600; color: var(--bmic-label2); }
.bmic-method strong { font-size: 24px; font-weight: 800; color: var(--bmic-label); line-height: 1.15; }
.bmic-method small { font-size: 12px; color: var(--bmic-label3); }
.bmic-acts { display: grid; gap: 4px; margin: 8px 0 16px; }
.bmic-act { padding: 10px 12px; border-radius: 12px; }
.bmic-act.is-me { background: #EAF6FB; box-shadow: inset 0 0 0 1.5px #BFE6F4; }
.bmic-act-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.bmic-act-name { font-size: 15px; font-weight: 600; color: var(--bmic-label); }
.bmic-act-name em { font-style: normal; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: #1F7FA6; border-radius: 99px; padding: 2px 7px; margin-left: 8px; vertical-align: 2px; }
.bmic-act-head strong { font-size: 16px; font-weight: 700; color: var(--bmic-label); white-space: nowrap; }
.bmic-act-bar { height: 8px; border-radius: 99px; background: var(--bmic-input); margin: 6px 0 4px; overflow: hidden; }
.bmic-act-bar span { display: block; height: 100%; border-radius: 99px; background: #9ED6EA; }
.bmic-act.is-me .bmic-act-bar span { background: #1F7FA6; }
.bmic-act-sub { font-size: 12.5px; color: var(--bmic-label3); }

/* Protein: targets by goal as tiles, the sample day as a food list with share-of-day bars */
.bmic-goals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 22px 0 10px; }
.bmic-goal { position: relative; background: var(--bmic-input); border-radius: 12px; padding: 14px 8px 12px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.bmic-goal strong { font-size: 22px; font-weight: 800; color: var(--bmic-label); }
.bmic-goal span { font-size: 13px; color: var(--bmic-label3); }
.bmic-goal.is-me { background: #EAF6FB; box-shadow: inset 0 0 0 1.5px #BFE6F4; }
.bmic-goal.is-me strong { color: #1F7FA6; }
.bmic-goal em { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-style: normal; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: #1F7FA6; border-radius: 99px; padding: 2px 8px; }
.bmic-foods { display: grid; gap: 10px; margin: 6px 0 10px; }
.bmic-food { display: flex; align-items: center; gap: 12px; }
.bmic-food-ic { flex: 0 0 40px; height: 40px; border-radius: 12px; background: var(--bmic-input); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.bmic-food-main { flex: 1; min-width: 0; }
.bmic-food-head { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--bmic-label3); }
.bmic-food-head b { color: var(--bmic-label); font-weight: 600; font-size: 15px; }
.bmic-food-head strong { color: var(--bmic-label); font-weight: 700; white-space: nowrap; }
.bmic-food-bar { height: 6px; border-radius: 99px; background: var(--bmic-input); margin-top: 6px; overflow: hidden; }
.bmic-food-bar span { display: block; height: 100%; border-radius: 99px; background: #FF2D55; opacity: .75; }
.bmic-food-total { display: flex; align-items: baseline; gap: 8px; padding: 12px 14px; border-radius: 12px; background: #FFF0F3; margin: 4px 0 8px; }
.bmic-food-total span { font-weight: 600; color: var(--bmic-label2); }
.bmic-food-total strong { font-size: 20px; font-weight: 800; color: var(--bmic-label); }
.bmic-food-total small { margin-left: auto; font-size: 13px; color: var(--bmic-label3); }
