.bike-emi-calculator-widget {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #999;
    border-radius: 8px;
    background-color: #eceff1;
}

.form-group {
    margin-bottom: 0; /* Reset to avoid overlap */
}

.form-group-separated {
    margin-bottom: 20px !important; /* Ensure visible spacing between fields */
}

.form-group-separated label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group-separated input,
.form-group-separated select {
    width: 100%;
    padding: 10px;
    border: 1px solid #999;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #fff;
}

.field-separator {
    border: 0;
    height: 1px;
    background: #999;
    margin: 20px 0; /* Vertical space above and below the separator */
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    background-color: #d32f2f;
    color: #fff;
    margin-top: 20px; /* Add space above the button */
    display: block; /* Ensure it behaves as a block element */
}

button:hover {
    background-color: #b71c1c;
}

#emi-result {
    margin-top: 30px;
    padding: 20px;
    border-radius: 4px;
    background-color: #eceff1;
}

#pie-chart-container,
#amort-chart-container {
    margin-top: 20px;
}

#amort-table-container {
    margin-top: 20px;
    overflow-x: auto; /* Enable horizontal scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on mobile */
    width: 100%;
}

#amort-table {
    width: 100%;
    min-width: 600px; /* Minimum width to ensure all columns are accessible */
    border-collapse: collapse;
    table-layout: fixed; /* Fixed layout for consistent column widths */
}

#amort-table th,
#amort-table td {
    padding: 10px;
    border: 1px solid #999;
    text-align: right;
    font-size: 14px;
    white-space: nowrap; /* Prevent text wrapping */
}

#amort-table th {
    text-align: left;
    background-color: #37474f;
    color: #fff;
}

#amort-table tbody tr {
    background-color: #fff;
}

#download-csv,
#download-pdf {
    margin-top: 10px;
    margin-right: 10px;
}

input:focus,
select:focus,
button:focus {
    outline: 2px solid #d32f2f;
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 600px) {
    .bike-emi-calculator-widget {
        padding: 10px;
    }

    #amort-table th,
    #amort-table td {
        font-size: 12px;
        padding: 8px;
    }

    button {
        padding: 10px 20px;
        font-size: 14px;
    }

    #amort-table-container {
        -ms-overflow-style: none; /* Hide scrollbar in IE and Edge */
        scrollbar-width: none; /* Hide scrollbar in Firefox */
    }

    #amort-table-container::-webkit-scrollbar {
        display: none; /* Hide scrollbar in Chrome, Safari, and Opera */
    }
}

@media (max-width: 400px) {
    .bike-emi-calculator-widget {
        padding: 5px;
        font-size: 12px;
    }

    .form-group-separated input,
    .form-group-separated select {
        font-size: 12px;
        padding: 6px;
    }

    #amort-table th,
    #amort-table td {
        font-size: 10px;
        padding: 6px;
    }

    button {
        font-size: 12px;
        padding: 8px 16px;
    }
}