/**
 * Cost of buying calculator (includes/calculator.php). Inputs on the left in three numbered
 * groups, results on the right in a sticky card. Theme tokens only. Mobile first; 900 px.
 */

.seymour-calc {
	display: grid;
	gap: var(--space-6, 2rem);
	grid-template-columns: minmax(0, 1fr);
	margin: var(--space-6, 2rem) 0;
}

.seymour-calc__group {
	border-top: 1px solid var(--line, #d9dde3);
	padding-top: var(--space-4, 1.25rem);
}

.seymour-calc__group + .seymour-calc__group {
	margin-top: var(--space-5, 1.5rem);
}

.seymour-calc__title {
	align-items: baseline;
	display: flex;
	font-family: var(--font-serif, Georgia, serif);
	font-size: var(--fs-h3, 1.5rem);
	gap: var(--space-3, 0.75rem);
	margin: 0 0 var(--space-2, 0.5rem);
}

.seymour-calc__step {
	color: var(--gold-800, #8a6d2a);
	font-family: var(--font-sans, sans-serif);
	font-size: var(--fs-meta, 0.9rem);
	font-weight: var(--weight-semibold, 600);
	letter-spacing: var(--tracking-eyebrow, 0.08em);
}

.seymour-calc__note {
	color: var(--grey-600, #5b6470);
	font-size: var(--fs-meta, 0.9rem);
	margin: 0 0 var(--space-4, 1.25rem);
}

.seymour-calc__fields {
	display: grid;
	gap: var(--space-4, 1.25rem);
	grid-template-columns: minmax(0, 1fr);
}

.seymour-calc__field {
	display: flex;
	flex-direction: column;
	gap: var(--space-1, 0.25rem);
}

.seymour-calc__field label {
	font-size: var(--fs-meta, 0.9rem);
	font-weight: var(--weight-medium, 500);
}

.seymour-calc__hint {
	color: var(--grey-600, #5b6470);
	font-size: 0.85em;
	font-weight: var(--weight-regular, 400);
}

.seymour-calc__input {
	align-items: center;
	display: flex;
}

.seymour-calc__input .seymour-calc__affix {
	background: var(--cream, #f6f3ee);
	border: 1px solid var(--line, #d9dde3);
	border-right: 0;
	color: var(--grey-600, #5b6470);
	line-height: 1;
	padding: 0 var(--space-3, 0.75rem);
	min-height: var(--input-height, 3rem);
	display: inline-flex;
	align-items: center;
}

.seymour-calc__input .seymour-calc__affix--after {
	border-left: 0;
	border-right: 1px solid var(--line, #d9dde3);
}

.seymour-calc input[type="text"],
.seymour-calc input[type="number"],
.seymour-calc select {
	min-height: var(--input-height, 3rem);
	width: 100%;
}

.seymour-calc__input input {
	min-width: 0;
}

.seymour-calc__choice {
	align-items: center;
	display: flex;
	gap: var(--space-2, 0.5rem);
}

.seymour-calc__choice input {
	height: 1.25rem;
	width: 1.25rem;
}

/* Down payment: one of the two fields shows, by the mode. */
.seymour-calc__field--down-dollars,
.seymour-calc__field--down-percent {
	display: none;
}

.seymour-calc:not(.seymour-calc--down-percent) .seymour-calc__field--down-dollars,
.seymour-calc--down-percent .seymour-calc__field--down-percent {
	display: flex;
}

/* Condo-only fields. */
.seymour-calc__field--condo {
	display: none;
}

.seymour-calc--condo .seymour-calc__field--condo {
	display: flex;
}

/* The fine-tune section folds away. */
.seymour-calc__toggle {
	background: none;
	border: 0;
	color: var(--navy, #1e3a5f);
	cursor: pointer;
	font: inherit;
	padding: 0;
	text-decoration: underline;
	text-decoration-color: var(--gold-500, #c9a84c);
	text-underline-offset: 0.2em;
}

.seymour-calc__toggle[aria-expanded="true"]::after {
	content: " \2191";
}

.seymour-calc__toggle[aria-expanded="false"]::after {
	content: " \2193";
}

.seymour-calc__sub {
	font-family: var(--font-sans, sans-serif);
	font-size: var(--fs-meta, 0.9rem);
	font-weight: var(--weight-semibold, 600);
	letter-spacing: var(--tracking-eyebrow, 0.08em);
	margin: var(--space-4, 1.25rem) 0 var(--space-2, 0.5rem);
	text-transform: uppercase;
}

/* Results. */
.seymour-calc__results {
	background: var(--navy, #1e3a5f);
	color: var(--white, #fff);
	padding: var(--space-5, 1.5rem);
}

.seymour-calc__headline {
	border-bottom: 1px solid rgba(255, 255, 255, 0.25);
	margin-bottom: var(--space-4, 1.25rem);
	padding-bottom: var(--space-4, 1.25rem);
}

.seymour-calc__headline-label {
	color: var(--gold-200, #e9dcb8);
	font-size: var(--fs-meta, 0.9rem);
	letter-spacing: var(--tracking-eyebrow, 0.08em);
	margin: 0 0 var(--space-1, 0.25rem);
	text-transform: uppercase;
}

.seymour-calc__headline-value {
	font-family: var(--font-serif, Georgia, serif);
	font-size: var(--fs-h1, 2.5rem);
	line-height: 1.1;
	margin: 0;
}

.seymour-calc__headline-note {
	color: var(--gold-200, #e9dcb8);
	font-size: var(--fs-meta, 0.9rem);
	margin: var(--space-1, 0.25rem) 0 0;
}

.seymour-calc__rows {
	list-style: none;
	margin: 0 0 var(--space-4, 1.25rem);
	padding: 0;
}

.seymour-calc__rows li {
	display: flex;
	gap: var(--space-3, 0.75rem);
	justify-content: space-between;
	padding: var(--space-1, 0.25rem) 0;
}

.seymour-calc__rows li.seymour-calc__row--head {
	color: var(--gold-200, #e9dcb8);
	font-size: var(--fs-meta, 0.9rem);
	letter-spacing: var(--tracking-eyebrow, 0.08em);
	margin-top: var(--space-3, 0.75rem);
	text-transform: uppercase;
}

.seymour-calc__rows li.seymour-calc__row--total {
	border-top: 1px solid rgba(255, 255, 255, 0.25);
	font-weight: var(--weight-semibold, 600);
	margin-top: var(--space-1, 0.25rem);
	padding-top: var(--space-2, 0.5rem);
}

.seymour-calc__rows .seymour-calc__row--selling,
.seymour-calc__rows .seymour-calc__row--cmhc {
	display: none;
}

.seymour-calc--selling .seymour-calc__rows .seymour-calc__row--selling,
.seymour-calc--cmhc .seymour-calc__rows .seymour-calc__row--cmhc {
	display: flex;
}

.seymour-calc__rows small {
	color: var(--gold-200, #e9dcb8);
	display: block;
	font-size: 0.85em;
}

.seymour-calc__actions {
	border-top: 1px solid rgba(255, 255, 255, 0.25);
	margin-top: var(--space-4, 1.25rem);
	padding-top: var(--space-4, 1.25rem);
}

.seymour-calc__actions p {
	margin: 0 0 var(--space-3, 0.75rem);
}

.seymour-calc__actions .seymour-button {
	width: 100%;
}

.seymour-calc__results a:not(.seymour-button) {
	color: var(--white, #fff);
	text-decoration-color: var(--gold-200, #e9dcb8);
}

.seymour-calc__disclaimer {
	color: var(--grey-600, #5b6470);
	font-size: var(--fs-meta, 0.9rem);
}

@media (min-width: 600px) {
	.seymour-calc__fields {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.seymour-calc__field--wide {
		grid-column: 1 / -1;
	}
}

@media (min-width: 900px) {
	.seymour-calc {
		align-items: start;
		grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr);
	}

	.seymour-calc__results {
		position: sticky;
		top: calc(var(--header-height, 80px) + var(--space-4, 1.25rem));
	}
}

/* Our theme colours (Kaz, October 26, 2026): the summary in the deep navy with the gold edge,
 * gold labels and totals, a gold button, and gold step numbers in the form. */
.seymour-calc__results {
	background: var(--footer-bg, #0a1628);
	border-top: 3px solid var(--footer-gold, #c9a84c);
}

.seymour-calc__headline-label,
.seymour-calc__headline-note,
.seymour-calc__rows li.seymour-calc__row--head,
.seymour-calc__rows small {
	color: var(--footer-gold, #c9a84c);
}

.seymour-calc__headline,
.seymour-calc__rows li.seymour-calc__row--total,
.seymour-calc__actions {
	border-color: rgba(201, 168, 76, 0.4);
}

.seymour-calc__rows li.seymour-calc__row--total span:last-child,
.seymour-calc__headline-value {
	color: var(--white, #fff);
}

.seymour-calc__rows li.seymour-calc__row--total {
	color: var(--footer-gold, #c9a84c);
}

.seymour-calc__results .seymour-calc__actions a.seymour-calc__consult {
	background: var(--footer-gold, #c9a84c);
	border-color: var(--footer-gold, #c9a84c);
	color: var(--footer-bg, #0a1628);
}

.seymour-calc__results .seymour-calc__actions a.seymour-calc__consult:hover {
	background: var(--gold-hover, #b8963f);
	color: var(--footer-bg, #0a1628);
}

.seymour-calc__step {
	background: var(--footer-bg, #0a1628);
	color: var(--footer-gold, #c9a84c);
}

.seymour-calc__title {
	color: var(--navy, #1e3a5f);
}

/* Each part (1 The purchase, 2 Selling, 3 Financing) in its own box, the number in a navy
 * circle with gold (Kaz, October 26, 2026). */
.seymour-calc__group {
	background: var(--white, #fff);
	border: 1px solid var(--line, #dde3ea);
	border-top: 3px solid var(--footer-gold, #c9a84c);
	margin: 0 0 var(--space-5, 1.5rem);
	padding: var(--space-5, 1.5rem);
}

.seymour-calc__title {
	align-items: center;
	display: flex;
	gap: var(--space-3, 0.75rem);
	margin-top: 0;
}

.seymour-calc__step {
	align-items: center;
	background: var(--footer-bg, #0a1628);
	border-radius: 50%;
	color: var(--footer-gold, #c9a84c);
	display: inline-flex;
	flex: none;
	font-family: var(--font-serif, Georgia, serif);
	font-size: 18px;
	height: 38px;
	justify-content: center;
	letter-spacing: 0;
	width: 38px;
}

/* The numbers reversed: navy on a gold circle (Kaz, October 26, 2026). */
.seymour-calc .seymour-calc__step {
	background: var(--footer-gold, #c9a84c);
	color: var(--footer-bg, #0a1628);
}

.seymour-calc__inputs .seymour-calc__disclaimer {
	margin: 0;
}

/* Paired fields line up along their boxes, however long a label runs (Kaz, October 26, 2026). */
.seymour-calc .seymour-calc__fields {
	align-items: end;
}

.seymour-calc .seymour-calc__fields > .seymour-calc__field--wide,
.seymour-calc .seymour-calc__fields > .seymour-calc__check {
	align-self: start;
}

/* "Fine-tune closing costs and monthly expenses" as a prominent drop-down bar (Kaz, October 26, 2026). */
.seymour-calc .seymour-calc__toggle {
	align-items: center;
	background: var(--cream, #f6f3ee);
	border: 1px solid var(--line, #dde3ea);
	border-left: 3px solid var(--footer-gold, #c9a84c);
	color: var(--footer-bg, #0a1628);
	display: flex;
	font-weight: var(--weight-semibold, 600);
	justify-content: space-between;
	margin-top: var(--space-4, 1.25rem);
	padding: var(--space-3, 0.75rem) var(--space-4, 1.25rem);
	text-align: left;
	text-decoration: none;
	transition: background 0.2s ease;
	width: 100%;
}

.seymour-calc .seymour-calc__toggle:hover,
.seymour-calc .seymour-calc__toggle:focus-visible {
	background: #efe9dd;
}

.seymour-calc .seymour-calc__toggle::after,
.seymour-calc .seymour-calc__toggle[aria-expanded="true"]::after,
.seymour-calc .seymour-calc__toggle[aria-expanded="false"]::after {
	align-items: center;
	background: var(--footer-gold, #c9a84c);
	border-radius: 50%;
	color: var(--footer-bg, #0a1628);
	content: "\25BE";
	display: inline-flex;
	flex: none;
	font-size: 16px;
	height: 28px;
	justify-content: center;
	margin-left: var(--space-3, 0.75rem);
	transition: transform 0.2s ease;
	width: 28px;
}

.seymour-calc .seymour-calc__toggle[aria-expanded="true"]::after {
	transform: rotate(180deg);
}

/* "Down payment plus closing costs, less equity from your sale" on one line (Kaz, October 26, 2026). */
.seymour-calc .seymour-calc__headline-note {
	font-size: 12px;
	letter-spacing: 0;
	white-space: nowrap;
}

@media (max-width: 420px) {
	.seymour-calc .seymour-calc__headline-note {
		white-space: normal;
	}
}

/* "Ready to make it real?" centred, the sentence on its own line (Kaz, October 26, 2026). */
.seymour-calc .seymour-calc__actions {
	text-align: center;
}

/* "Ready to make it real?" in gold (Kaz, October 26, 2026). */
.seymour-calc .seymour-calc__actions p strong {
	color: var(--footer-gold, #c9a84c);
}
