/* amortization-schedule-calculator.css */

.calcufacil-container {
    /* ... existing styles ... */
    max-width: 900px; /* Example: ensure enough width for the table */
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.calcufacil-container h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
}

.calculator-form .instructions {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
}

/* NEW: Styling for the religious advisory message */
.religious-advisory {
    background-color: #fff3cd; /* Light yellow background */
    border: 1px solid #ffeeba; /* Yellow border */
    border-left: 5px solid #ffc107; /* Thicker left border for emphasis */
    border-radius: 5px;
    padding: 15px 20px;
    margin-bottom: 30px; /* Space between message and form */
    color: #856404; /* Dark yellow text */
    font-size: 0.95em;
    line-height: 1.5;
}

.religious-advisory p {
    margin: 0;
    padding: 0;
}

.religious-advisory p strong {
    color: #6a5300; /* Slightly darker bold text */
}

/* ... existing form and results styles ... */

.form-inline-group {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    gap: 20px; /* Space between input groups */
    justify-content: center;
    margin-bottom: 20px;
}

.input-group {
    flex: 1; /* Allows groups to take equal width */
    min-width: 250px; /* Minimum width before wrapping */
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 8px;
    font-weight: bold;
    color: #34495e;
}

.input-group input[type="number"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%; /* Ensure input takes full width of its group */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

button[type="submit"] {
    display: block;
    width: fit-content;
    margin: 20px auto 30px auto; /* Center button and add space below */
    padding: 12px 30px;
    background-color: #28a745; /* Green button */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #218838; /* Darker green on hover */
}

.results {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.results-header h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
}

.summary-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.summary-details span {
    flex: 1 1 auto; /* Allow flexible width, grow and shrink */
    min-width: 180px; /* Minimum width before wrapping */
    text-align: center;
    font-size: 1.1em;
    color: #34495e;
}

.summary-details span strong {
    display: block;
    font-size: 1.2em;
    color: #007bff; /* Blue for key figures */
    margin-top: 5px;
}

.summary-details span.highlight strong {
    color: #dc3545; /* Red for payment/total */
}

.summary-details span.highlight.interest strong {
    color: #ffc107; /* Orange for interest */
}

.amortization-table-container {
    overflow-x: auto; /* Enables horizontal scrolling on small screens */
    margin-top: 20px;
    max-height: 500px; /* Limit table height for long schedules */
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow-y: scroll; /* Add vertical scroll for table body */
}

.amortization-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* Ensures table doesn't get too narrow on small screens */
}

.amortization-table thead th {
    background-color: #f2f2f2;
    padding: 12px 15px;
    border-bottom: 2px solid #ddd;
    text-align: left;
    font-weight: bold;
    color: #333;
    position: sticky; /* Make header sticky */
    top: 0;
    z-index: 1; /* Ensure it stays above scrolling content */
}

.amortization-table tbody td {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    color: #555;
    white-space: nowrap; /* Prevent numbers from wrapping */
}

.amortization-table tbody tr:nth-child(even) {
    background-color: #fcfcfc;
}

.amortization-table tbody tr:hover {
    background-color: #e9f7ef; /* Light green hover effect */
}

.errors {
    background-color: #f8d7da; /* Light red background */
    color: #721c24; /* Dark red text */
    border: 1px solid #f5c6cb; /* Red border */
    border-radius: 5px;
    padding: 15px;
    margin-top: 20px;
    text-align: left;
}

.errors ul {
    margin: 0;
    padding-left: 20px;
}

.errors li {
    list-style-type: disc;
    margin-bottom: 5px;
}