/* Debt payoff calculator page (/debt-payoff-calculator/): the parts lq-ui.css and mortgage.css don't already have. */

.lq-pay-first {
    margin-top: 0;
}

/* One debt: name and remove button on top, balance, rate and minimum below. */
.lq-pay-debt {
    border: 1px solid var(--lq-line);
    border-radius: 14px;
    padding: 12px 14px 14px;
    margin-bottom: 12px;
    background: var(--lq-bg);
}

.lq-pay-debt-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.lq-pay-name {
    flex: 1;
    min-width: 0;
    border: 0;
    border-bottom: 1.5px dashed transparent;
    background: transparent;
    padding: 2px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--lq-ink);
    outline: 0;
}

    .lq-pay-name:hover,
    .lq-pay-name:focus {
        border-bottom-color: var(--lq-g600);
    }

.lq-pay-remove {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--lq-muted);
}

    .lq-pay-remove:hover {
        background: #fff;
        color: var(--lq-bad);
    }

.lq-pay-single .lq-pay-remove {
    visibility: hidden;
}

.lq-pay-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 10px;
}

.lq-pay-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    margin: 0;
}

    .lq-pay-cell > span:first-child {
        font-size: 13px;
        font-weight: 600;
        color: var(--lq-muted);
    }

    .lq-pay-cell .lq-in {
        height: 44px;
        padding: 0 10px;
    }

        .lq-pay-cell .lq-in input {
            font-size: 17px;
        }

.lq-pay-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    padding: 9px 16px;
    border: 1.5px dashed var(--lq-g600);
    border-radius: 12px;
    background: #fff;
    color: var(--lq-g700);
    font-weight: 600;
}

    .lq-pay-add:hover {
        background: var(--lq-g50);
    }

.lq-pay-method button {
    white-space: nowrap;
}

/* "In 2 years 4 months, paying $800 a month" under the date */
.lq-pay-delta {
    margin: 4px 0 0;
    font-size: 15px;
    color: #cfe3e1;
}

    .lq-pay-delta b {
        color: #fff;
    }

/* The verdict uses .lq-mtg-save; when the budget is just the minimums it's a plain note. */
.lq-pay-plain {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .2);
}

.lq-pay .lq-results-kv {
    margin-top: 14px;
}

.lq-mtg-busy .lq-pay-delta {
    opacity: .6;
    transition: opacity .2s;
}

.lq-mtg-stale .lq-pay-delta,
.lq-mtg-stale .lq-pay-verdict {
    opacity: .35;
}

/* Payoff order and the methods side by side */
.lq-pay-table-card {
    margin-top: 16px;
    padding: 14px 4px 6px;
}

.lq-pay-table-title {
    margin: 0 14px 4px;
    font-size: 17px;
    font-weight: 700;
    color: var(--lq-ink);
}

.lq-pay-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

    .lq-pay-table th,
    .lq-pay-table td {
        padding: 11px 14px;
        text-align: right;
        border-bottom: 1px solid var(--lq-line);
        white-space: nowrap;
    }

    .lq-pay-table thead th {
        font-size: 13px;
        font-weight: 600;
        color: var(--lq-muted);
    }

    .lq-pay-table tbody th {
        font-weight: 600;
        color: var(--lq-ink);
    }

    .lq-pay-table .lq-pay-left {
        text-align: left;
    }

    .lq-pay-table tbody tr:last-child th,
    .lq-pay-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .lq-pay-table tr.lq-pay-on th,
    .lq-pay-table tr.lq-pay-on td {
        background: var(--lq-g50);
    }

.lq-pay-tag {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--lq-g100);
    color: var(--lq-g800);
    font-size: 12px;
    font-weight: 600;
}

.lq-pay-never {
    color: var(--lq-bad);
    font-weight: 600;
}

@media (max-width: 575.98px) {
    .lq-pay-debt {
        padding: 10px 12px 12px;
    }

    .lq-pay-grid {
        grid-template-columns: 1fr 1fr;
    }

    .lq-pay-balance {
        grid-column: 1 / -1;
    }

    .lq-pay-method button {
        padding-left: 10px;
        padding-right: 10px;
    }

    .lq-pay-table {
        font-size: 14px;
    }

        .lq-pay-table th,
        .lq-pay-table td {
            padding: 10px 6px;
        }

        .lq-pay-table tbody th {
            white-space: normal;
        }

    /* Phones: the totals are in the results card already, so the tables keep the essentials. */
    .lq-pay-opt {
        display: none;
    }
}
