dev1/src/components/LoanRepayment.css

195 lines
4.4 KiB
CSS

.loan-repayment-container {
width: 100%;
max-width: 500px; /* Adjust as needed */
margin: auto;
padding: 20px;
}
.loan-repayment-container form {
display: flex;
flex-direction: column;
gap: 10px;
align-items: start;
}
.loan-repayment-container .input-group {
display: flex;
align-items: center; /* Ensures labels and inputs are aligned */
justify-content: space-between;
width: 100%;
}
.loan-repayment-container label {
font-weight: bold;
width: 40%; /* Consistent width for labels */
text-align: left;
}
.loan-repayment-container input,
.loan-repayment-container select {
width: 58%; /* Consistent width for inputs */
padding: 8px;
font-size: 16px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
margin-bottom: 10px;
}
.loan-repayment-container .calculate-button-container {
display: flex;
justify-content: center;
width: 100%;
margin-top: 10px;
}
.loan-repayment-container button {
width: 100%;
max-width: 300px;
padding: 10px;
background-color: green;
color: white;
border: none;
cursor: pointer;
border-radius: 4px;
font-size: 16px;
text-align: center;
}
.loan-repayment-container button:hover {
background-color: green;
}
.loan-repayment-fields label {
display: block;
margin-bottom: 10px;
font-weight: bold;
font-size: 1rem;
}
.loan-repayment-fields input,
.loan-repayment-fields select {
height: 40px; /* Set a consistent height */
padding: 0 10px; /* Add horizontal padding */
font-size: 1rem; /* Consistent font size */
width: 100%; /* Make inputs span full width */
box-sizing: border-box; /* Include padding in total width */
margin-bottom: 15px; /* Space between fields */
border: 1px solid #ccc; /* Light border for all fields */
border-radius: 8px; /* Rounded corners */
}
.loan-repayment-fields button {
width: 100%; /* Full width for button */
padding: 12px;
height: 45px;
margin-top: 10px;
background-color: #4CAF50;
color: white;
border: none;
text-align: center;
font-size: 1.1rem;
display: flex;
justify-content: center; /* Horizontally center text */
align-items: center; /* Vertically center text */
cursor: pointer;
border-radius: 8px;
transition: background-color 0.3s;
}
.loan-repayment-fields button:hover {
background-color: #45a049;
}
/* Make the container for the fields more clean */
.loan-repayment-fields {
max-width: 600px;
margin: 0 auto; /* Center the form */
padding: 20px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* Optional: Adjust margins for form fields */
.loan-repayment-fields input,
.loan-repayment-fields select,
.loan-repayment-fields button {
margin-top: 5px;
margin-bottom: 10px;
}
/* Ensure the heading of the Loan Repayment Analysis is centered */
.loan-repayment-fields h3 {
text-align: center;
margin-bottom: 20px;
}
button {
background-color: #4CAF50;
color: white;
border: none;
cursor: pointer;
text-align: right; /* Centers the button text */
}
button:disabled {
background-color: #ccc;
}
.results-container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Limit the column size to a minimum of 280px */
gap: 20px;
margin-top: 20px;
width: 100%;
max-width: 1200px; /* Limit the maximum width of the grid */
margin: 0 auto; /* Center the grid horizontally */
}
.results-container h3 {
grid-column: span 3; /* Ensure the header spans across the entire grid */
text-align: center; /* Align the text to the center */
margin-bottom: 20px;
}
.school-result-card {
border: 1px solid #ddd;
padding: 15px;
background-color: #f9f9f9;
border-radius: 8px;
display: grid;
flex-direction: column;
text-align: left;
}
.school-result-card h4 {
font-size: 1.2rem;
text-align: center;
font-weight: bold;
}
.school-result-card p {
font-size: 1rem;
margin-bottom: 10px;
}
.school-result-card .net-gain.positive {
color: #2ecc71; /* Green color for positive values */
}
.school-result-card .net-gain.negative {
color: #e74c3c; /* Red color for negative values */
}
.error-message {
color: red;
font-weight: bold;
margin-top: 15px;
}
.error {
color: red;
margin-top: 10px;
}