/* ==========================================================================
   Vitaroxi — BMR Calculator  |  bmr.css
   Two-signal rule: green (#71b230) = fitness/calculators (this tool)
   ========================================================================== */

/* ── CSS Custom Properties ─────────────────────────────────────────────── */
.vxbmr {
  --vx-navy:      #000f2b;
  --vx-navy-3:    #0a1f3d;
  --vx-navy-4:    #112244;
  --vx-brand:     #71b230;
  --vx-alt-brand: #4d7d20;
  --vx-accent:    #e8750a;
  --vx-cream:     #f7f3ee;
  --vx-cream-2:   #eef0e8;
  --vx-extra:     #eaf4d5;
  --vx-text:      #2a3245;
  --vx-muted:     #5a6a4e;
  --vx-muted-d:   #b8c9a0;
  --vx-border-l:  #dde8cc;
  --vx-border-d:  #1e3a5f;
  --vx-err:       #dc2626;
  --vx-rc:        12px;
  --vx-ri:        8px;
}

/* ── Root container ─────────────────────────────────────────────────────── */
.vxbmr {
  display: block;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  background: transparent;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: var(--vx-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding: 2rem 0;
}

/* ── Element reset ──────────────────────────────────────────────────────── */
.vxbmr *,
.vxbmr *::before,
.vxbmr *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.vxbmr input,
.vxbmr button,
.vxbmr select,
.vxbmr textarea {
  font-family: inherit;
  font-size: inherit;
}

.vxbmr button {
  cursor: pointer;
}

.vxbmr table {
  border-collapse: collapse;
  width: 100%;
}

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.vxbmr__wrap {
  max-width: 660px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  width: 100%;
  overflow-x: hidden;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.vxbmr__hdr {
  background: var(--vx-navy);
  border-radius: 16px;
  padding: 1.6rem 1.8rem 1.5rem;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}

.vxbmr__hdr::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.vxbmr__brand {
  display: block;
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vx-brand);
  margin-bottom: 0.4rem;
}

.vxbmr__title {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  font-style: italic;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 0.3rem;
}

.vxbmr__sub {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--vx-muted-d);
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.vxbmr__card {
  background: #fff;
  border: 1.5px solid var(--vx-border-l);
  border-radius: var(--vx-rc);
  margin-bottom: 1.1rem;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 15, 43, 0.07);
}

.vxbmr__card--flush .vxbmr__bk-hdr {
  border-radius: var(--vx-rc) var(--vx-rc) 0 0;
}

.vxbmr__card-hdr {
  background: var(--vx-navy-3);
  border-radius: 12px 12px 0 0;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border-bottom: 1.5px solid var(--vx-border-d);
}

.vxbmr__step-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--vx-brand);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vxbmr__card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}

.vxbmr__card-body {
  padding: 1.25rem;
  background: var(--vx-cream);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── Fields ──────────────────────────────────────────────────────────────── */
.vxbmr__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.vxbmr__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--vx-muted);
  display: block;
}

.vxbmr__err {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--vx-err);
  display: none;
}

.vxbmr__err--vis {
  display: block;
}

/* ── Input + Unit ────────────────────────────────────────────────────────── */
.vxbmr__iu {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--vx-border-l);
  border-radius: var(--vx-ri);
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.vxbmr__iu:focus-within {
  border-color: var(--vx-navy);
  box-shadow: 0 0 0 3px rgba(0, 15, 43, 0.10);
}

.vxbmr__inp {
  flex: 1;
  width: 0;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.92rem;
  color: var(--vx-text);
  -moz-appearance: textfield;
}

.vxbmr__inp::-webkit-outer-spin-button,
.vxbmr__inp::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.vxbmr__inp::placeholder {
  color: rgba(90, 106, 78, 0.35);
}

.vxbmr__inp--center {
  text-align: center;
}

