/* ─────────────────────────────────────────────────────────────
 * pension-analyzer.css — layout unique to Pension Analyzer
 * ─────────────────────────────────────────────────────────────
 * 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 and links inside table cells, the info button beside a
 * section title, and two grids with header rows (Retirement income
 * comparisons, Investment accounts) that scroll sideways on narrow
 * screens. Surface tokens only, so every theme works.
 * ───────────────────────────────────────────────────────────── */

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

/* A value with a small note beside it */
.pa-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 */
.pa-note:empty {
    display: none;
}

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

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

/* Info and remove buttons, as on Social Security */
.pa-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;
}

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

.pa-icon-btn:disabled {
    visibility: hidden;
}

/* A section title with an info button beside it, and the note it opens */
.pa-section-head {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.pa-info {
    margin: 0 0 var(--space-8);
}

/* ── The two grids ─────────────────────────────────────────── */

/* 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. */
.pa-grid-scroll {
    position: relative;
    overflow-x: auto;
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-12);
}

.pa-grid {
    border: none;
    border-radius: 0;
    overflow: visible;
}

.pa-comparison {
    min-width: 600px;
}

.pa-accounts {
    min-width: 760px;
}

/* Column headings, like the header rows on My Paycheck's tables */
.pa-grid 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);
}

.pa-grid th:first-child {
    text-align: left;
}

/* The accounts grid's headings are short: keep each on one line */
.pa-accounts th {
    white-space: nowrap;
}

/* "Future value" over the PLSO AUM and Pension AUM columns */
.pa-accounts .pa-th-group {
    text-align: center;
}

.pa-accounts thead tr:first-child th {
    padding-bottom: 0;
    border-bottom: none;
}

/* Inputs inside the grids */
.pa-grid .scenario-settings__input {
    width: 110px;
    text-align: right;
}

.pa-grid .pa-pair-name,
.pa-grid .pa-account-name {
    width: 160px;
    text-align: left;
}

.pa-grid .pa-account-interestPercent,
.pa-accounts [data-field="plsoYears"],
.pa-accounts [data-field="plsoInterestPercent"] {
    width: 80px;
}

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

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

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

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

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

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

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