/* ---- Product nudges ---- */
.tf-nudge {
	font-size: 0.85em;
	margin: 4px 0;
	color: #2e7d32;
}
.tf-nudge__tc {
	text-decoration: underline;
	font-size: 0.9em;
}

/* ---- Payment box ---- */
.tf-payment-box .tf-payment-status__done {
	color: #2e7d32;
	font-weight: 600;
}

/* ---- Modal ---- */
body.tf-modal-open {
	overflow: hidden;
}
.tf-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
}
.tf-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}
.tf-modal__dialog {
	position: relative;
	background: #fff;
	max-width: 720px;
	width: calc(100% - 32px);
	max-height: calc(100vh - 64px);
	margin: 32px auto;
	border-radius: 6px;
	padding: 24px;
	display: flex;
	flex-direction: column;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.tf-modal__dialog h2 {
	margin: 0 0 4px;
	font-size: 1.3em;
}
.tf-modal__intro {
	margin: 0 0 12px;
	font-size: 0.9em;
	opacity: 0.8;
}
.tf-modal__close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: 0;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	padding: 4px;
}
.tf-modal__body {
	overflow-y: auto;
	flex: 1 1 auto;
	padding-right: 6px;
}
.tf-modal__body fieldset {
	border: 1px solid #e2e2e2;
	border-radius: 4px;
	margin: 0 0 16px;
	padding: 12px 14px;
}
.tf-modal__body legend {
	padding: 0 6px;
	font-weight: 600;
	font-size: 0.95em;
}
.tf-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 16px;
}
.tf-grid label {
	display: flex;
	flex-direction: column;
	font-size: 0.85em;
	gap: 3px;
}
.tf-grid input,
.tf-grid select {
	width: 100%;
	padding: 7px 9px;
	border: 1px solid #cfcfcf;
	border-radius: 4px;
	font-size: 14px;
}
.tf-grid small {
	font-size: 0.85em;
	opacity: 0.7;
}
/* Error state — deliberately heavy-handed so theme input styles can't
   silently override it and leave "highlighted" fields looking normal. */
.tf-modal .tf-grid input.tf-error,
.tf-modal .tf-grid select.tf-error {
	border: 1px solid #b32d2e !important;
	background-color: #fff5f5 !important;
	box-shadow: 0 0 0 2px rgba(179, 45, 46, 0.35) !important;
}
.tf-modal .tf-grid label.tf-error-label {
	color: #b32d2e;
	font-weight: 600;
}
.tf-term-estimate {
	color: #2e7d32;
	font-weight: 600;
}
.tf-modal__errors {
	background: #fff5f5;
	border: 1px solid #b32d2e;
	color: #b32d2e;
	border-radius: 4px;
	padding: 8px 12px;
	margin-bottom: 12px;
	font-size: 0.9em;
	max-height: 130px;
	overflow-y: auto;
}
.tf-modal__errors p {
	margin: 0 0 4px;
	font-weight: 600;
}
.tf-modal__errors ul {
	margin: 0 0 0 18px;
	padding: 0;
}
.tf-modal__errors li {
	list-style: disc;
	margin: 2px 0;
}
.tf-modal__tc {
	margin: 10px 0 0;
	font-size: 0.85em;
}
.tf-modal__footer {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding-top: 16px;
	border-top: 1px solid #eee;
	margin-top: 8px;
}

@media (max-width: 640px) {
	.tf-grid {
		grid-template-columns: 1fr;
	}
	.tf-modal__dialog {
		margin: 12px auto;
		max-height: calc(100vh - 24px);
		padding: 16px;
	}
	.tf-modal__footer {
		flex-direction: column-reverse;
	}
	.tf-modal__footer .button {
		width: 100%;
		text-align: center;
	}
}

