/*
 * ARBIMETRA styling for the Shahariar Financial Calculators plugin output.
 * Loaded only on pages where the plugin's own stylesheet is loaded. The plugin files are not
 * modified: only its documented CSS custom properties are mapped to ARBIMETRA tokens, plus a
 * few scoped overrides. Removing this file restores the plugin's original appearance.
 */
.sfc-dashboard {
	--sfc-ink: var(--wp--preset--color--ink);
	--sfc-muted: var(--wp--preset--color--muted);
	--sfc-line: var(--wp--preset--color--line);
	--sfc-blue: var(--wp--preset--color--blue);
	--sfc-pale: var(--wp--preset--color--paper);
	--sfc-white: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--inter);
}
.arb-calculator .sfc-dashboard,
.arb-calculator-dashboard .sfc-dashboard { max-width: 100%; }

/*
 * Layout stability: the plugin builds the calculator with JavaScript, so the page content below
 * it used to jump down once it loaded (Lighthouse CLS 0.11). Reserve space until the plugin marks
 * itself ready (it sets data-sfc-view). The heights are just below the smallest final height of
 * all 57 calculators (measured: 957 px at 390 px, 789 px at 768 px, 752 px at 1350 px), so the
 * content never moves up. Only when scripting is on: without JavaScript nothing is reserved.
 */
@media (scripting: enabled) {
	.arb-calculator .sfc-dashboard[data-sfc-single-calculator]:not([data-sfc-view]) { min-height: 720px; }
}
@media (scripting: enabled) and (max-width: 1023px) {
	.arb-calculator .sfc-dashboard[data-sfc-single-calculator]:not([data-sfc-view]) { min-height: 760px; }
}
@media (scripting: enabled) and (max-width: 599px) {
	.arb-calculator .sfc-dashboard[data-sfc-single-calculator]:not([data-sfc-view]) { min-height: 900px; }
}
.sfc-dashboard :where(button, .sfc-calculate-button):focus-visible,
.sfc-dashboard :where(a, input, select, textarea):focus-visible {
	outline: 3px solid var(--wp--preset--color--blue);
	outline-offset: 2px;
}

/*
 * Readability: the plugin sets 9–11px text in places. ARBIMETRA's minimum is 12px (WCAG-friendly
 * legibility). Scoped override only — no plugin file is changed.
 */
body .sfc-dashboard :is(
	.sfc-eyebrow, .sfc-card-foot, .sfc-calculator-number, .sfc-coming-soon, .sfc-status,
	.sfc-total-count span, .sfc-category-count, .sfc-category-state, .sfc-feature-category,
	.sfc-feature-description, .sfc-feature-action, .sfc-all-tools-actions a, .sfc-back-dashboard,
	.sfc-calculator-category, .sfc-open-calculator, .sfc-result-list dt, .sfc-result-note,
	.sfc-formula strong, .sfc-formula p, .sfc-result-label, .sfc-result-metric dt, .sfc-result-metric dd,
	.sfc-result-summary, .sfc-breakdown-row dt, .sfc-breakdown-row dd, .sfc-assumptions,
	.sfc-chart-tooltip, .sfc-chart-legend li, .sfc-story-concept, .sfc-schedule-disclosure > summary,
	.sfc-amortization-table, .sfc-optional-fields legend, .sfc-directory-category, .sfc-directory-description,
	.sfc-directory-action, .sfc-suggestion-category, .sfc-sort-control, .sfc-category-filter-control,
	.sfc-empty-results button, .sfc-view-navigation, .sfc-search-status, .sfc-report-actions > summary,
	.sfc-suggestion-description, .sfc-related-description, .sfc-report-action-buttons button,
	.sfc-report-privacy-note, .sfc-report-status
) {
	font-size: 0.75rem;
}
body .sfc-dashboard :is(.sfc-field label, .sfc-optional-fields legend) {
	font-size: 0.8125rem;
}
body .sfc-dashboard .sfc-view-navigation :is(a, span, li, button) { font-size: inherit; }
