@import url('https://fonts.googleapis.com/css2?family=PT+Sans+Caption:wght@400;700&display=swap');

/* Pricing form, results panel and debug panel styles, shared by every pricing category. */
/* The handful of #field-* and #pf-* selectors below are kept because those ids are already the conditional-logic contract, so re-classing them would be a larger risk than the deviation from class-only styling. */

/* Results filter groups, inlined here from the stylesheet the old build imported at this point. */
.pf-programs__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.pf-programs__filter {
	display: flex;
	align-items: center;
	gap: 5px;

	& label {
		font-size: 11px;
		font-weight: 700;
		color: var(--pf-label);
	}

	& .pf-filter-btn {
		flex: 1;
		padding: 2px 4px;
		font-size: 14px;
		line-height: normal;
		font-weight: 700;
		font-family: 'PT Sans Caption', Arial, Helvetica, sans-serif;
		color: var(--pf-blue);
		background: #fff;
		border: 1px solid var(--pf-blue);
		cursor: pointer;
		transition: background-color 0.15s ease, color 0.15s ease;
	}

	& .pf-filter-btn__small {
		width: 28px;
	}

	& .pf-filter-btn--active {
		background-color: var(--pf-blue);
		color: #fff;
	}

	/* Disabled group: dimmed and non-interactive (e.g. ARM Type until Amort Type is ARM) */
	& .pf-btn-group--disabled {
		opacity: 0.4;
		pointer-events: none;

		& .pf-filter-btn {
			cursor: not-allowed;
		}
	}
}

.pf-programs__empty,
.pf-rates__empty {
	margin: 0;
	padding: 20px 16px;
	font-size: 14px;
	font-weight: 700;
	color: var(--pf-label);
	text-align: center;
}

.container.main-content {
	padding: 0 20px;
}

.pf-wrap {
	--pf-blue: #1a5694;
	--pf-blue-hover: #1e6ab8;
	--pf-blue-light: #dfefff;
	--pf-blue-bg: #e2edf8;
	--pf-navy: #1a2e50;
	--pf-text: #333;
	--pf-label: #444;
	--pf-border: #d0d5da;
	--pf-border-light: #e8eaed;
	--pf-red: #d03040;
	--pf-gray: #7a8290;
	--pf-bg-muted: #f2f3f5;
	--pf-bg-disabled: #e9ecef;
	--pf-radius: 8px;
	--pf-field-h: 38px;

	--pf-max-height: 400px;
	--result-header-height: 65px;

	max-width: 1440px;
	margin: 0 auto;
	padding: 24px 20px;
	font-family: 'PT Sans Caption', Arial, Helvetica, sans-serif;
	color: var(--pf-text);
}

.pf-logo {

	& img {
		max-height: 50px;
		width: auto;
	}
}

/* Page-2 (print) logo: hidden on screen, shown only when printing */
.pf-print-logo {
	display: none;
}

.pf-header {
	margin-bottom: 16px;
	display: flex;
	align-items: start;
	justify-content: space-between;
}

/* Set by the 'hide_logo' page flag for the pages that already sit under a logo, and screen only because the print block below restores it. */
.pf-header--no-logo {
	display: none;
}

.pf-title {
	font-size: 28px;
	line-height: normal;
	font-weight: 700;
	color: var(--pf-navy);
	margin: 0 0 0px;
}

.pf-subtitle {
	font-size: 14px;
	color: var(--pf-gray);
	margin: 0;
	padding: 0;
}

.pf-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
	align-items: stretch;
}

.pf-card {
	border: 1px solid var(--pf-border-light);
	border-radius: 4px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	background: #fff;
	box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
}

.pf-card__title {
	line-height: 16px;
	font-size: 20px;
	font-weight: 700;
	color: var(--pf-blue);
	margin: 0 0 2px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--pf-border-light);
}

.pf-field__end {
	width: 100%;
	display: flex;
	align-items: flex-end;
}