/* ---- Cart qualification notice ---- */
.tf-cart-notice {
	padding: 10px 14px;
	border-radius: 4px;
	margin: 0 0 16px;
	font-size: 0.95em;
}
.tf-cart-notice--ok {
	background: #edf7ed;
	border: 1px solid #2e7d32;
	color: #1e5a22;
}
.tf-cart-notice--info {
	background: #eef4fb;
	border: 1px solid #2271b1;
	color: #1a4f7d;
}
.tf-cart-notice--muted {
	background: #f6f6f6;
	border: 1px solid #c3c4c7;
	color: #50575e;
}
.tf-cart-notice a {
	text-decoration: underline;
}

/* ---- Returning-customer notice ---- */
.tf-returning-notice {
	background: #fdf6e7;
	border: 1px solid #b8860b;
	color: #6d5107;
	border-radius: 4px;
	padding: 8px 12px;
	margin: 8px 0;
	font-size: 0.9em;
}

/* ---- Pending-application notice ---- */
.tf-pending-notice {
	background: #eef4fb;
	border: 1px solid #2271b1;
	color: #1a4f7d;
	border-radius: 4px;
	padding: 10px 14px;
	margin: 8px 0;
	font-size: 0.9em;
}

/* ============================================================
 * Branding, nudges, About/FAQ, calculator popup
 * ============================================================ */

:root {
	--tf-brand: #007EBD;
}

/* ---- Enhanced nudge (bigger + brand color) ---- */
.tf-nudge {
	margin: 8px 0;
	line-height: 1.35;
}
.tf-nudge__link,
.tf-nudge__text {
	font-size: 1.15em;
	font-weight: 600;
	color: var(--tf-brand);
	text-decoration: none;
}
.tf-nudge__link:hover {
	text-decoration: underline;
}
.tf-nudge__more {
	font-size: 0.85em;
	font-weight: 500;
	opacity: 0.75;
	margin-left: 4px;
}
.tf-nudge__tc {
	font-size: 0.85em;
	text-decoration: underline;
	margin-left: 6px;
}
.tf-nudge__disclaimer {
	font-size: 0.75em;
	line-height: 1.35;
	color: #666;
	margin-top: 4px;
	max-width: 60ch;
}

/* ---- Payment method (checkout) ---- */
.tf-pay-logo {
	margin: 4px 0 8px;
}
.tf-pay-logo img {
	max-height: 32px;
	max-width: 160px;
	width: auto;
	height: auto;
}
.tf-payment-disclaimer {
	font-size: 0.8em;
	color: #666;
	margin: 6px 0 0;
	line-height: 1.4;
}

/* ---- Application modal disclaimer + logo ---- */
.tf-modal__logo {
	margin: -4px 0 8px;
}
.tf-modal__logo img {
	max-height: 36px;
	max-width: 180px;
}
.tf-modal__disclaimer {
	background: #f6f9fc;
	border-left: 3px solid var(--tf-brand);
	padding: 8px 12px;
	font-size: 0.8em;
	line-height: 1.4;
	color: #444;
	margin: 4px 0 12px;
}

/* ---- About / FAQ ---- */
.tf-about {
	margin: 32px 0;
	padding: 20px 22px;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	background: #fafbfd;
}
.tf-about__head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 10px;
}
.tf-about__logo {
	max-height: 42px;
	max-width: 180px;
	width: auto;
	height: auto;
}
.tf-about__title {
	margin: 0;
	font-size: 1.25em;
	color: var(--tf-brand);
}
.tf-about__body {
	color: #333;
	line-height: 1.55;
}
.tf-about__faq-link {
	margin: 12px 0 0;
	font-weight: 600;
}
.tf-about__faq-link a {
	color: var(--tf-brand);
	text-decoration: underline;
}

