/* Calculator Styling */
.calculator-wrapper {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
     margin: 0 auto; /* Center the calculator wrapper */
     max-width: 1000px; /* Limit the width of the calculator */
    text-align: center;
}

.calculator-wrapper h1 {
    margin-bottom: 20px;
    text-align: center;
    color: var(--primary-color);
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2); /* Add a subtle text shadow */
}

.calculator-wrapper p {
    margin-bottom: 20px;
    text-align: center;
}

/* Form Styling */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
}

label {
  font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

input[type="number"],
input[type="text"],
input[type="date"],
select {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: border-color 0.3s;
  width: 100%; /* Make input elements full width in their container */
    box-sizing: border-box; /* Include padding and border in elements' total width */
}

input[type="number"]:focus,
input[type="text"]:focus,
input[type="date"]:focus,
select:focus{
    outline: none;
   border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(52,152,219, 0.5);
}
/* Button Styling */
button {
    background-color: var(--primary-color);
    color: white;
   border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
   transition: background-color 0.3s;
    font-size: 1rem;
}

button:hover{
    background-color: var(--secondary-color)
}

/* Results Styling */
.results {
   margin: 20px 0;
    background-color: #f9f9f9;
    padding: 20px;
   border-radius: 8px;
    box-shadow: var(--box-shadow);
}
.results h2 {
   margin-bottom: 15px;
    color: var(--primary-color);
}

.result-item {
   margin-bottom: 10px;
  font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.result-item strong{
    margin-right: 10px;
}
.results-cards {
    display: flex;
  flex-wrap: wrap;
   justify-content: center;
    gap: 20px;
}

.result-card {
  background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
   flex-basis: calc(30% - 20px); /* create a 3 column layout */
    text-align: center;
}
/* Amortization Schedule Styles */
.amortization-schedule {
   overflow-x: auto;
    margin-top: 20px;
}

.amortization-schedule h3 {
   margin-bottom: 15px;
    color: var(--primary-color);
}
.table-container{
    width: 100%;
    overflow-x: auto;
   background-color: white;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
}
#amortization-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
#amortization-table th,
#amortization-table td {
   border: 1px solid var(--border-color);
   padding: 8px;
   text-align: left;
}
#amortization-table th {
    background-color: #f0f0f0;
   font-weight: bold;
}

#amortization-table tr:nth-child(even) {
   background-color: #f9f9f9; /* Light background for even rows */
}

/* BMI Scale Styles */
.bmi-scale {
   width: 100%;
    margin-top: 20px;
    height: 15px;
  background-image: linear-gradient(to right,
      hsl(0, 100%, 50%),
       hsl(0, 100%, 60%),
      hsl(40, 100%, 60%),
      hsl(80, 100%, 60%),
       hsl(120, 100%, 60%),
       hsl(120, 100%, 50%),
      hsl(40, 100%, 50%),
       hsl(0, 100%, 50%));
    border-radius: 5px;
   position: relative;
  margin-bottom: 10px;
}

.bmi-scale::before {
    content: "";
    position: absolute;
   top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color:  rgb(170, 170, 170);
    transform: translateY(-50%);
}
.bmi-scale .scale-bar {
    height: 15px;
    border: 1px solid transparent;
   border-radius: 5px;
}

.bmi-scale .scale-marker {
    position: absolute;
    top: 50%;
    left: var(--position); /* Use the custom css variable */
   width: 5px;
    height: 25px;
    background-color: black;
  transform: translateX(-50%) translateY(-50%);
}

/* Custom Styles */
.bmi-calculators-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
   gap: 20px;
}
.bmi-calculator-container{
    background-color: white;
  padding: 20px;
   border-radius: 8px;
   box-shadow: var(--box-shadow);
    flex: 1;
    min-width: 300px;
}
.calculator-wrapper ul {
    padding: 0;
    margin-left: 0px; /* Removes the left margin*/
    list-style: none;
   display: flex;
   flex-direction: column;
  align-items: center; /* Center items */
}

.calculator-wrapper li {
    text-align: center; /* Center text */
    margin-bottom: 10px;
}
.calculator-wrapper li::before{
   display: none;
}
/* Responsive Design */
@media (max-width: 768px) {
  .container {
      padding: 0 15px;
    }
    .menu-toggle {
        display: block;
   }

    .nav-links {
       display: none;
        flex-direction: column;
        text-align: center;
        width: 100%;
        background: white;
       position: absolute;
        top: 100%;
       left: 0;
        z-index: 10;
    }
    .nav-links.active {
      display: flex;
   }
    .nav-links li {
        margin: 0.5rem 0;
    }
    .nav-links a {
      padding: 10px;
      display: block;
   }
    .content-area {
        flex-direction: column;
       max-width: 100%;
       padding: 0 15px;
    }

    .content-area-right {
        width: 100%;
   }
    footer .container {
       flex-direction: column;
    }

    footer nav ul {
      flex-direction: column;
   }
  footer nav li{
        padding: 0px;
        margin: 10px 0;
    }
}
@media (max-width: 480px) {
  .calculator-wrapper h1 {
      font-size: 2rem;
    }

    .result-item {
      font-size: 1rem;
  }

     #amortization-table th,
      #amortization-table td {
         padding: 4px;
          font-size: 0.9rem;
     }
}