.pf-field {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 3px;

	&.pf-field--hidden {
		display: none;
	}

	&.pf-field--invalid {
		& > label,
		& > .pf-field__header > label {
			color: var(--pf-red);
		}

		& input[type="text"],
		& input[type="number"],
		& input[type="email"],
		& select,
		& .pf-affix {
			border-color: var(--pf-red);
		}

		& .pf-field__error:not(:empty) {
			display: block;
		}
	}

	& .pf-field__error {
		display: none;
		margin-block-start: 2px;
		font-size: 10px;
		line-height: 10px;
		color: var(--pf-red);
	}

	& label {
		font-size: 12px;
		line-height: normal;
		font-weight: 700;
		color: var(--pf-label);
		white-space: nowrap;
	}

	& input[type="number"]#pf-lender-paid,
	& input[type="number"]#pf-mortgage-late-30x12,
	& input[type="number"]#pf-mortgage-late-60x12,
	& input[type="number"]#pf-mortgage-late-90x12,
	& input[type="number"]#pf-mortgage-late-120x12,
	& input[type="number"]#pf-mortgage-late-30x24,
	& input[type="number"]#pf-mortgage-late-greater-than-120 {
		border: none;
	}

	& input[type="text"],
	& select,
	& input[type="number"] {
		width: 100%;
		padding: 5px 5px 5px 10px;
		font-size: 14px;
		line-height: normal;
		font-family: 'PT Sans Caption', Arial, Helvetica, sans-serif;
		color: var(--pf-text);
		background-color: #fff;
		border: 1px solid var(--pf-border);
		border-radius: 5px;
		box-sizing: border-box;
		transition: border-color 0.2s ease;


		&:focus {
			outline: none;
			border-color: var(--pf-blue);
			box-shadow: 0 0 0 2px rgba(26, 86, 148, 0.1);
		}

		&:disabled {
			background-color: var(--pf-bg-disabled);
			color: var(--pf-gray);
			cursor: not-allowed;
		}
	}

	& select {
		cursor: pointer;
		appearance: none;
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a8290' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
		background-repeat: no-repeat;
		background-position: right 10px center;
		padding-right: 30px;
	}

	& select.pf-select--readonly {
		pointer-events: none;
		background-color: var(--pf-bg-disabled);
		color: var(--pf-gray);
		cursor: not-allowed;
	}

	/* A derived field such as CLTV, so it reads as calculated rather than broken. */
	& input[readonly] {
		background-color: var(--pf-bg-disabled);
		color: var(--pf-gray);
		cursor: not-allowed;
	}

	&:has(datalist:not(:empty)) input[data-combobox] {
		cursor: pointer;
		appearance: none;
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a8290' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
		background-repeat: no-repeat;
		background-position: right 10px center;
		padding-right: 30px;
	}
}

.pf-2-row-label-container {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.pf-2-row-label {
	font-size: 12px;
	line-height: normal;
	font-weight: 700;
	color: var(--pf-label);
	white-space: nowrap;
}

.pf-combobox {

	& .pf-combobox__wrap {
		position: relative;
		width: 100%;
	}

	& .pf-combobox__list {
		position: absolute;
		top: 100%;
		left: 0;
		width: 100%;
		box-sizing: border-box;
		margin: 2px 0 0;
		z-index: 20;
		padding: 0;
		list-style: none;
		max-height: 240px;
		overflow-y: auto;
		background-color: #fff;
		border: 1px solid var(--pf-border);
		border-radius: 4px;
		box-shadow: 0 4px 10px rgba(26, 46, 80, 0.15);
		scrollbar-color: var(--pf-border-light) transparent;

		&[hidden] {
			display: none;
		}
	}

	& .pf-combobox__option {
		padding: 7px 12px;
		font-size: 14px;
		line-height: normal;
		color: var(--pf-text);
		cursor: pointer;

		&:hover,
		&.pf-combobox__option--active {
			background-color: var(--pf-blue);
			color: #fff;
		}
	}
}

.pf-field__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.pf-check {
	display: flex;
	align-items: center;
	gap: 4px;

	& label {
		font-size: 10px;
		font-weight: 400;
		color: var(--pf-gray);
		cursor: pointer;
	}

	& input[type="checkbox"] {
		width: 14px;
		height: 14px;
		margin: 0;
		cursor: pointer;
		accent-color: var(--pf-blue);
	}
}

.pf-check-row {
	display: flex;
	gap: 8px;
}

.pf-req {
	color: var(--pf-red);
}

.pf-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;

	&:not(:has(.pf-field:not(.pf-field--hidden))) {
		display: none;
	}
}

