/* Investment Goal Planner — namespaced under .igp- to avoid theme clashes. */

.igp-wrap {
	max-width: 860px;
	margin: 0 auto;
	padding: 24px;
	box-sizing: border-box;
	font-family: inherit;
	color: inherit;
}

.igp-wrap *,
.igp-wrap *::before,
.igp-wrap *::after {
	box-sizing: border-box;
}

.igp-title {
	font-size: 1.6em;
	margin: 0 0 1em;
	line-height: 1.25;
}

.igp-fields {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
	margin-bottom: 18px;
}

@media (min-width: 640px) {
	.igp-fields {
		grid-template-columns: 1fr 1fr;
	}
}

.igp-field-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.igp-field label {
	font-weight: 600;
	font-size: 0.95em;
}

.igp-number {
	width: 150px;
	max-width: 45%;
	padding: 8px 10px;
	font-size: 1em;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #fff;
	color: #111827;
}

.igp-number:focus {
	outline: 2px solid #2563eb;
	outline-offset: 1px;
	border-color: #2563eb;
}

.igp-range {
	width: 100%;
	display: block;
	margin: 0;
	accent-color: #2563eb;
}

.igp-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 4px 0 20px;
}

.igp-btn {
	appearance: none;
	border: 1px solid #2563eb;
	background: #2563eb;
	color: #fff;
	padding: 10px 18px;
	font-size: 0.95em;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
}

.igp-btn:hover,
.igp-btn:focus {
	background: #1d4ed8;
	border-color: #1d4ed8;
}

.igp-btn:focus-visible {
	outline: 2px solid #1d4ed8;
	outline-offset: 2px;
}

.igp-results {
	overflow-x: auto;
	margin-bottom: 20px;
}

.igp-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
}

.igp-table th,
.igp-table td {
	padding: 9px 12px;
	border-bottom: 1px solid #e5e7eb;
	text-align: right;
}

.igp-table th:first-child,
.igp-table td:first-child {
	text-align: left;
}

.igp-table thead th {
	background: #f8fafc;
	font-weight: 700;
	border-bottom: 2px solid #e5e7eb;
}

.igp-table tbody tr:nth-child(even) td {
	background: #fbfdff;
}

.igp-chart-wrap {
	margin-bottom: 20px;
}

.igp-chart {
	width: 100%;
	display: block;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	max-height: 480px; /* backstop: never run off-screen */
}
@media (max-width: 640px) {
	.igp-chart { max-height: 320px; }
}}

.igp-credit {
	font-size: 0.9em;
	color: #4b5563;
	margin: 0 0 8px;
}

.igp-credit a {
	color: inherit;
}

.igp-disclaimer {
	font-size: 0.82em;
	line-height: 1.6;
	color: #6b7280;
	margin: 0;
}

/* Lead capture form */
.igp-lead {
	margin: 24px 0 20px;
	padding: 20px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #f8fafc;
}

.igp-lead-title {
	font-size: 1.15em;
	margin: 0 0 6px;
}

.igp-lead-sub {
	font-size: 0.92em;
	color: #4b5563;
	margin: 0 0 14px;
}

.igp-lead-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

@media (min-width: 640px) {
	.igp-lead-row {
		grid-template-columns: 1fr 1fr;
	}
}

.igp-lead-field {
	margin-bottom: 12px;
}

.igp-lead-field label {
	display: block;
	font-weight: 600;
	font-size: 0.92em;
}

.igp-lead-field input[type="text"],
.igp-lead-field input[type="tel"],
.igp-lead-field input[type="email"] {
	display: block;
	width: 100%;
	margin-top: 6px;
	padding: 9px 11px;
	font-size: 1em;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #fff;
	color: #111827;
}

.igp-lead-field input:focus {
	outline: 2px solid #2563eb;
	outline-offset: 1px;
	border-color: #2563eb;
}

.igp-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.igp-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 0.9em;
	margin: 4px 0 14px;
	cursor: pointer;
}

.igp-consent input {
	margin-top: 3px;
}

.igp-lead-msg {
	font-size: 0.92em;
	margin: 10px 0 0;
	color: #b91c1c;
}

.igp-lead-msg[data-igp-ok="1"] {
	color: #15803d;
}

/* On-screen copyright footer. */
.igp-wrap .igp-copyright { border-top: 1px solid #e2e8f0; margin: 1.5em 0 0; padding-top: 0.75em; text-align: center; color: #9ca3af; font-size: 0.8em; }

/* Share link + QR code. */
.igp-wrap .igp-share { display: flex; align-items: center; gap: 1em; flex-wrap: wrap; margin: 1em 0; padding: 1em 1.25em; border: 1px solid #e2e8f0; border-radius: 10px; background: #fbfdff; }
.igp-wrap .igp-qr { width: 132px; height: 132px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
.igp-wrap .igp-share-msg { font-weight: 600; color: #15803d; margin: 0; flex-basis: 100%; }
.igp-wrap .igp-share-url { flex: 1 1 100%; font-size: 0.8em; }
.igp-wrap .igp-ts-line { color: #6b7280; font-size: 0.8em; margin: 0.3em 0 0; }

/* Province dropdown on the lead form. */
.igp-wrap .igp-lead-field select.igp-lead-province {
	display: block;
	width: 100%;
	margin-top: 6px;
	padding: 9px 11px;
	font-size: 1em;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #fff;
	color: #111827;
}
.igp-wrap .igp-lead-field select.igp-lead-province:focus {
	outline: 2px solid #2563eb;
	outline-offset: 1px;
	border-color: #2563eb;
}
.igp-wrap .igp-province-note {
	font-size: 0.85em;
	color: #6b7280;
	margin: 6px 0 0;
}
.igp-wrap .igp-province-note[hidden] { display: none !important; }

/* Calculator version stamp. */
.igp-wrap .igp-version { text-align: center; color: #9ca3af; font-size: 0.78em; margin: 0.25em 0 0; }
