.cm-finance-calculator {
	box-sizing: border-box;
	flex: 0 0 auto;
	margin: 0;
	padding: 14px 20px 16px;
	border: 0;
	background: #eeeeee;
	color: #202020;
	font-family: 'Josefin Sans', 'open sans', sans-serif;
}

.cm-finance-calculator *,
.cm-finance-calculator *::before,
.cm-finance-calculator *::after {
	box-sizing: border-box;
}

.cm-finance-calculator__intro {
	padding-bottom: 10px;
	border-bottom: 1px solid #c9c9c9;
}

.cm-finance-calculator__intro p {
	text-align: left !important;
}

.cm-finance-calculator__intro-title,
.cm-finance-calculator__estimate,
.cm-finance-calculator__error,
.cm-finance-calculator__disclaimer {
	margin: 0;
}

.cm-finance-calculator__intro-title {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.45;
}

.cm-finance-calculator__estimate {
	font-size: 13px;
	line-height: 1.45;
}

.cm-finance-calculator__calculation-row {
	display: grid;
	grid-template-columns: minmax(105px, 0.7fr) minmax(190px, 1.7fr);
	border-bottom: 1px solid #c9c9c9;
}

.cm-finance-calculator__term,
.cm-finance-calculator__payment {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	padding-block: 13px 11px;
}

.cm-finance-calculator__term {
	padding-right: 18px;
	border-right: 1px solid #c9c9c9;
}

.cm-finance-calculator__payment {
	padding-left: 20px;
}

.cm-finance-calculator__field-label {
	display: block;
	margin-bottom: 8px;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
}

.cm-finance-calculator__term-control {
	display: flex;
	align-items: center;
	gap: 11px;
}

.cm-finance-calculator__select,
.cm-finance-calculator__deposit-input {
	min-height: 36px;
	border: 1px solid #bdbdbd;
	border-radius: 2px;
	background: #ffffff;
	color: #111111;
	font: inherit;
}

.cm-finance-calculator__select {
	padding: 5px 7px;
}

.cm-finance-calculator__select:focus,
.cm-finance-calculator__deposit-input:focus {
	border-color: #e50019;
	outline: 2px solid rgba(229, 0, 25, 0.25);
	outline-offset: 1px;
}

.cm-finance-calculator__years {
	font-size: 13px;
}

.cm-finance-calculator__output {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 5px;
	min-height: 31px;
	font-size: 16px;
	line-height: 1.2;
}

.cm-finance-calculator__amount {
	font-size: 24px;
	font-weight: 700;
}

.cm-finance-calculator__per-month {
	font-size: 16px;
	font-weight: 400;
}

.cm-finance-calculator__deposit {
	display: flex;
	align-items: center;
	gap: 16px;
	padding-top: 13px;
}

.cm-finance-calculator__deposit-input {
	width: 173px;
	max-width: 44%;
	padding: 6px 8px;
}

.cm-finance-calculator__deposit-label {
	font-size: 13px;
	line-height: 1.3;
}

.cm-finance-calculator__error {
	margin-top: 6px;
	color: #b00020;
	font-size: 12px;
	line-height: 1.35;
}

.cm-finance-calculator__disclaimer {
	margin-top: 9px;
	color: #5a5a5a;
	font-size: 11px;
	line-height: 1.4;
}

/*
 * On larger screens, preserve the old site's useful behavior: the long
 * specification text scrolls while the price and calculator remain visible.
 * This activates only on panels where the calculator was actually inserted.
 */
@media (min-width: 601px) {
	.description-content.cm-finance-panel {
		display: flex;
		flex-direction: column;
		min-height: 0;
		overflow: hidden;
	}

	.description-content.cm-finance-panel > .text {
		flex: 1 1 auto;
		min-height: 0;
		overflow-y: auto;
	}

	.description-content.cm-finance-panel > .price,
	.description-content.cm-finance-panel > .cm-finance-calculator,
	.description-content.cm-finance-panel > .notes {
		flex: 0 0 auto;
	}
}

@media (max-width: 600px) {
	.cm-finance-calculator {
		padding-inline: 16px;
	}

	.cm-finance-calculator__calculation-row {
		grid-template-columns: 1fr;
	}

	.cm-finance-calculator__term {
		padding-right: 0;
		border-right: 0;
		border-bottom: 1px solid #c9c9c9;
	}

	.cm-finance-calculator__payment {
		padding-left: 0;
	}

	.cm-finance-calculator__deposit {
		align-items: flex-start;
		flex-direction: column;
		gap: 7px;
	}

	.cm-finance-calculator__deposit-input {
		width: 100%;
		max-width: none;
	}
}