.pf-field-row--2col--left {
	grid-template-columns: 2fr 1fr;
}

.pf-field-row--3col {
	grid-template-columns: 1fr 1fr 1fr;
}

#field-mortgage-history {
	display: flex;
	flex-direction: column;
	gap: 24px;

	&.pf-field--hidden {
		display: none;
	}
}

#field-units {
	grid-column-start: 1;
	grid-column-end: 2;
}

#field-short-term {
	grid-column-start: 2;
	grid-column-end: 3;
}

#field-ppp-term {
	grid-column-start: 2;
	grid-column-end: 3;
}

.pf-affix:has(input[readonly]) {
	background-color: var(--pf-bg-disabled);
}

.pf-affix {
	display: flex;
	align-items: center;
	border: 1px solid var(--pf-border);
	border-radius: 5px;
	background-color: #fff;
	overflow: hidden;
	transition: border-color 0.2s ease;

	&:focus-within {
		border-color: var(--pf-blue);
		box-shadow: 0 0 0 2px rgba(26, 86, 148, 0.1);
	}

	/* The number input is named by class rather than by type, so only the one field opting in flexes and the other number inputs in an affix keep today's sizing; input is kept in the selector because .pf-field input[type="number"] would otherwise outrank a bare class. */
	& input[type="text"],
	& input.pf-affix__number {
		border: none;
		height: 100%;
		flex: 1;
		min-width: 0;
		border-radius: 0;
		font-family: 'PT Sans Caption', Arial, Helvetica, sans-serif;

		&:focus {
			outline: none;
			border-color: transparent;
			box-shadow: none;
		}
	}
}

/* Opt-in for one number input, Lender Paid, which sits in a 77px column where the spinner and the default 10px indent between them cost more than its third decimal needs; every other number input in an affix is untouched. */
/* input stays in the selector because .pf-field input[type="number"] would otherwise outrank a bare class and keep the indent. */
.pf-affix input.pf-affix__number {
	padding: 5px;
	appearance: textfield;
	-moz-appearance: textfield;
}

.pf-affix__number::-webkit-outer-spin-button,
.pf-affix__number::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.pf-affix__label {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 5px;
	font-size: 14px;
	line-height: normal;
	font-weight: 700;
	color: var(--pf-gray);
	background-color: var(--pf-bg-muted);
	height: 100%;
	user-select: none;
}

.pf-affix__label--mortgage-late {
	min-width: 70px;
}

.pf-affix--pre {
	& .pf-affix__label {
		border-right: 1px solid var(--pf-border);
	}
}

.pf-affix--suf {
	& .pf-affix__label {
		border-left: 1px solid var(--pf-border);
	}
}

.pf-actions {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin-top: 10px;
}

