/**
 * NH Housing Loan Product Comparison Calculator.
 */
.nhhlpc-calculator {
	--nhhlpc-blue: #00338d;
	--nhhlpc-blue-dark: #002a86;
	--nhhlpc-blue-mid: #418fec;
	--nhhlpc-light-blue: #d9e8f6;
	--nhhlpc-orange: #e8a631;
	--nhhlpc-border: #c5d9ef;
	--nhhlpc-white: #fff;
	margin: 0 auto 2rem;
	color: #000;
}

.nhhlpc-calculator .container-fluid {
	max-width: 1200px;
	margin: 0 auto;
	padding-left: 15px;
	padding-right: 15px;
}

/* Hero */
.nhhlpc-hero {
	background: linear-gradient(135deg, var(--nhhlpc-blue-dark) 0%, #1a4a9e 55%, #2d5fad 100%);
	color: var(--nhhlpc-white);
	padding: 2.5rem 0 2.75rem;
	margin-bottom: 2rem;
}

.nhhlpc-hero h1 {
	color: var(--nhhlpc-white);
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 700;
	line-height: 1.15;
	margin: 0 0 1rem;
}

.nhhlpc-intro {
	max-width: 58rem;
	font-size: 1.05rem;
	line-height: 1.55;
	margin: 0;
	color: var(--nhhlpc-white);
}

/* Input cards */
.nhhlpc-inputs {
	margin-bottom: 1.5rem;
}

.nhhlpc-form__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem;
}

.nhhlpc-form fieldset,
.nhhlpc-input-card {
	border: 0;
	margin: 0;
	padding: 1.25rem 1.35rem 1.35rem;
	background: var(--nhhlpc-light-blue);
	border-radius: 4px;
	min-width: 0;
}

.nhhlpc-form label,
.nhhlpc-form .field_label {
	display: block;
	color: var(--nhhlpc-blue);
	font-weight: 700;
	font-size: 1.05rem;
	margin-bottom: 0.75rem;
}

.nhhlpc-form input[type="range"] {
	width: 100%;
	margin: 0 0 0.85rem;
	accent-color: var(--nhhlpc-blue-mid);
}

.nhhlpc-calculator .form_control {
	display: block;
	width: 100%;
	padding: 0.65rem 0.75rem;
	border: 1px solid #9eb8d9;
	border-radius: 3px;
	font-size: 1rem;
	font-weight: 600;
	box-sizing: border-box;
	background: var(--nhhlpc-white);
}

.nhhlpc-form .buttoninput {
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
}

.nhhlpc-form .buttoninput-input {
	flex: 1;
	min-width: 0;
}

.nhhlpc-form .buttoninput-button .btn,
.nhhlpc-town-button {
	background: var(--nhhlpc-blue);
	border: 0;
	border-radius: 3px;
	color: var(--nhhlpc-white);
	font-weight: 700;
	font-size: 0.82rem;
	padding: 0.67rem 0.85rem;
	white-space: nowrap;
	cursor: pointer;
}

.nhhlpc-form .comment {
	display: block;
	color: #333;
	font-size: 0.8rem;
	line-height: 1.45;
	margin-top: 0.65rem;
}

/* Download button */
.nhhlpc-actions {
	display: flex;
	justify-content: center;
	margin: 0 0 2rem;
}

.nhhlpc-print,
.nhhlpc-calculator .btn_sm {
	background: var(--nhhlpc-orange);
	border: 0;
	border-radius: 4px;
	color: var(--nhhlpc-blue-dark);
	cursor: pointer;
	display: inline-block;
	font-size: 1.05rem;
	font-weight: 700;
	padding: 0.85rem 2rem;
	min-width: min(100%, 320px);
	text-align: center;
}

.nhhlpc-print:hover,
.nhhlpc-print:focus {
	background: #d99624;
}

