/* Main calculator layout and theme variables supplied by the shortcode renderer. */
.ifc-calculator {
	--ifc-purple: var(--ifc-primary, #2e004b);
	--ifc-magenta: var(--ifc-accent, #a33291);
	--ifc-muted: #858585;
	--ifc-border: var(--ifc-border-color, #e8e2eb);
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
	width: 100%;
	border: 1px solid var(--ifc-border-color, #3d1555);
	border-radius: 14px;
	overflow: hidden;
	background: #fff;
	color: var(--ifc-text, var(--ifc-primary, #2e004b));
	font-family: var(--ifc-font-family, inherit);
	font-weight: var(--ifc-font-weight, 400);
	box-sizing: border-box;
}
/* Keep nested elements on the selected site font and global weight. */
.ifc-calculator * { box-sizing: border-box; font-family: inherit; font-weight: var(--ifc-font-weight, 400) !important; }
/* Two-panel structure: choices on the left and calculated figures on the right. */
.ifc-panel { min-width: 0; padding: 38px; }
.ifc-options { border-right: 1px solid var(--ifc-border, #d9c6e1); }
.ifc-results { background: linear-gradient(135deg, #fff 0%, var(--ifc-panel, #f8f3fa) 100%); }
/* Numbered section headings and their supporting labels. */
.ifc-step { display: flex; align-items: center; gap: 18px; margin: 0 0 20px; }
.ifc-step-number {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; flex: 0 0 40px;
	border-radius: 50%; background: var(--ifc-magenta); color: #fff;
	font-size: 18px; font-weight: 700;
}
.ifc-step h3 { margin: 0; color: var(--ifc-text, var(--ifc-primary, #2e004b)); font-size: 20px; line-height: 1.3; font-weight: 600; }
.ifc-field-label { margin: 0 0 14px 58px; color: var(--ifc-muted); font-size: 13px; letter-spacing: .07em; }
/* Treatment and repayment choices. Active states use the configured theme colours. */
.ifc-choice-group { display: flex; flex-wrap: wrap; gap: 10px; margin-left: 58px; }
.ifc-choice {
	appearance: none; border: 1px solid #cbb5d6; border-radius: 28px;
	background: var(--ifc-button-bg, #f7f4f7); color: var(--ifc-button-text, var(--ifc-text, #2e004b)); padding: 11px 18px;
	font: inherit; font-size: 16px; line-height: 1.35; cursor: pointer;
	transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.ifc-plan-choice { display: inline-flex !important; flex-direction: column !important; align-items: flex-start !important; justify-content: center; gap: 5px; min-height: 66px; border-radius: 14px; white-space: normal; }
.ifc-plan-name { display: block !important; font-weight: 600; line-height: 1.25; }
.ifc-plan-price { display: block !important; visibility: visible !important; opacity: 1 !important; height: auto !important; max-height: none !important; overflow: visible !important; font-size: 13px; line-height: 1.25; font-weight: 500; color: inherit !important; }
.ifc-choice:hover, .ifc-choice:focus-visible { border-color: var(--ifc-magenta); outline: none; }
.ifc-choice.is-active { background: var(--ifc-button-active-bg, var(--ifc-magenta)) !important; border-color: var(--ifc-button-active-bg, var(--ifc-magenta)) !important; color: var(--ifc-button-active-text, #fff) !important; }
.ifc-choice.is-active .ifc-plan-price, .ifc-choice.is-active .ifc-plan-name { color: var(--ifc-button-active-text, #fff) !important; }
.ifc-step-second { margin-top: 36px; }
/* Supporting disclaimer and validation message. */
.ifc-disclaimer { margin: 54px 0 0; color: #777; font-size: 16px; line-height: 1.65; }
.ifc-error { margin: 0 0 26px; padding: 15px 18px; border: 1px solid #efb9b9; border-radius: 10px; background: #fff0f0; color: #781d1d; }
.ifc-error[hidden] { display: none; }
/* Results summary, monthly payment and repayment-plan emphasis. */
.ifc-result-label { margin: 0 0 10px; color: var(--ifc-muted); font-size: 13px; letter-spacing: .06em; }
.ifc-monthly-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.ifc-monthly-line strong { color: var(--ifc-text, var(--ifc-primary, #2e004b)); font-size: clamp(32px, 3vw, 48px); line-height: 1.15; font-weight: 700; }
.ifc-monthly-line span { color: #888; font-size: 17px; }
.ifc-summary { margin: 0; }
.ifc-summary > div { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--ifc-border); }
.ifc-summary dt { color: #858585; font-size: 16px; }
.ifc-summary dd { margin: 0; color: var(--ifc-text, var(--ifc-primary, #2e004b)); font-size: 16px; font-weight: 600; text-align: right; }
.ifc-repayment-box { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; padding: 20px 22px; border-radius: 10px; background: var(--ifc-panel, #f2eff3); }
.ifc-repayment-box span { color: #858585; font-size: 12px; letter-spacing: .06em; }
.ifc-repayment-box strong { color: var(--ifc-text, var(--ifc-primary, #2e004b)); font-size: 18px; }
.ifc-consultation-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; margin-top: 24px; padding: 15px 20px; border-radius: 6px; background: var(--ifc-cta-bg, var(--ifc-purple)); color: var(--ifc-cta-text, #fff) !important; text-decoration: none !important; font-size: 17px; font-weight: 600; transition: background .2s ease; }
.ifc-consultation-button:hover { background: var(--ifc-cta-hover-bg, #4c126d); color: var(--ifc-cta-text, #fff) !important; }
.ifc-consultation-button span { font-size: 24px; line-height: 1; }
/* Stack the two panels on tablet and smaller screens. */
@media (max-width: 900px) {
	.ifc-calculator { grid-template-columns: 1fr; }
	.ifc-options { border-right: 0; border-bottom: 1px solid var(--ifc-border, #d9c6e1); }
	.ifc-panel { padding: 28px; }
	.ifc-disclaimer { margin-top: 34px; }
}
/* Tighten spacing and type sizes for narrow mobile screens. */
@media (max-width: 520px) {
	.ifc-panel { padding: 22px 18px; }
	.ifc-step { gap: 12px; }
	.ifc-step h3 { font-size: 17px; }
	.ifc-step-number { width: 34px; height: 34px; flex-basis: 34px; font-size: 16px; }
	.ifc-field-label, .ifc-choice-group { margin-left: 0px; }
	.ifc-choice-group { gap: 8px; }
	.ifc-choice { padding: 9px 13px; font-size: 14px; }
	.ifc-summary > div { gap: 10px; padding: 12px 0; }
	.ifc-summary dt, .ifc-summary dd { font-size: 14px; }
	.ifc-monthly-line strong { font-size: 36px; }
	.ifc-monthly-line span { font-size: 15px; }
	.ifc-disclaimer { font-size: 14px; }
}
