/* Debt Free Calculator Styles */
.dfc-calculator {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.debt-entry {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
    align-items: center;
}

.debt-field {
    flex: 1 1 150px;
    margin-right: 10px;
    margin-bottom: 10px;
}

.debt-field label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.debt-field input {
    width: 100%;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.remove-debt {
    background: #ff4d4d;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
}

#add-debt {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 15px;
}

.extra-payment-field {
    margin-bottom: 15px;
}

.extra-payment-field label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.extra-payment-field input {
    width: 100%;
    max-width: 150px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#dfc-form button[type="submit"] {
    background: #1E3FAB;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
}

.dfc-button-group {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

#dfc-settings,
#reset-form {
    background: #555;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
}

#dfc-results {
    margin-top: 20px;
}

.method-result {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.totals {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
}

.accordion-header {
    background: #1E3FAB;
    color: white;
    padding: 10px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.toggle-icon {
    margin-right: 10px;
    font-size: 18px;
}

.accordion-content {
    display: none;
    padding: 10px;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
}

.accordion-content.active {
    display: block;
}

.debt-result {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.debt-name {
    flex: 1;
}

.time,
.interest {
    flex: 1;
    text-align: right;
}

#next-steps {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#next-steps-content a {
    color: #1E3FAB;
    text-decoration: underline;
}

#dfc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

#dfc-settings-modal {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 20px;
    border-radius: 4px;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#dfc-settings-modal label {
    display: block;
    margin-bottom: 10px;
}

#dfc-settings-modal select,
#dfc-settings-modal input[type="checkbox"] {
    margin-left: 10px;
}

#dfc-save-settings {
    background: #1E3FAB;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
}

@media (max-width: 600px) {
    .debt-field {
        flex: 1 1 100%;
        margin-right: 0;
    }

    .debt-result {
        flex-direction: column;
        text-align: left;
    }

    .time,
    .interest {
        text-align: left;
    }
}

/* Ensure chart visibility */
.dfc-chart-section {
    margin-top: 20px;
    position: relative;
    width: 100%;
    min-height: 300px; /* Ensure space for the chart */
}

#payoffChart {
    display: block !important; /* Force visibility */
    width: 100% !important;
    max-width: 600px !important;
    height: 300px !important;
    margin: 0 auto;
}