/* ==========================================================================
   ViaRx Health — BMI calculator section on the home page (index.html #bmi)
   Form · product image · BMI range. No weight-loss projections: the result panel
   shows the BMI range only, and the note says a licensed provider decides.
   ========================================================================== */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.bmi { padding: 110px 0 0; }

/* ---------- Shared bits ---------- */
.bx-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.bx-chip {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  padding: 7px 14px; border-radius: 999px; background: rgba(14, 34, 70, .05);
  font-size: 13.5px; font-weight: 500; color: var(--charcoal);
}
.bx-chip span { font-size: 12px; color: var(--coral); }
.bx-title { text-align: center; }
.bx-title--left { text-align: left; }
.bx-lede { margin: 16px auto 0; max-width: 520px; font-size: 16.5px; line-height: 1.55; color: var(--ink-70); }
.bx-lede--left { margin-left: 0; }
.bx-fine { max-width: 900px; margin: 28px auto 0; text-align: center; font-size: 12.5px; line-height: 1.6; color: var(--ink-55); }
.bx-fine--left { margin-left: 0; text-align: left; }

.bx-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 24px;
  border-radius: 999px; font-size: 15px; font-weight: 500; transition: background-color .3s, color .3s, transform .3s var(--ease-out);
}
.bx-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease-out); }
.bx-btn:hover svg { transform: translateX(3px); }
.bx-btn--dark { background: var(--charcoal); color: #fff; border: 0; cursor: pointer; }
.bx-btn--dark:hover { background: var(--coral-600); }
.bx-btn--glass { color: #fff; border: 1px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .08); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.bx-btn--glass:hover { background: #fff; color: var(--charcoal); }
.bx-btn--outline { color: var(--charcoal); border: 1px solid rgba(14, 34, 70, .2); }
.bx-btn--outline:hover { background: var(--charcoal); color: #fff; }


/* ==========================================================================
   BMI calculator: form · image · BMI range (no weight-loss projection)
   ========================================================================== */
.bmi__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.bmi__card { min-height: 460px; border-radius: 24px; background: #f6f8fb; border: 1px solid var(--line); }
.bmi__form { display: flex; flex-direction: column; padding: 30px; }
.bmi__label { font-size: 21px; font-weight: 500; color: var(--charcoal); }
.bmi__sub { margin-top: 4px; font-size: 14px; color: var(--ink-55); }
.bmi__value { margin: 18px 0 10px; font-family: var(--f-head); font-size: 76px; line-height: 1; letter-spacing: -.05em; color: var(--charcoal); font-variant-numeric: tabular-nums; }
.bmi__form fieldset { border: 0; padding: 0; margin: 0; }
.bmi__form legend, .bmi__wlabel { display: block; margin: 14px 0 8px; font-size: 13.5px; color: var(--ink-70); }
.bmi__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bx-field { position: relative; display: block; }
.bx-field input {
  width: 100%; height: 50px; padding: 0 44px 0 16px; border-radius: 12px; border: 1px solid rgba(14, 34, 70, .14); background: #fff;
  font: inherit; font-size: 15px; color: var(--charcoal); -moz-appearance: textfield;
}
.bx-field input::-webkit-outer-spin-button, .bx-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bx-field input:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 3px rgba(47, 108, 192, .14); }
.bx-field i { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 13px; color: var(--ink-55); }
.bmi__form .bx-btn { align-self: flex-start; margin-top: 22px; }

.bmi__media { overflow: hidden; }
.bmi__media img { width: 100%; height: 100%; object-fit: cover; }

.bmi__result { display: flex; flex-direction: column; padding: 30px; text-align: center; background: #fff; }
.bmi__rlabel { font-size: 14px; color: var(--ink-55); }
.bmi__cat { margin-top: 8px; font-family: var(--f-head); font-size: 34px; line-height: 1.1; letter-spacing: -.03em; color: var(--charcoal); transition: color .3s; }
.bmi__bars { display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; height: 110px; margin: 26px 0 12px; }
.bmi__bars i { flex: 1; border-radius: 3px; background: var(--bar, #c9d6e6); height: var(--h, 40%); transition: height .7s var(--ease-out), opacity .4s; opacity: .45; }
.bmi__bars i.is-on { opacity: 1; }
.bmi__scale { position: relative; height: 8px; border-radius: 999px; background: linear-gradient(90deg, #7fb3e6 0%, #53b3a8 26%, #9cc96b 42%, #f2c46b 62%, #ec8f6a 100%); }
.bmi__marker {
  position: absolute; top: 50%; left: var(--x, 0%); width: 20px; height: 20px; margin: -10px 0 0 -10px;
  border-radius: 50%; background: #fff; border: 2px solid var(--charcoal); box-shadow: 0 4px 12px rgba(14, 34, 70, .2);
  transition: left .8s var(--ease-out), opacity .3s; opacity: 0;
}
.bmi__marker.is-on { opacity: 1; }
.bmi__keys { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 10px; font-size: 11.5px; color: var(--ink-55); }
.bmi__note { margin-top: auto; padding-top: 18px; font-size: 13px; line-height: 1.55; color: var(--ink-70); }
.bmi__result .bx-btn { align-self: center; margin-top: 16px; height: 46px; }

@media (max-width: 1100px) {
  .bmi__grid { grid-template-columns: 1fr 1fr; }
  .bmi__media { display: none; }
}
@media (max-width: 760px) {
  .bmi { padding-top: 72px; }
  .bmi__grid { grid-template-columns: 1fr; }
  .bmi__card { min-height: 0; }
  .bmi__value { font-size: 60px; }
}
