/* ==========================================================================
   Vitaroxi — One Rep Max Calculator  |  orm.css
   Two-signal rule: green (#71b230) = fitness tool (this tool)
   ========================================================================== */

.vxorm {
  --vx-navy:      #000f2b;
  --vx-navy-3:    #0a1f3d;
  --vx-navy-4:    #112244;
  --vx-brand:     #71b230;
  --vx-alt-brand: #4d7d20;
  --vx-teal:      #1d9e75;
  --vx-teal-p:    #e0f5ee;
  --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 ────────────────────────────────────────────────────────────────── */
.vxorm {
  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;
}

.vxorm *, .vxorm *::before, .vxorm *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}

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

.vxorm button { cursor: pointer; }

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

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

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

.vxorm__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;
}

.vxorm__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;
}

.vxorm__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;
}

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

/* ── Card ────────────────────────────────────────────────────────────────── */
.vxorm__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);
}

.vxorm__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);
}

.vxorm__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;
}

.vxorm__card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}

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

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

.vxorm__label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--vx-muted);
  display: block;
}

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

.vxorm__err--vis { display: block; }

.vxorm__hint {
  font-size: 0.62rem;
  color: var(--vx-muted);
  line-height: 1.5;
}

/* ── Input + Unit ────────────────────────────────────────────────────────── */
.vxorm__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;
}

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

.vxorm__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;
}

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

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

.vxorm__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;
}

/* ── Unit Bar (kg / lb) ──────────────────────────────────────────────────── */
.vxorm__unit-bar {
  display: flex;
  border: 1.5px solid var(--vx-border-l);
  border-radius: var(--vx-ri);
  overflow: hidden;
  background: var(--vx-cream-2);
}

.vxorm__ubt {
  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;
}

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

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

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

/* ── Formula Grid ────────────────────────────────────────────────────────── */
.vxorm__formula-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.vxorm__formula-opt {
  border: 1.5px solid var(--vx-border-l);
  border-radius: 10px;
  background: #fff;
  padding: 0.9rem 0.65rem;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}

.vxorm__formula-opt:hover:not(.vxorm__formula-opt--sel) {
  border-color: var(--vx-navy);
}

/* Selected: navy bg, green label text per "Selected option cards" rule */
.vxorm__formula-opt--sel {
  border-color: var(--vx-navy) !important;
  background: var(--vx-navy) !important;
}

.vxorm__fi {
  font-size: 1.1rem;
  line-height: 1;
}

.vxorm__fn {
  font-family: 'Poppins', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--vx-text);
  line-height: 1.2;
}

.vxorm__formula-opt--sel .vxorm__fn {
  color: var(--vx-brand); /* green label on navy bg */
}

.vxorm__fd {
  font-size: 0.58rem;
  color: var(--vx-muted);
  line-height: 1.3;
}

.vxorm__formula-opt--sel .vxorm__fd {
  color: var(--vx-muted-d);
}

.vxorm__fdef {
  font-size: 0.55rem;
  font-weight: 600;
  background: var(--vx-brand);
  color: #fff;
  border-radius: 4px;
  padding: 1px 5px;
  margin-top: 0.15rem;
  display: none;
}

.vxorm__formula-opt--sel .vxorm__fdef {
  display: inline-block;
}

/* ── Calculate Button (navy — fitness) ───────────────────────────────────── */
.vxorm__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;
}

.vxorm__btn-calc:hover { background: var(--vx-navy-4); }
.vxorm__btn-calc:active { transform: scale(0.99); }

/* ── Results ─────────────────────────────────────────────────────────────── */
.vxorm__results {
  display: none;
  margin-top: 1.25rem;
}

.vxorm__results--vis {
  display: block;
  animation: vxormSlideIn 0.3s ease;
}

@keyframes vxormSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.vxorm__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;
}

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

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

.vxorm__hero-note {
  font-size: 0.72rem;
  color: var(--vx-muted-d);
  margin-top: 0.5rem;
}

/* ── Chips ───────────────────────────────────────────────────────────────── */
.vxorm__chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.vxorm__chip {
  border: 1.5px solid var(--vx-border-l);
  border-radius: 10px;
  background: var(--vx-cream);
  padding: 0.75rem 0.5rem;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 15, 43, 0.07);
}

.vxorm__chip-label {
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--vx-muted);
  margin-bottom: 0.25rem;
}

.vxorm__chip-val {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--vx-text);
}

.vxorm__chip-val--sm {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
}

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

.vxorm__sec-sub {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.6rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--vx-muted);
}

/* ── Formula comparison ──────────────────────────────────────────────────── */
.vxorm__fcomp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin-bottom: 1rem;
}

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

.vxorm__fcomp-box--active {
  border-color: var(--vx-navy);
  background: var(--vx-navy);
}

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

.vxorm__fcomp-box--active .vxorm__fcomp-name {
  color: var(--vx-brand);
}