.vxbmr__utag {
  display: flex;
  align-items: center;
  padding: 0 0.65rem;
  background: var(--vx-cream-2);
  border-left: 1.5px solid var(--vx-border-l);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--vx-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Select ──────────────────────────────────────────────────────────────── */
.vxbmr__select {
  width: 100% !important;
  padding: 0.65rem 2.2rem 0.65rem 0.75rem !important;
  border: 1.5px solid var(--vx-border-l) !important;
  border-radius: var(--vx-ri) !important;
  background-color: #fff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a6a4e' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  font-size: 0.88rem !important;
  color: var(--vx-text) !important;
  cursor: pointer !important;
  outline: none !important;
  transition: border-color 0.15s, box-shadow 0.15s;
  display: block;
}

.vxbmr__select:focus {
  border-color: var(--vx-navy) !important;
  box-shadow: 0 0 0 3px rgba(0, 15, 43, 0.10) !important;
}

/* ── Weight Box ──────────────────────────────────────────────────────────── */
.vxbmr__wbox {
  border: 1.5px solid var(--vx-border-l);
  border-radius: var(--vx-ri);
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.vxbmr__wbox:focus-within {
  border-color: var(--vx-navy);
  box-shadow: 0 0 0 3px rgba(0, 15, 43, 0.10);
}

.vxbmr__wbox > .vxbmr__iu {
  border: none;
  border-radius: 0;
  box-shadow: none !important;
}

.vxbmr__wtoggle {
  display: flex;
  border-top: 1.5px solid var(--vx-border-l);
}

.vxbmr__wtbtn {
  flex: 1;
  padding: 0.42rem 0;
  background: transparent;
  border: none;
  border-right: 1.5px solid var(--vx-border-l);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--vx-text) !important;
  text-align: center;
  transition: background 0.12s, color 0.12s;
}

.vxbmr__wtbtn:last-child {
  border-right: none;
}

.vxbmr__wtbtn:hover:not(.vxbmr__wtbtn--active) {
  background: var(--vx-extra);
}

.vxbmr__wtbtn--active {
  background: var(--vx-navy) !important;
  color: #fff !important;
  font-weight: 600;
}

/* ── Height Box ──────────────────────────────────────────────────────────── */
.vxbmr__hbox {
  border: 1.5px solid var(--vx-border-l);
  border-radius: var(--vx-ri);
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.vxbmr__hbox:focus-within {
  border-color: var(--vx-navy);
  box-shadow: 0 0 0 3px rgba(0, 15, 43, 0.10);
}

.vxbmr__hbox > .vxbmr__iu {
  border: none;
  border-radius: 0;
  box-shadow: none !important;
}

.vxbmr__hbox-ftin {
  display: none;
  align-items: stretch;
  border-top: 1.5px solid var(--vx-border-l);
}

.vxbmr__hbox-ftin--active {
  display: flex;
}

.vxbmr__hbox-ftin .vxbmr__inp {
  padding: 0.55rem 0.6rem;
  font-size: 0.88rem;
}

.vxbmr__ftsep {
  display: flex;
  align-items: center;
  padding: 0 0.55rem;
  background: var(--vx-cream-2);
  border-left: 1.5px solid var(--vx-border-l);
  border-right: 1.5px solid var(--vx-border-l);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--vx-muted);
  flex-shrink: 0;
}

.vxbmr__ftsep--last {
  border-right: none;
}

.vxbmr__htoggle {
  display: flex;
  border-top: 1.5px solid var(--vx-border-l);
}

.vxbmr__htbtn {
  flex: 1;
  padding: 0.42rem 0;
  background: transparent;
  border: none;
  border-right: 1.5px solid var(--vx-border-l);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--vx-text) !important;
  text-align: center;
  transition: background 0.12s, color 0.12s;
}

.vxbmr__htbtn:last-child {
  border-right: none;
}

.vxbmr__htbtn:hover:not(.vxbmr__htbtn--active) {
  background: var(--vx-extra);
}

.vxbmr__htbtn--active {
  background: var(--vx-navy) !important;
  color: #fff !important;
  font-weight: 600;
}

/* ── 2-col grid ──────────────────────────────────────────────────────────── */
.vxbmr__g2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ── Gender ──────────────────────────────────────────────────────────────── */
.vxbmr__gender-row {
  display: flex;
  gap: 0.6rem;
}

.vxbmr__rbtn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--vx-border-l);
  border-radius: var(--vx-ri);
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--vx-text) !important;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
  user-select: none;
}

.vxbmr__rbtn:hover {
  border-color: var(--vx-navy);
}

.vxbmr__rbtn--sel {
  border-color: var(--vx-navy) !important;
  background: var(--vx-navy) !important;
  color: #fff !important;
  font-weight: 600;
}

.vxbmr__rdot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--vx-border-l);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.12s, background 0.12s;
}

.vxbmr__rbtn--sel .vxbmr__rdot {
  border-color: var(--vx-brand);
  background: var(--vx-brand);
}

.vxbmr__rbtn--sel .vxbmr__rdot::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
}

/* ── Calculate Button ────────────────────────────────────────────────────── */
.vxbmr__btn-calc {
  display: block;
  width: 100%;
  padding: 0.9rem 1rem;
  background: var(--vx-navy);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: background 0.15s;
}

.vxbmr__btn-calc:hover {
  background: var(--vx-navy-4);
}

.vxbmr__btn-calc:active {
  transform: scale(0.99);
}

/* ── Results ─────────────────────────────────────────────────────────────── */
.vxbmr__results {
  display: none;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  margin-top: 1.25rem;
}

.vxbmr__results--vis {
  opacity: 1;
  transform: translateY(0);
}

