.bah-calculator {
  max-width: 600px;
  margin: 20px auto;
  border: 1px solid #ccc;
  padding: 1rem;
  border-radius: 4px;
  background: #f9f9f9;
}

.bah-calculator h2 {
  margin-top: 0;
  text-align: center;
}

.form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.form-group label {
  /* Fixed width for desktop views */
  flex: 0 0 120px;
  font-weight: bold;
}

.form-group input[type="number"],
.form-group select {
  flex: 1 1 auto;
  padding: 0.5rem;
  margin-left: 0.5rem;
}

.dependents-group {
  display: flex;
  align-items: center;
  margin-left: 0.5rem;
}
.dependents-group label {
  margin-right: 1rem;
}

.error-message {
  display: block;
  margin-left: 0.5rem;
  color: red;
  font-size: 0.875rem;
}

#result {
  margin-top: 1rem;
  min-height: 50px;
  background: #ffffff;
  border: 1px solid #ddd;
  padding: 1rem;
}
button#calculateBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #465c6c;
  color: white;
  font-size: 1.25rem;
  font-weight: bold;
  padding: 1rem;
  border-radius: 0.25rem;
  text-decoration: none;
  margin-top: 1rem;
  transition: background-color 0.3s ease;
  width: calc(100%);
  box-sizing: border-box;
}
button#calculateBtn:hover {
  background-color: #a25338;
}
/* --------------------------------------
   MOBILE (under 600px)
   -------------------------------------- */
@media (max-width: 600px) {
  .form-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-group label {
    /* Remove the fixed width on mobile so it doesn't create a large gap */
    flex: 0 0 auto; 
    width: auto;
    margin-bottom: 0.5rem;
  }

  .form-group input[type="number"],
  .form-group select {
    margin-left: 0; 
    width: 100%; /* Make inputs full width for better usability on mobile */
  }
  .error-message {
    margin-left: 0; 
  }
}
}
