body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  margin: 0;
  padding: 0;
}

.container {
  width: 100%;
  max-width: 80rem;
  margin: 50px auto;
  padding: 20px;
  background-color: white;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}


h1 {
  text-align: center;
}

p {
  text-align: left;
  margin-left: 2rem;
}

.input-group {
  margin-left: 0rem;
  margin-right: 1rem;
}

/* Style for the green text */
.green-text {
  color: green;
  font-weight: bold;
}
label {
  display: block;
  margin-bottom: 5px;
}

input {
  width: 100%;
  padding: 8px;
  font-size: 16px;
  margin-bottom: 10px;
}

button {
  margin-top: 1rem;
  width: 100%;
  padding: 1rem;
  font-size: 18px;
  background-color: #4CAF50;
  color: white;
  border: none;
  cursor: pointer;
}

button:hover {
  background-color: #45a049;
}

.result {
  text-align: left;
  margin: 2rem;
  font-size: 20px;
}

.result table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.result table th,
.result table td {
  border: 1px solid #ddd;
  background-color: white;
  padding: 12px;
  text-align: left;
}

.result table th {
  background-color: #f2f2f2;
  font-weight: bold;
}

/* Style for the green text */
.green-text {
  color: green;
  font-weight: bold;
}
/* Style for the blue text */
.blue-text {
  color: blue;
  font-weight: bold;
}

a {
  margin: 2rem;
}

.interest-rates {
  width: 30rem;
}

/* Flexbox container for input groups */
.input-group-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.input-group-row .input-group {
  flex: 1;
  min-width: 0; /* Prevents overflow */
  display: flex;
  flex-direction: column;
}

.input-group-row .input-group label {
  min-height: 2.5rem;
}

.input-group-row .input-group label,
.input-group-row .input-group input {
  display: flex;
  align-items: center;
  width: 100%;
}

.term-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.term-years-input {
  width: 2.25rem !important;
  min-width: 2.25rem;
  max-width: 2.25rem;
  height: 2rem;
  padding: 0.15rem;
  margin-bottom: 0;
  text-align: center;
  flex: 0 0 auto;
}

/* Ensure the form elements are responsive */
@media (max-width: 768px) {

  #payment-result {
    padding: 0rem;
  }
  .input-group-row {
    flex-direction: column;
  }
  /* For the first div inside the body */
  body > div:first-child {
    margin-left: 0px; /* Changed from original value */
    margin-right: 0px; /* Changed from -40px */
    box-sizing: border-box; /* Changed from content-box */
  }

  /* For the p element inside the body */
  body > p {
    margin-left: 1rem; /* Changed from 32px */
  }

  .result {
    text-align: left;
    margin: 0rem;
    font-size: 13px;
  }
  
}