.vxorm__fcomp-val {
  font-family: 'Poppins', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--vx-text);
  line-height: 1.1;
}

.vxorm__fcomp-box--active .vxorm__fcomp-val {
  color: #fff;
}

.vxorm__fcomp-unit {
  font-size: 0.62rem;
  color: var(--vx-muted);
  margin-top: 0.1rem;
}

.vxorm__fcomp-box--active .vxorm__fcomp-unit {
  color: var(--vx-muted-d);
}

.vxorm__fcomp-badge {
  display: none;
  font-size: 0.52rem;
  font-weight: 600;
  background: var(--vx-brand);
  color: #fff;
  border-radius: 4px;
  padding: 1px 6px;
  margin-top: 0.3rem;
}

.vxorm__fcomp-box--active .vxorm__fcomp-badge {
  display: inline-block;
}

/* ── Divider ─────────────────────────────────────────────────────────────── */
.vxorm__divider {
  height: 1px;
  background: var(--vx-border-l);
  margin: 1rem 0;
}

/* ── Training load table ─────────────────────────────────────────────────── */
.vxorm__table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1.5px solid var(--vx-border-l);
  margin-bottom: 1rem;
  box-shadow: 0 2px 12px rgba(0, 15, 43, 0.07);
}

.vxorm__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  min-width: 300px;
}

.vxorm__table thead {
  background: var(--vx-navy);
}

.vxorm__table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vx-muted-d);
  white-space: nowrap;
  border-bottom: none;
}

.vxorm__table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--vx-cream-2);
  color: var(--vx-text);
  white-space: nowrap;
}

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

.vxorm__table tr:last-child td {
  border-bottom: none;
}

.vxorm__table td:first-child {
  font-family: 'Poppins', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--vx-brand);
}

.vxorm__table td.vxorm__td-zone {
  font-size: 0.62rem;
  color: var(--vx-muted);
}

.vxorm__table tr.vxorm__tr-highlight td {
  background: var(--vx-extra) !important;
}

/* ── Equation boxes ──────────────────────────────────────────────────────── */
.vxorm__eq-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.vxorm__eq-box {
  border: 1.5px solid var(--vx-border-l);
  border-radius: 10px;
  background: var(--vx-cream);
  padding: 0.85rem 1rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  transition: border-color 0.15s, background 0.15s;
}

.vxorm__eq-box--active {
  border-color: var(--vx-navy);
  background: var(--vx-navy);
}

.vxorm__eq-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.vxorm__eq-name {
  font-family: 'Poppins', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--vx-text);
  margin-bottom: 0.2rem;
}

.vxorm__eq-box--active .vxorm__eq-name {
  color: var(--vx-brand);
}

.vxorm__eq-formula {
  font-size: 0.68rem;
  color: var(--vx-muted);
  margin-bottom: 0.2rem;
  font-style: italic;
}

.vxorm__eq-box--active .vxorm__eq-formula {
  color: var(--vx-muted-d);
}

.vxorm__eq-desc {
  font-size: 0.65rem;
  color: var(--vx-muted);
  line-height: 1.55;
}

.vxorm__eq-box--active .vxorm__eq-desc {
  color: var(--vx-muted-d);
}

/* ── Educational Note ────────────────────────────────────────────────────── */
.vxorm__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.77rem;
  color: var(--vx-navy-3);
  line-height: 1.7;
  margin-bottom: 1rem;
}

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

/* ── Disclaimer ──────────────────────────────────────────────────────────── */
.vxorm__disclaimer {
  border: 1.5px solid rgba(220, 38, 38, 0.2);
  background: rgba(220, 38, 38, 0.04);
  border-radius: 9px;
  padding: 0.85rem 1rem;
  font-size: 0.72rem;
  color: var(--vx-muted);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.vxorm__disclaimer strong {
  color: var(--vx-text);
  font-weight: 600;
}

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

.vxorm__btn-pdf,
.vxorm__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;
}

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

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

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

.vxorm__btn-html:hover {
  background: var(--vx-extra);
  border-color: var(--vx-brand);
  color: var(--vx-alt-brand);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 440px) {
  .vxorm__chips { grid-template-columns: 1fr 1fr; }
  .vxorm__fcomp-grid { grid-template-columns: 1fr; }
  .vxorm__dl-row { flex-direction: column; }
}

@media (max-width: 380px) {
  .vxorm__formula-grid { grid-template-columns: 1fr 1fr; }
  .vxorm__chips { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 360px) {
  .vxorm__wrap { padding: 1rem 0.75rem 2rem; }
  .vxorm__hdr { padding: 1.2rem 1rem 1.1rem; }
  .vxorm__title { font-size: 1.5rem; }
  .vxorm__card-body { padding: 1rem; }
  .vxorm__formula-grid { grid-template-columns: 1fr; }
}
