/* ============================================================
   Scoped CSS — HubSpot form embeds (catalog, dealer, contact, footer newsletter)
   Enqueued sitewide in functions.php (handle: tc-hs-forms) — the newsletter
   renders in the footer on every page. Brand-aligns HubSpot's inline markup.
   ============================================================ */

/* Layout: let fields use the full column, kill HubSpot's default caps */
.hs-form fieldset {
	max-width: none;
}

.hs-form .hs-form-field {
	margin-bottom: 1rem;
}

.hs-form fieldset.form-columns-2 .hs-form-field .hs-input {
	width: 95%;
}

/* Labels */
.hs-form label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	color: var(--tc-secondary);
	margin-bottom: 0.25rem;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

/* Inputs */
.hs-form .hs-input[type="text"],
.hs-form .hs-input[type="email"],
.hs-form .hs-input[type="tel"],
.hs-form .hs-input[type="number"],
.hs-form select.hs-input,
.hs-form textarea.hs-input {
	width: 100%;
	padding: 10px 14px;
	font-family: inherit;
	font-size: 15px;
	color: var(--tc-dark);
	background: #fff;
	border: 1px solid #cfd6da;
	border-radius: 0;
	transition: border-color 0.2s ease;
}

.hs-form .hs-input:focus {
	outline: none;
	border-color: var(--tc-accent);
	box-shadow: 0 0 0 3px rgba(69, 175, 228, 0.15);
}

.hs-form ::placeholder {
	color: #9aa6ad;
}

/* Checkbox / radio lists — stop theme list styles leaking in */
.hs-form ul,
.hs-form ul.inputs-list,
.hs-form ul.hs-error-msgs {
	list-style: none;
	padding-left: 0;
	margin: 0;
}

.hs-form .inputs-list li {
	margin-bottom: 0.35rem;
}

.hs-form .inputs-list input[type="checkbox"],
.hs-form .inputs-list input[type="radio"] {
	accent-color: var(--tc-accent);
	margin-right: 0.5rem;
	transform: translateY(1px);
}

.hs-form .inputs-list label {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
}

/* Legal consent copy */
.hs-form .legal-consent-container,
.hs-form .legal-consent-container p {
	font-size: 13px;
	color: var(--tc-secondary);
	line-height: 1.5;
}

.hs-form .legal-consent-container {
	margin: 0.75rem 0 1rem;
}

/* Validation + captcha */
.hs-form ul.hs-error-msgs label {
	color: #b32d26;
	font-size: 13px;
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
}

.hs-form .hs_recaptcha {
	margin-bottom: 1rem;
}

/* Submit — mirrors .tc-btn-accent */
.hs-form .hs-button {
	background-color: var(--tc-accent);
	color: #fff;
	border: 2px solid var(--tc-accent);
	border-radius: 0;
	padding: 8px 24px;
	font-family: inherit;
	font-weight: 600;
	font-size: 15px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.hs-form .hs-button:hover,
.hs-form .hs-button:focus {
	background-color: #fff;
	color: var(--tc-accent);
}

/* Success message */
.submitted-message {
	color: var(--tc-primary);
	font-weight: 600;
}

/* ── Footer newsletter (dark tc-bg-primary panel, #527891) ──
   NOTE: HubSpot currently renders this particular form inside its own iframe,
   so these rules do NOT reach it — the live styling comes from the
   `cssRequired` string in footer-widgets.php, which is injected into the
   iframe document. Keep the two in sync: these rules remain here so the
   panel still reads correctly if HubSpot ever serves the form inline again
   (as it does for the catalog/dealer/contact embeds).
   Copy is pure #fff, not a translucent white — on this panel rgba(255,255,255,.85)
   lands at ~3.6:1, below the 4.5:1 AA threshold, while #fff clears it at 4.72:1. */
#tc-footer-widgets .hs-form label,
#tc-footer-widgets .hs-form .legal-consent-container,
#tc-footer-widgets .hs-form .legal-consent-container p,
#tc-footer-widgets .hs-form .hs-form-booleancheckbox-display,
#tc-footer-widgets .hs-form .hs-form-booleancheckbox-display span {
	color: #fff;
}

#tc-footer-widgets .hs-form .legal-consent-container a,
#tc-footer-widgets .hs-form .hs-form-booleancheckbox-display a {
	color: #fff;
	text-decoration: underline;
}

/* Error copy: red-on-blue is the worst offender (~1.39:1), so it goes white and
   leans on weight + wording rather than hue to read as an error. */
#tc-footer-widgets .hs-form ul.hs-error-msgs label,
#tc-footer-widgets .hs-form .hs-error-msg {
	color: #fff;
	font-weight: 600;
}

#tc-footer-widgets .hs-form .hs-input {
	border-color: transparent;
}

#tc-footer-widgets .submitted-message {
	color: #fff;
}
