/* =========================================================
   CREDITS
   Balance page, plus the price badge beside paid buttons everywhere.
========================================================= */

.credit-price {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 8px 2px 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text-2);
    font-size: 11.5px;
    line-height: 18px;
    white-space: nowrap;
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}

[hidden] + .credit-price { display: none; }
.credit-price svg { width: 13px; height: 13px; flex: none; color: var(--primary); }
.credit-price b { font-weight: 800; color: var(--text); }
.credit-price.is-free svg { display: none; }
.credit-price.is-compact { margin-left: 4px; padding: 0 6px 0 4px; font-size: 10.5px; line-height: 16px; }
.credit-price.is-compact svg { width: 11px; height: 11px; }

.credit-price.is-short { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.credit-price.is-short svg, .credit-price.is-short b { color: var(--danger); }
.credit-price-note { font-weight: 600; }
.credit-price-note::before { content: "\00b7\00a0"; }

.modal-footer .credit-price, .bk-modal-footer .credit-price { order: -1; margin: 0 auto 0 0; }

.is-credit-short { opacity: .55; cursor: not-allowed; }

.credit-card {
    max-width: 760px;
    margin-bottom: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.credit-head { margin: 0; font-size: 15px; font-weight: 800; color: var(--text); }
.credit-sub { margin: 3px 0 0; font-size: 12px; color: var(--text-2); }
.credit-unlimited { margin: 0; font-size: 28px; font-weight: 800; color: var(--primary-dark); }
.credit-none { margin: 10px 0 0; font-size: 12px; color: var(--text-2); }

.credit-rows, .credit-refusals { margin: 14px 0 0; padding: 0; list-style: none; }

.credit-row {
    display: grid;
    grid-template-columns: minmax(120px, 190px) 1fr minmax(110px, auto);
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    border-top: 1px solid var(--border);
    font-size: 12.5px;
}

.credit-row-name { font-weight: 700; color: var(--text); }
.credit-row-bar { height: 6px; border-radius: 999px; background: var(--surface-hover); overflow: hidden; }
.credit-row-bar span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.credit-row-num { text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }
.credit-row.is-empty .credit-row-num b { color: var(--danger); }

.credit-refusals li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--text-2);
}

.credit-refusals b { color: var(--text); text-transform: capitalize; }
.credit-refusals time { color: var(--text-3); white-space: nowrap; }

@media (max-width: 560px) {
    .credit-row { grid-template-columns: 1fr auto; }
    .credit-row-bar { grid-column: 1 / -1; order: 3; }
}