/* Email and Download PDF on a category that renders them here, hidden until showLoading() reveals them with the results panel. */
.pf-actions__export {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Spelled out because the class above would otherwise win the tie against the [hidden] attribute. */
.pf-actions__export[hidden] {
	display: none;
}

.pf-submit {
	min-width: 170px;
	height: 38px;
	/* 20px rather than 36px so the longest label, Download PDF, still fits inside the 170px floor and all three buttons in the row render at the same width. */
	padding: 8px 20px;
	font-size: 16px;
	font-weight: 700;
	font-family: 'PT Sans Caption', Arial, Helvetica, sans-serif;
	color: #fff;
	background-color: var(--pf-blue);
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.25s ease, transform 0.2s ease;

	&:hover {
		background-color: var(--pf-blue-hover);
		box-shadow: 0 3px 12px rgba(26, 46, 80, 0.25);
		transform: translateY(-1px);
	}
}

.pf-api-error {
	margin-block-start: 16px;
	padding: 12px 16px;
	background: #fef2f2;
	border: 1px solid #fca5a5;
	border-radius: 6px;
	color: #991b1b;
	font-size: 14px;

	& p {
		margin: 0;
	}
}

.pf-slider {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-top: 2px;

	& input[type="range"] {
		-webkit-appearance: none;
		appearance: none;
		width: 100%;
		height: 4px;
		background: var(--pf-border);
		border-radius: 2px;
		outline: none;
		cursor: pointer;

		&::-webkit-slider-thumb {
			-webkit-appearance: none;
			appearance: none;
			width: 16px;
			height: 16px;
			background: var(--pf-blue);
			border: 2px solid #fff;
			border-radius: 50%;
			box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
			cursor: pointer;
		}

		&::-moz-range-thumb {
			width: 16px;
			height: 16px;
			background: var(--pf-blue);
			border: 2px solid #fff;
			border-radius: 50%;
			box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
			cursor: pointer;
		}
	}
}

.pf-slider__ticks {
	display: flex;
	justify-content: space-between;
	font-size: 9px;
	line-height: normal;
	color: var(--pf-gray);
	padding: 0 2px;
	user-select: none;
}

.pf-toggle {
	display: flex;
	align-items: center;
	line-height: normal;
	gap: 4px;
}

.pf-field__centered {
	padding-left: 30px;
}

.pf-toggle__label {
	font-size: 12px;
	font-weight: 700;
	color: var(--pf-label);
	user-select: none;
}

.pf-toggle__switch {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
	cursor: pointer;

	& input {
		opacity: 0;
		width: 0;
		height: 0;
		position: absolute;
	}
}

.pf-toggle__track {
	position: absolute;
	inset: 0;
	background-color: var(--pf-border);
	border-radius: 11px;
	transition: background-color 0.2s ease;

	&::after {
		content: '';
		position: absolute;
		top: 2px;
		left: 2px;
		width: 18px;
		height: 18px;
		background: #fff;
		border-radius: 50%;
		box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
		transition: transform 0.2s ease;
	}
}

.pf-toggle__switch input:checked + .pf-toggle__track {
	background-color: var(--pf-blue);

	&::after {
		transform: translateX(18px);
	}
}

.pf-toggle__switch--sm {
	width: 34px;
	height: 18px;

	& .pf-toggle__track {
		border-radius: 9px;

		&::after {
			width: 14px;
			height: 14px;
		}
	}

	& input:checked + .pf-toggle__track::after {
		transform: translateX(16px);
	}
}

.pf-btn-group {
	display: flex;
	gap: 0;
	.pf-btn-group__btn {
		border-radius: 0px !important;
	}
}

.pf-btn-group__btn {
	flex: 1;
	padding: 4px 8px;
	font-size: 14px;
	line-height: normal;
	font-weight: 700;
	font-family: 'PT Sans Caption', Arial, Helvetica, sans-serif;
	color: var(--pf-blue);
	background: #fff;
	border: 1px solid var(--pf-blue);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;

	&:first-child {
		border-radius: 3px 0 0 3px !important;
	}

	&:last-child {
		border-radius: 0 3px 3px 0 !important;
	}

	&:not(:first-child) {
		border-left: none;
	}

	&:hover {
		background-color: var(--pf-blue-light);
	}

	&.pf-btn-group__btn--active {
		background-color: var(--pf-blue);
		color: #fff;
	}
}

.pf-slider--fico {
	& input[type="range"] {
		background: linear-gradient(to right, #d03040, #e87040, #f0c040, #80c040, #30a050);
		height: 6px;
		border-radius: 3px;
	}
}

.pf-slider--hidden {
	display: none;
}

.pf-tooltip {
	position: relative;
	font-style: normal;
	font-weight: 800;
	font-size: 12px;
	line-height: 10px;
	color: var(--pf-navy);
	cursor: help;

	&::after {
		content: attr(data-tip);
		position: absolute;
		bottom: calc(100% + 6px);
		left: 50%;
		transform: translateX(-50%);
		background: var(--pf-navy);
		color: #fff;
		font-size: 11px;
		font-weight: 400;
		padding: 6px 10px;
		border-radius: 4px;
		white-space: nowrap;
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.15s ease;
		z-index: 10;
	}

	&:hover::after {
		opacity: 1;
	}
}

.pf-loader {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;

	&[hidden] {
		display: none;
	}
}

.pf-spinner {
	width: 32px;
	height: 32px;
	border: 3px solid var(--pf-border-light);
	border-top-color: var(--pf-blue);
	border-radius: 50%;
	animation: pf-spin 0.7s linear infinite;
}

@keyframes pf-spin {
	to { transform: rotate(360deg); }
}

.pf-results-wrap {
	margin-top: 10px;
}

.pf-results-panel {
	display: grid;
	grid-template-columns: minmax(0, 28%) minmax(0, 1fr) minmax(220px, 25%);
	border: 1px solid var(--pf-border-light);
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
	min-height: 300px;
	overflow: hidden;
}

.pf-programs {
	border-right: 1px solid var(--pf-border-light);
	display: flex;
	flex-direction: column;
	max-height: var(--pf-max-height);
}

.pf-programs__header {
	padding: 8px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border: 1px solid var(--pf-border-light);
	flex-wrap: wrap;
	gap: 8px;
}

.pf-programs__title {
	font-size: 18px;
	font-weight: 600;
	line-height: normal;
	color: var(--pf-blue);
	margin: 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.pf-programs__download {
	display: flex;
	gap: 4px;
}

.pf-programs__header-left, .pf-programs__header-right {
	display: flex;
	align-items: center;
	gap: 8px;
}

.pf-programs__sort {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 700;
	color: var(--pf-label);

	& label {
		white-space: nowrap;
	}
	.pf-programs__sort-input {
		padding: 4px 8px;
		font-size: 12px;
		height: 28px;
		width: 60px;
		line-height: normal;
		color: var(--pf-text);
		background-color: #fff;
		border: 1px solid var(--pf-border);
		border-radius: 5px;
		box-sizing: border-box;
		transition: border-color 0.2s ease;
	}
}


.pf-programs__sort-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 28px;
	padding: 0 10px;
	font-size: 12px;
	font-weight: 700;
	font-family: inherit;
	color: var(--pf-gray);
	background-color: #fff;
	border: 1px solid var(--pf-border);
	border-radius: 5px;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;

	&:hover {
		border-color: var(--pf-blue);
	}

	&:focus {
		outline: none;
		border-color: var(--pf-blue);
		box-shadow: 0 0 0 2px rgba(26, 86, 148, 0.1);
	}
}

.pf-programs__sort-btn--active {
	color: var(--pf-blue);
	border-color: var(--pf-blue);
	background-color: var(--pf-blue-light);
}

.pf-programs__sort-arrow {
	display: inline-flex;
	align-items: center;
	transition: transform 0.2s ease;
}

.pf-programs__sort-btn[data-dir="asc"] .pf-programs__sort-arrow {
	transform: rotate(180deg);
}

.pf-programs__sort .pf-programs__sort-input:not(.pf-programs__sort-input--disabled) {
	color: var(--pf-blue);
	border-color: var(--pf-blue);
	background-color: var(--pf-blue-light);
}

.pf-programs__sort-btn--disabled,
.pf-programs__sort .pf-programs__sort-input--disabled {
	color: var(--pf-gray);
	background-color: #fff;
	opacity: 0.55;
	cursor: pointer;
}

.pf-programs__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 30px;
	height: 24px;
	padding: 0 6px;
	font-size: 12px;
	font-weight: 700;
	font-style: normal;
	color: var(--pf-blue);
	background: var(--pf-blue-light);
	border-radius: 11px;
}

.pf-programs__toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	line-height: normal;
	font-weight: 700;
	color: var(--pf-label);
}

