/* Medicare Premiums (IRMAA) calculator. Cards, tiles, tables and callouts come from the shared rc- styles in RothConversion.css. */

/* Five result tabs on one row beside both side panels. */
.irmaa-page .workspaceView .workspace-view-shell .tab-button {
    min-width: 4.75rem;
}

/* ---------------------------------------------------------------- The income bar over the tiers */

.irmaa-stack {
    position: relative;
    margin: 0.35rem 0 1.6rem;
    padding: 0;
}

.irmaa-zones {
    position: relative;
    height: 22px;
}

.irmaa-zone {
    position: absolute;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: #6b7a8f;
    white-space: nowrap;
    overflow: hidden;
}

.irmaa-zone span {
    padding: 0 0.3rem;
}

.irmaa-zone--current {
    color: #0b3a66;
    background: #eaf3fc;
    border-radius: 6px 6px 0 0;
}

.irmaa-bar {
    position: relative;
    height: 26px;
    background: #f3f5f8;
    border-radius: 0 4px 4px 0;
}

.irmaa-seg {
    position: absolute;
    top: 0;
    bottom: 0;
    min-width: 1px;
}

.irmaa-seg:last-of-type {
    border-radius: 0 4px 4px 0;
}

.irmaa-line {
    position: absolute;
    top: 0;
    height: 48px;
    width: 1px;
    margin-left: -1px;
    background: #8a97a8;
}

.irmaa-tick {
    position: absolute;
    top: 52px;
    transform: translateX(-50%);
    font-size: 0.72rem;
    color: #5c6d82;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* The legend doubles as the table of the bar: each source with its amount, and the total. */
.irmaa-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.15rem 1.5rem;
    margin: 0 0 0.4rem;
    font-size: 0.8125rem;
    color: #3d4a5c;
}

.irmaa-legend-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.12rem 0;
    border-bottom: 1px solid #eef1f5;
}

.irmaa-legend-label {
    flex: 1 1 auto;
    min-width: 0;
}

.irmaa-legend-value {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.irmaa-legend-total {
    grid-column: 1 / -1;
    max-width: 360px;
    font-weight: 700;
    color: #181c32;
    border-bottom: none;
}

.irmaa-swatch {
    display: inline-block;
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 0.4rem;
    vertical-align: -1px;
}

.irmaa-legend .irmaa-swatch {
    margin-right: 0;
}

.irmaa-swatch--none {
    background: transparent;
}

/* ---------------------------------------------------------------- Tables */

.irmaa-table td,
.irmaa-table th {
    vertical-align: middle;
}

.irmaa-tag {
    display: inline-block;
    margin-left: 0.45rem;
    padding: 0 0.4rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.5;
    color: #0b3a66;
    background: #e3eefb;
    border-radius: 999px;
    white-space: nowrap;
}

.irmaa-table tr.irmaa-row-muted > td {
    color: #6b7a8f;
}

/* Tables with few columns keep their figures near their labels instead of stretching across the card. */
.rc-table.irmaa-table--fit {
    width: auto;
    min-width: min(100%, 640px);
}

.rc-table.irmaa-table--fit td:not(:first-child),
.rc-table.irmaa-table--fit th:not(:first-child) {
    padding-left: 1.1rem;
}

.irmaa-rates-table td:first-child {
    font-weight: 600;
}

/* ---------------------------------------------------------------- Charts (SVG) */

.irmaa-chart {
    display: block;
    width: 100%;
    max-width: 860px;
    height: auto;
    margin: 0.2rem 0 0.6rem;
}

.irmaa-grid {
    stroke: #e6e9ee;
    stroke-width: 1;
}

.irmaa-axis-text {
    font-size: 11px;
    fill: #5c6d82;
    font-variant-numeric: tabular-nums;
}

.irmaa-axis-text--strong {
    font-weight: 700;
    fill: #181c32;
}

.irmaa-step {
    fill: none;
    stroke: #2a78d6;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.irmaa-step-dot {
    fill: #2a78d6;
    stroke: #fff;
    stroke-width: 2;
}

.irmaa-step-label {
    font-size: 11px;
    font-weight: 600;
    fill: #3d4a5c;
}

.irmaa-entered-line {
    stroke: #5c6d82;
    stroke-width: 1;
}

.irmaa-sources li {
    font-size: 0.75rem;
}
