/* ─────────────────────────────────────────────────────────────
 * retirement-blueprint.css — layout unique to Retirement Blueprint
 * ─────────────────────────────────────────────────────────────
 * The page uses the shared calculator shell (calculators.css:
 * calc, calc-section, calc-table) and the app's standard input
 * (scenario-settings__input), so it matches the other calculator
 * tabs. These rules only cover what those tabs don't have: inputs,
 * notes, links and an info button inside table cells, and the
 * Other Accounts grid, with a header row, inputs and a total, that
 * scrolls sideways on narrow screens. Surface tokens only, so
 * every theme works.
 * ───────────────────────────────────────────────────────────── */

/* Inline inputs: the standard input, sized for a value column */
.rb-table .scenario-settings__input {
    width: 120px;
    text-align: right;
}

/* A value with a small note (or an info button) beside it */
.rb-cell {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: var(--space-8);
}

/* A note with nothing to say takes no room */
.rb-note:empty {
    display: none;
}

/* "Add Employment", "+ Add an account": the same look as Social Security's text links */
.rb-link {
    padding: 0;
    border: none;
    background: none;
    font-family: inherit;
    font-weight: 500;
    color: var(--brand-primary);
    cursor: pointer;
}

.rb-link:hover,
.rb-link:focus-visible {
    text-decoration: underline;
}

/* The ⓘ beside the monthly savings and a typed account's remove button, as on Social Security */
.rb-icon-btn {
    display: inline-flex;
    padding: var(--space-4);
    border: none;
    border-radius: var(--radius-full);
    background: none;
    color: var(--surface-text-medium);
    cursor: pointer;
}

.rb-icon-btn:hover,
.rb-icon-btn:focus-visible {
    color: var(--brand-primary);
    background: var(--surface-row-hover);
}

/* The exact monthly savings, under its rounded row */
.rb-info-row td {
    padding: 0 var(--space-16) var(--space-12);
    text-align: right;
}

/* ── Other accounts ────────────────────────────────────────── */

/* The wrapper is the card and scrolls sideways when narrow. It's positioned so the
   visually hidden column headings stay inside it instead of widening the page. */
.rb-accounts-scroll {
    position: relative;
    overflow-x: auto;
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-12);
}

.rb-accounts {
    min-width: 680px;
    border: none;
    border-radius: 0;
    overflow: visible;
}

/* Column headings, like the header rows on My Paycheck's tables */
.rb-accounts th {
    padding: var(--space-8) var(--space-16);
    text-align: right;
    font-size: var(--content-small-size);
    font-weight: 600;
    color: var(--surface-text);
    background: var(--surface-sunken);
    border-bottom: 1px solid var(--surface-border);
    white-space: nowrap;
}

.rb-accounts th:first-child {
    text-align: left;
}

/* A typed account's inputs */
.rb-accounts .scenario-settings__input {
    width: 110px;
    text-align: right;
}

.rb-accounts .rb-account-name {
    width: 160px;
    text-align: left;
}

.rb-accounts .rb-account-interestPercent {
    width: 80px;
}

/* An Assets account: its box, its name, and what it adds or costs */
.rb-account-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
    cursor: pointer;
}

.rb-include {
    accent-color: var(--brand-primary);
}

.rb-account-note {
    display: block;
    margin-top: var(--space-4);
}

/* An account left out of the totals */
.rb-accounts tr.rb-excluded td {
    color: var(--surface-text-disabled);
}

/* The total row */
.rb-accounts-total td {
    font-weight: 600;
    border-top: 1px solid var(--surface-border);
}

.rb-accounts-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-16);
    margin-top: var(--space-8);
}

/* Headings Swift leaves blank; kept for screen readers */
.rb-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