.pf-programs__list {
	flex: 1;
	overflow-y: auto;
	scrollbar-color: var(--pf-border-light) transparent;
}

.pf-program {
	padding: 8px 16px;
	border-bottom: 1px solid var(--pf-border-light);
	border-left: 3px solid transparent;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;

	&:hover {
		background-color: #f8f9fb;
	}

	&.pf-program--active {
		border: 2px solid var(--pf-blue);
		background-color: var(--pf-blue-light);
		border-radius: 4px;
	}
}

.pf-program__name {
	font-size: 14px;
	line-height: normal;
	font-weight: 700;
	color: var(--pf-navy);
	padding-bottom: 1em;
}

.pf-program__meta {
	display: flex;
	gap: 16px;
	font-size: 12px;
	line-height: normal;
	color: var(--pf-gray);
}

.pf-program--ineligible {
	opacity: 0.6;
	display: none;

	& .pf-program__name {
		display: flex;
		align-items: center;
		justify-content: space-between;
		line-height: normal;
		gap: 8px;
		padding: 0 0 14px;
	}
}

.pf-program__badge {
	font-size: 10px;
	font-weight: 700;
	color: var(--pf-red);
	background: #fde8eb;
	padding: 2px 8px;
	border-radius: 3px;
	white-space: nowrap;
}