/* ── Result Hero ─────────────────────────────────────────────────────────── */
.vxbmr__result-hero {
  background: var(--vx-navy);
  border-radius: var(--vx-rc);
  padding: 1.6rem 1.5rem 1.4rem;
  text-align: center;
  margin-bottom: 1.1rem;
  position: relative;
  overflow: hidden;
}

.vxbmr__result-hero::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.vxbmr__hero-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vx-brand);
  margin-bottom: 0.5rem;
}

.vxbmr__hero-val {
  font-family: 'Poppins', sans-serif;
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
}

.vxbmr__hero-unit {
  font-size: 0.8rem;
  color: var(--vx-muted-d);
  margin-top: 0.35rem;
}

/* ── Breakdown Card ──────────────────────────────────────────────────────── */
.vxbmr__bk-hdr {
  background: var(--vx-navy);
  padding: 0.75rem 1.25rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
}

.vxbmr__bk-body {
  padding: 0.25rem 0 0.25rem;
  background: #fff;
}

.vxbmr__brow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 1.25rem;
  border-bottom: 1px solid var(--vx-cream-2);
}

.vxbmr__brow:last-child {
  border-bottom: none;
}

.vxbmr__brow:nth-child(even) {
  background: var(--vx-cream-2);
}

.vxbmr__brow--result {
  background: var(--vx-extra) !important;
}

.vxbmr__brow-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--vx-muted);
}

.vxbmr__brow-val {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--vx-text);
}

.vxbmr__brow-val--hi {
  font-size: 0.95rem;
  color: var(--vx-brand);
}

/* ── Section Title ───────────────────────────────────────────────────────── */
.vxbmr__sec-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--vx-text);
  margin-bottom: 0.65rem;
  margin-top: 1.1rem;
}

/* ── Formula Comparison Grid ─────────────────────────────────────────────── */
.vxbmr__cmp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.vxbmr__cmp-card {
  background: #fff;
  border: 1.5px solid var(--vx-border-l);
  border-radius: var(--vx-rc);
  padding: 0.9rem 0.75rem;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 15, 43, 0.07);
  transition: border-color 0.2s, background 0.2s;
}

/* Active formula card: navy bg per "Selected option cards" rule */
.vxbmr__cmp-card--active {
  background: var(--vx-navy);
  border-color: var(--vx-navy);
}

.vxbmr__cmp-name {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vx-muted);
  margin-bottom: 0.35rem;
}

.vxbmr__cmp-card--active .vxbmr__cmp-name {
  color: var(--vx-brand);
}

.vxbmr__cmp-val {
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--vx-text);
  letter-spacing: -0.02em;
}

.vxbmr__cmp-card--active .vxbmr__cmp-val {
  color: #fff;
}

.vxbmr__cmp-sub {
  font-size: 0.62rem;
  color: var(--vx-muted);
  margin-top: 0.15rem;
}

.vxbmr__cmp-card--active .vxbmr__cmp-sub {
  color: var(--vx-muted-d);
}

/* ── Educational Note ────────────────────────────────────────────────────── */
.vxbmr__edu {
  background: var(--vx-extra);
  border-left: 3px solid var(--vx-brand);
  border-radius: 0 9px 9px 0;
  padding: 0.85rem 1rem;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--vx-navy-3);
  margin-bottom: 1rem;
}

.vxbmr__edu strong {
  font-weight: 600;
  color: var(--vx-navy);
}

/* ── Download Buttons ────────────────────────────────────────────────────── */
.vxbmr__dl-row {
  display: flex;
  gap: 0.75rem;
}

.vxbmr__btn-pdf,
.vxbmr__btn-html {
  flex: 1;
  padding: 0.7rem 0.75rem;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.vxbmr__btn-pdf {
  background: var(--vx-navy);
  color: #fff;
  border: 1.5px solid var(--vx-navy);
}

.vxbmr__btn-pdf:hover {
  background: var(--vx-navy-4);
  border-color: var(--vx-navy-4);
}

.vxbmr__btn-html {
  background: transparent;
  color: var(--vx-text);
  border: 1.5px solid var(--vx-border-l);
}

.vxbmr__btn-html:hover {
  background: rgba(232, 117, 10, 0.07);
  border-color: var(--vx-accent);
  color: var(--vx-accent);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .vxbmr__cmp-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 440px) {
  .vxbmr__g2 {
    grid-template-columns: 1fr;
  }

  .vxbmr__dl-row {
    flex-direction: column;
  }
}

@media (max-width: 360px) {
  .vxbmr__wrap {
    padding: 1rem 0.75rem 2rem;
  }

  .vxbmr__hdr {
    padding: 1.2rem 1rem 1.1rem;
  }

  .vxbmr__title {
    font-size: 1.5rem;
  }

  .vxbmr__card-body {
    padding: 1rem;
  }
}