/* ---- Calculator popup ---- */
.tf-calc-modal__dialog {
	max-width: 520px;
}
.tf-calc__head {
	text-align: center;
	padding-bottom: 8px;
	border-bottom: 1px solid #eee;
	margin-bottom: 14px;
}
.tf-calc__logo {
	max-height: 40px;
	max-width: 180px;
	margin: 4px 0;
}
.tf-calc__head h2 {
	margin: 4px 0 2px;
	color: var(--tf-brand);
	font-size: 1.3em;
}
.tf-calc__lede {
	margin: 0;
	font-size: 0.85em;
	color: #666;
}
.tf-calc__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 16px;
	margin-bottom: 14px;
}
.tf-calc__grid label {
	display: flex;
	flex-direction: column;
	font-size: 0.85em;
	gap: 3px;
}
.tf-calc__grid input,
.tf-calc__grid select {
	padding: 7px 9px;
	border: 1px solid #cfcfcf;
	border-radius: 4px;
	font-size: 14px;
	width: 100%;
}
.tf-calc__result {
	background: #f6f9fc;
	border-radius: 6px;
	padding: 12px 14px;
	margin-bottom: 12px;
}
.tf-calc__result-row {
	display: flex;
	justify-content: space-between;
	padding: 4px 0;
	font-size: 0.95em;
}
.tf-calc__result-row--primary {
	border-top: 1px solid #dfe6ee;
	margin-top: 4px;
	padding-top: 8px;
	font-size: 1.1em;
	font-weight: 600;
	color: var(--tf-brand);
}
.tf-calc__disclaimer {
	font-size: 0.78em;
	color: #666;
	line-height: 1.4;
	margin: 4px 0;
}
.tf-calc__tc {
	margin: 6px 0 0;
	font-size: 0.85em;
}
@media (max-width: 640px) {
	.tf-calc__grid {
		grid-template-columns: 1fr;
	}
}

/* ---- Payment method: extra text ---- */
.tf-pay-extra {
	font-size: 0.9em;
	color: #333;
	margin: 6px 0;
}

/* ---- Calculator CTA button ---- */
.tf-calc-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	border: 1px solid var(--tf-brand);
	background: var(--tf-brand);
	color: #fff;
	border-radius: 4px;
	font-weight: 600;
	font-size: 0.95em;
	cursor: pointer;
	margin: 12px 0;
	transition: opacity 0.15s;
}
.tf-calc-btn:hover,
.tf-calc-btn:focus {
	opacity: 0.9;
	color: #fff;
	text-decoration: none;
}
.tf-calc-btn__icon {
	display: inline-flex;
	line-height: 0;
}

/* ---- Live status pre-check warning (email blur → open loan) ---- */
.tf-modal__status-warning {
	background: #fdf6e7;
	border: 1px solid #b8860b;
	color: #6d5107;
	border-radius: 4px;
	padding: 8px 12px;
	margin-bottom: 12px;
	font-size: 0.9em;
	font-weight: 500;
}

/* ---- Application popup: How Financing Works (free-form HTML) ---- */
.tf-modal__howitworks {
	background: #f0f7fb;
	border-left: 3px solid var(--tf-brand);
	padding: 12px 14px 12px 16px;
	border-radius: 4px;
	margin: 4px 0 14px;
	color: #1a4f7d;
	font-size: 0.9em;
	line-height: 1.5;
}
.tf-modal__howitworks :first-child { margin-top: 0; }
.tf-modal__howitworks :last-child  { margin-bottom: 0; }
.tf-modal__howitworks h1,
.tf-modal__howitworks h2,
.tf-modal__howitworks h3,
.tf-modal__howitworks h4,
.tf-modal__howitworks h5 {
	margin: 0 0 6px;
	color: #0b3a66;
	font-size: 1em;
	font-weight: 700;
}
.tf-modal__howitworks p { margin: 4px 0; }
.tf-modal__howitworks ol,
.tf-modal__howitworks ul {
	margin: 4px 0;
	padding-left: 22px;
}
.tf-modal__howitworks li { margin: 3px 0; }
.tf-modal__howitworks a {
	color: var(--tf-brand);
	text-decoration: underline;
}
