/* BMI Calculator Page-Specific Styles (Header & Footer come from /style.css) */

#contentout,
.guide-block,
.bmi-tool-box {
  text-align: left;
  background-color: var(--bg-page, #f1f4f7);
}

#contentout {
  max-width: 1100px;
  margin: 12px auto 24px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
  box-sizing: border-box;
}

#content {
  min-width: 0;
}

#right {
  min-width: 0;
}

#breadcrumbs {
  font-size: 13px;
  margin-bottom: 8px;
}

#othercalc {
  border: 1px solid #336699;
  background: var(--bg-page, #f1f4f7);
}

#octitle {
  background-color: #336699;
  color: #ffffff;
  padding: 8px 10px;
  font-weight: bold;
}

#occontent {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bmi-tool-box {
  margin: 14px 0 20px;
  padding: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.bmi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.unit-switch {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 12px;
}

.unit-pill {
  border: 1px solid #044284;
  background: var(--bg-page, #f1f4f7);
  color: #003366;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}

.unit-pill.active {
  background: #003366;
  color: #ffffff;
}

.row-field {
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.row-field label,
.row-field > span {
  font-weight: bold;
  font-size: 15px;
}

.input-slot {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
}

.input-slot input {
  width: 100%;
  padding: 6px 86px 6px 8px;
  box-sizing: border-box;
  background-color: var(--bg-page, #f1f4f7);
  color: var(--text-main, #17202a);
  border: 1px solid var(--border-strong, #b8c4cf);
}

.slot-unit {
  position: absolute;
  right: 8px;
  font-size: 13px;
  color: #555555;
  pointer-events: none;
}

.pair-row {
  display: flex;
  gap: 8px;
}

.gender-options {
  display: flex;
  gap: 14px;
  align-items: center;
}

.inputErrMsg {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  padding: 6px 10px;
  margin-top: 8px;
  font-size: 14px;
}

.action-buttons {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-left: 86px;
}

.btn-submit {
  border: 0;
  color: #ffffff;
  padding: 9px 18px;
  font-size: 15px;
  font-weight: bold;
  background-color: #4c7b25;
  cursor: pointer;
}

.btn-submit:hover {
  background-color: #444444;
}

.btn-reset {
  border: 0;
  color: #ffffff;
  padding: 9px 14px;
  font-size: 15px;
  background: #888888;
  cursor: pointer;
}

.btn-reset:hover {
  background: #444444;
}

.bmi-result-col {
  text-align: left;
  padding: 12px;
  background: var(--bg-page, #f1f4f7);
  border: 1px solid #c3d9b4;
}

.bmi-result-col .h2result {
  background: #518428;
  color: #ffffff;
  padding: 6px 10px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 0;
  text-align: center;
}

.meter-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0;
}

.stat-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.stat-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid #cdddc0;
  font-size: 14px;
}

.stat-list li:last-child {
  border-bottom: none;
}

.guide-block {
  padding: 16px;
  border: 1px solid var(--border-soft, #d5dde4);
  border-radius: 8px;
}

.guide-block h2 {
  margin-top: 20px;
  color: #003366;
}

.guide-block h2:first-child {
  margin-top: 0;
}

.guide-block h3 {
  color: #003366;
  margin: 12px 0 4px;
}

.guide-block p,
.guide-block li {
  line-height: 1.55;
}

.cinfoT {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 16px;
  background-color: var(--bg-page, #f1f4f7);
}

.cinfoT th,
.cinfoT td {
  border: 1px solid #cbd5e1;
  padding: 7px 10px;
  text-align: left;
}

.cinfoT th {
  background: #336699;
  color: #ffffff;
}

.math-note {
  background: var(--bg-page, #f1f4f7);
  border: 1px solid var(--border-soft, #d5dde4);
  border-left: 4px solid #003366;
  padding: 10px 12px;
  margin: 10px 0 16px;
  line-height: 1.65;
}

.is-hidden {
  display: none !important;
}

/* Dark Mode Overrides */
body.dark-mode #contentout,
body.dark-mode .guide-block,
body.dark-mode .bmi-tool-box,
body.dark-mode #othercalc,
body.dark-mode .bmi-result-col,
body.dark-mode .cinfoT,
body.dark-mode .math-note {
  background-color: #162032;
  border-color: #334155;
  color: #f1f5f9;
}

body.dark-mode .guide-block h2,
body.dark-mode .guide-block h3 {
  color: #93c5fd;
}

body.dark-mode .input-slot input {
  background-color: #0f172a;
  color: #f8fafc;
  border-color: #475569;
}

@media (max-width: 820px) {
  #contentout {
    grid-template-columns: 1fr;
  }
}

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

  .action-buttons {
    padding-left: 0;
  }
}
