/* Container */
.bmi-calculator {
  max-width: 600px;              /* wider background box */
  margin: 40px auto;
  padding: 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
  font-family: "Segoe UI", sans-serif;
  text-align: center;
  overflow: hidden;
  box-sizing: border-box;
}

/* Heading */
.bmi-calculator h1 {
  margin-bottom: 25px;
  font-size: 24px;
  color: #111;
}

/* Form bits */
.form-section {
  margin-bottom: 25px;
  text-align: left;
}
.form-section label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}
.row {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-bottom: 10px;
  box-sizing: border-box;
}
.row input[type="number"],
#weight {
  min-width: 50%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  max-width: 100%;
}
select.unit-select {
  width: 50%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
  background-color: #fff;
  color: #333;
  appearance: none;
  line-height: 1.5;
  height: auto;
}
select.unit-select:focus,
input:focus {
  border-color: #007bff;
}

/* Buttons */
.button-group {
  display: flex;
  gap: 8px;
  justify-content: left;
  flex-wrap: wrap;
  margin-top: 15px;
}
.button-group button {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}
.button-group .primary {
  background-color: #007bff;
  color: #fff;
  border: none;
}
.button-group .primary:hover {
  background-color: #0056b3;
}
.button-group .secondary {
  background-color: #fff;
  color: #333;
  border: 1px solid #ccc;
}
.button-group .secondary:hover {
  background-color: #f4f4f4;
}

/* Result bar */
.result-bar {
  margin-top: 20px;
  padding: 12px;
  background-color: #e8f2ff;
  border-left: 4px solid #007bff;
  color: #111;
  font-weight: 600;
  text-align: left;
  border-radius: 6px;
}

/* Mobile tweaks */
@media (max-width: 500px) {
  .row {
    flex-direction: column;
  }
  .button-group {
    flex-direction: row;
    align-items: left;
	flex-wrap: wrap;
  }
  .button-group button {
    width: auto;
  }
}