.pf-programs__list--show-ineligible {
	& .pf-program:not(.pf-program--ineligible) {
		display: none;
	}

	& .pf-program--ineligible {
		display: block;
	}
}

.pf-programs__info {
	display: flex;
	align-items: center;
	justify-content: start;
	padding: 8px 16px;
	font-size: 10px;
	line-height: normal;
	height: 40px;
	color: var(--pf-gray);
	border-top: 1px solid var(--pf-border-light);

	& svg {
		width: 10px;
		height: 10px;
		vertical-align: -2px;
		margin-right: 4px;
		fill: var(--pf-gray);
	}
}

.pf-rates {
	display: flex;
	flex-direction: column;
	max-height: var(--pf-max-height);
}

.pf-rates__header {
	padding: 14px 20px 10px;
	border-bottom: 1px solid var(--pf-border-light);
	min-height: var(--result-header-height);
	box-sizing: border-box;
}

.pf-rates__title {
	font-size: 18px;
	line-height: normal;
	font-weight: 700;
	color: var(--pf-navy);
	margin: 0 0 2px;
}

.pf-rates__subtitle {
	font-size: 12px;
	line-height: normal;
	color: var(--pf-gray);
	margin: 0;
	padding: 0;
}

.pf-rates__body {
	flex: 1;
	overflow-y: auto;
	max-height: var(--pf-max-height);
}

.pf-rate-table {
	width: 100%;
	line-height: normal;
	border-collapse: collapse;
}

.pf-rate-table thead th {
	background-color: var(--pf-blue);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 4px 8px !important;
	border-width: medium 0px 0px medium !important;
	text-align: left;
	white-space: nowrap;
	position: sticky;
	top: 0;
}

/* Salient styles table cells by tag, so the hidden attribute needs restating. */
.pf-rate-table thead th[hidden] {
	display: none;
}

.pf-rate-table tbody tr {
	cursor: pointer;
	transition: background-color 0.12s ease;

	&:hover {
		background-color: #f6f8fb;
	}

	&.pf-rate-row--selected {
		background-color: var(--pf-blue-light) !important;

		& td {
			font-weight: 700 !important;
		}
	}
}

.pf-rate-table tbody td {
	font-size: 13px !important;
	padding: 4px 8px !important;
	border-bottom: 1px solid var(--pf-border-light) !important;
	color: var(--pf-text) !important;

}

.pf-rate-table .pf-rate-check {
	width: 20px;
	color: var(--pf-blue);
	font-weight: 700;

	&::before {
		content: '';
		display: inline-block;
		width: 14px;
		height: 14px;
		background-color: currentColor;
		mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='black'><path d='M16.7 5.3a1 1 0 0 1 0 1.4l-8 8a1 1 0 0 1-1.4 0l-4-4a1 1 0 1 1 1.4-1.4L8 12.6l7.3-7.3a1 1 0 0 1 1.4 0z'/></svg>") no-repeat center / contain;
		-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='black'><path d='M16.7 5.3a1 1 0 0 1 0 1.4l-8 8a1 1 0 0 1-1.4 0l-4-4a1 1 0 1 1 1.4-1.4L8 12.6l7.3-7.3a1 1 0 0 1 1.4 0z'/></svg>") no-repeat center / contain;
		opacity: 0;
	}
}

