/* 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"],
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);
    text-align: center;
}

.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 */
}