/* Download modal */
.nhhlpc-download-modal {
	position: fixed;
	inset: 0;
	z-index: 100001;
	background: rgba(0, 0, 0, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.nhhlpc-download-modal[hidden] {
	display: none !important;
}

.nhhlpc-download-modal__panel {
	background: var(--nhhlpc-white);
	width: min(520px, 95vw);
	max-height: 90vh;
	overflow: auto;
	border-radius: 8px;
	padding: 1.5rem;
	position: relative;
}

.nhhlpc-download-modal__panel h3 {
	color: var(--nhhlpc-blue);
	margin-top: 0;
}

.nhhlpc-download-modal__consent {
	font-size: 0.85rem;
	color: #555;
}

.nhhlpc-download-modal__msg {
	margin: 0.5rem 0;
	font-weight: 600;
	color: var(--nhhlpc-blue);
}

.nhhlpc-download-modal__msg.is-error {
	color: #b3261e;
}

.nhhlpc-download-modal__close {
	position: absolute;
	top: 0.5rem;
	right: 0.75rem;
	border: 0;
	background: transparent;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	color: var(--nhhlpc-blue);
}

.nhhlpc-download-form fieldset {
	border: 0;
	padding: 0;
	margin: 0 0 0.9rem;
	display: flex;
	flex-direction: column;
}

.nhhlpc-download-form label {
	font-weight: 600;
	margin-bottom: 0.25rem;
	color: var(--nhhlpc-blue);
}

.nhhlpc-download-form input {
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--nhhlpc-border);
	border-radius: 4px;
	font-size: 1rem;
}

.nhhlpc-download-form .nhhlpc-download-submit {
	min-width: 0;
	width: auto;
}

.nhhlpc-download-form .nhhlpc-download-submit[disabled] {
	opacity: 0.6;
	cursor: default;
}

/* Table sections */
.nhhlpc-table-sections {
	display: flex;
	flex-direction: column;
	gap: 1.75rem;
}

.nhhlpc-table-section__title {
	background: var(--nhhlpc-blue);
	color: var(--nhhlpc-white);
	font-size: 1.15rem;
	font-weight: 700;
	padding: 0.85rem 1rem;
}

.nhhlpc-table-wrap {
	overflow-x: auto;
	background: var(--nhhlpc-white);
	border: 1px solid var(--nhhlpc-border);
	border-top: 0;
}

.nhhlpc-table {
	width: 100%;
	min-width: 760px;
	border-collapse: collapse;
}

.nhhlpc-table th,
.nhhlpc-table td {
	border-bottom: 1px solid var(--nhhlpc-border);
	padding: 0.85rem 1rem;
	text-align: left;
	vertical-align: middle;
}

.nhhlpc-table-products-row th {
	background: var(--nhhlpc-orange);
	color: var(--nhhlpc-blue-dark);
	font-size: 0.95rem;
	font-weight: 700;
	text-align: center;
	border-bottom: 0;
}

.nhhlpc-table-label-col {
	width: 30%;
	background: var(--nhhlpc-orange);
}

.nhhlpc-table tbody th {
	color: var(--nhhlpc-blue);
	font-weight: 700;
	width: 30%;
}

.nhhlpc-table tbody tr.nhhlpc-data-row:nth-child(odd) th,
.nhhlpc-table tbody tr.nhhlpc-data-row:nth-child(odd) td {
	background: var(--nhhlpc-white);
}

.nhhlpc-table tbody tr.nhhlpc-data-row:nth-child(even) th,
.nhhlpc-table tbody tr.nhhlpc-data-row:nth-child(even) td {
	background: var(--nhhlpc-light-blue);
}

.nhhlpc-table tbody td {
	text-align: center;
	font-weight: 600;
	color: #111;
}

.nhhlpc-hidden-data {
	display: none;
}

.nhhlpc-disclaimer {
	color: #555;
	font-size: 0.78rem;
	line-height: 1.5;
	margin-top: 2rem;
}

/* Town popup */
.nhhlpc-town-popup {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(0, 0, 0, 0.45);
}

.nhhlpc-town-popup[hidden] {
	display: none !important;
}

.nhhlpc-town-popup__panel {
	position: relative;
	width: min(680px, 92vw);
	max-height: 88vh;
	overflow: auto;
	background: var(--nhhlpc-white);
	border-radius: 6px;
	box-shadow: 0 10px 36px rgba(0, 0, 0, 0.25);
	padding: 1.5rem;
}

.nhhlpc-town-popup__panel h3 {
	color: var(--nhhlpc-blue);
	margin-top: 0;
}

.nhhlpc-town-popup__close {
	position: absolute;
	top: 0.6rem;
	right: 0.8rem;
	border: 0;
	background: transparent;
	color: var(--nhhlpc-blue);
	cursor: pointer;
	font-size: 2rem;
	line-height: 1;
}

.nhhlpc-town-search {
	margin: 1rem 0;
}

.nhhlpc-town-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.35rem;
	max-height: 260px;
	overflow: auto;
	border: 1px solid var(--nhhlpc-border);
	padding: 0.75rem;
}

.nhhlpc-town-option {
	border: 0;
	background: transparent;
	color: var(--nhhlpc-blue);
	cursor: pointer;
	padding: 0.35rem 0.25rem;
	text-align: left;
}

.nhhlpc-town-option:hover,
.nhhlpc-town-option:focus {
	background: var(--nhhlpc-light-blue);
	outline: none;
}

.nhhlpc-town-selected {
	margin-top: 1rem;
	padding: 1rem;
	background: var(--nhhlpc-light-blue);
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

@media (max-width: 991px) {
	.nhhlpc-form__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 767px) {
	.nhhlpc-form .buttoninput {
		display: block;
	}

	.nhhlpc-form .buttoninput-button {
		margin-top: 0.5rem;
	}

	.nhhlpc-town-list {
		grid-template-columns: 1fr;
	}

	.nhhlpc-hero {
		padding: 2rem 0;
	}
}

@media print {
	.nhhlpc-hero {
		background: var(--nhhlpc-blue);
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	.nhhlpc-actions,
	.nhhlpc-form input[type="range"],
	.nhhlpc-town-button,
	.nhhlpc-download-modal,
	.nhhlpc-town-popup,
	.main_header,
	.top_header,
	.nhh_footer,
	.main_breadcrumb,
	[id^="page-banner"],
	.gtranslate_wrapper {
		display: none !important;
	}

	.nhhlpc-table-wrap {
		overflow: visible;
	}

	.nhhlpc-table {
		min-width: 0;
	}

	.nhhlpc-table-section__title,
	.nhhlpc-table-products-row th,
	.nhhlpc-table tbody tr:nth-child(even) th,
	.nhhlpc-table tbody tr:nth-child(even) td {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}
}