.pf-rate-table .pf-rate-row--selected .pf-rate-check::before {
	opacity: 1;
}

.pf-adjustments {
	display: flex;
	flex-direction: column;
	border-left: 1px solid var(--pf-border-light);
	max-height: var(--pf-max-height);
}

.pf-adjustments__header {
	padding: 14px 16px 10px;
	border-bottom: 1px solid var(--pf-border-light);
	min-height: var(--result-header-height);
	box-sizing: border-box;
}

.pf-adjustments__title {
	font-size: 16px;
	line-height: normal;
	font-weight: 700;
	color: var(--pf-navy);
	margin: 0;
}

.pf-adjustments__body {
	flex: 1;
	overflow-y: auto;
}

.pf-adjustments-table {
	width: 100%;
	line-height: normal;
	border-collapse: collapse;

	& thead th {
		background-color: var(--pf-blue);
		color: #fff;
		font-size: 12px;
		font-weight: 700;
		padding: 4px 8px !important;
		border-width: medium 0 0 medium !important;
		text-align: left;
		white-space: nowrap;
		position: sticky;
		top: 0;
	}

	& tbody td {
		font-size: 13px !important;
		padding: 4px 8px !important;
		border-bottom: 1px solid var(--pf-border-light) !important;
		color: var(--pf-text) !important;
	}

	& .pf-adjustments-cost {
		text-align: right;
		white-space: nowrap;
		font-variant-numeric: tabular-nums;
	}

	&[hidden] {
		display: none;
	}
}

.pf-adjustments__empty {
	margin: 0;
	padding: 16px;
	font-size: 12px;
	color: var(--pf-gray);
	text-align: center;

	&[hidden] {
		display: none;
	}
}

.pf-ineligible-panel {
	padding: 16px 20px;

	&[hidden] {
		display: none;
	}
}

.pf-ineligible-panel__heading {
	font-size: 13px;
	line-height: normal;
	font-weight: 700;
	color: var(--pf-red);
	margin: 0 0 8px;
}

.pf-ineligible-panel__list {
	list-style: disc;
	padding-inline-start: 20px;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;

	& li {
		font-size: 13px;
		line-height: 1.4;
		color: var(--pf-text);
	}
}

.pf-rates__footer {
	height: 40px;
	padding: 5px 10px;
	font-size: 12px;
	color: var(--pf-gray);
	text-align: center;
	border-top: 1px solid var(--pf-border-light);
}

.pf-debug {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-top: 24px;
	border: 1px solid var(--pf-border);
	border-radius: var(--pf-radius);
	padding: 16px;
	background: var(--pf-bg-muted);

	/* The panel is a grid, so the hidden attribute needs restating to win. */
	&[hidden] {
		display: none;
	}
}

.pf-debug__panel {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.pf-debug__title {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 700;
	color: var(--pf-navy);
}

.pf-debug__code {
	margin: 0;
	padding: 12px;
	background: #fff;
	border: 1px solid var(--pf-border-light);
	border-radius: 6px;
	font-family: monospace;
	font-size: 11px;
	line-height: 1.4;
	white-space: pre-wrap;
	word-break: break-word;
	overflow-y: auto;
	max-height: 500px;
	flex: 1;
}

@media screen and (max-width: 768px) {
	.pf-wrap {
		padding: 0;
	}

	.pf-grid {
		grid-template-columns: 1fr;
	}

	.pf-field-row {
		grid-template-columns: 1fr 1fr;
	}

	.pf-programs__header {
		flex-direction: column;

		& .pf-programs__header-left {
			align-items: flex-start;
			flex-direction: column;
		}
	}
	.pf-results-panel {
		grid-template-columns: 1fr;
	}
}

@media screen and (max-width: 425px) {

	.pf-wrap {
		padding: 0;
	}

	.pf-grid {
		grid-template-columns: 1fr;
	}

	.pf-field-row {
		grid-template-columns: 1fr;
	}

	.pf-results-panel {
		grid-template-columns: 1fr;
	}

	.pf-programs__header {
		flex-direction: column;

		& .pf-programs__header-left {
			align-items: flex-start;
			flex-direction: column;
		}
	}

	.pf-rate-table thead th {
		text-wrap: wrap;
		white-space: normal;
	}

	#pf-adjustments-tbody tr td {
		white-space: normal;
		text-align: center;
	}
}


@page {
	margin: 0;
	size: letter portrait;
}

@media print {
	* {
		margin: 0;
		padding: 0;
	}

	html, body {
		margin: 0;
		padding: 10mm;
		width: 100%;
		height: auto;
	}

	/* Logo header on both printed pages, hidden on screen for some of them */
	.pf-header,
	.pf-header--no-logo {
		display: block;
		margin-bottom: 12px;
	}

	.pf-print-logo {
		display: block;
		margin-bottom: 12px;
		padding-top: 15mm;
	}

	.pf-logo img,
	.pf-print-logo img {
		text-align: left;
		max-height: 50px;
		width: auto;
	}

	.pf-programs__list {
		page-break-inside: auto !important;
		break-inside: auto !important;
		page-break-after: auto !important;
		break-before: auto !important;
		break-after: auto !important;
	}

	.pf-program {
		page-break-inside: avoid !important;
		break-inside: avoid !important;

		& * {
			page-break-inside: auto !important;
			break-inside: auto !important;
			page-break-after: auto !important;
			break-before: auto !important;
			break-after: auto !important;
		}
	}


	.pf-results-wrap {
		page-break-before: always !important;
		break-before: page !important;
		margin-top: 4px;
	}

	.pf-programs__header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
		padding: 4px 0px;
	}

	.pf-card__title {
		font-size: 14px;
		line-height: 14px;
		padding-bottom: 6px;
	}


	.pf-programs__header-left,
	.pf-programs__header-right {
		width: 100%;
		flex-direction: column;
		gap: 12px;
	}

	.pf-grid {
		grid-template-columns: 1fr;
		gap: 4px;

		.pf-card {
			gap: 4px;
			padding: 10px;
		}
	}


	.pf-results-panel {
		grid-template-columns: 2fr 1fr;
		height: var(--pf-max-height);
		min-height: var(--pf-max-height);
		max-height: var(--pf-max-height);
	}

	.pf-programs,
	.pf-rates,
	.pf-adjustments {
		border: none;
		border-top: 1px solid var(--pf-border-light);
	}

	.pf-programs:first-child,
	.pf-rates:first-child,
	.pf-adjustments:first-child {
		border-top: none;
	}

	.pf-rates__header {
		padding: 6px 10px;
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 30px;

		.pf-rates__title {
			font-size: 14px;
			line-height: 14px;
		}
	}

	.pf-adjustments__header {
		padding: 6px 10px;
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 30px;

		.pf-adjustments__title {
			font-size: 14px;
			line-height: 14px;
		}
	}

	.pf-rates__footer {
		font-size: 10px;
		height: fit-content;
		padding: 0px;
	}

	/* Keeps the printed rate table at the screen viewport height, clipping non-selected rows while still letting the prefill script scroll it before the snapshot. */
	.pf-rates,
	.pf-adjustments {
		height: 100%;
		min-height: 0;
		max-height: none;
	}

	.pf-rates__body,
	.pf-adjustments__body {
		min-height: 0;
		max-height: none;
	}

	::-webkit-scrollbar {
		display: none !important;
	}

	* {
		scrollbar-width: none !important;
	}

	.pf-programs__list,
	.pf-rates__body,
	.pf-adjustments__body {
		overflow: hidden !important;
	}

	#footer-outer, #header-space, #header-outer, .fmc-pricer-modal {
		display: none !important;
	}

	#to-top, .pf-debug {
		display: none !important;
	}

	.non-printable {
		display: none !important;
	}
}
