/**
 * Intelliguard brand styling for embedded HubSpot forms.
 *
 * Applies to HubSpot v2 embeds rendered as RAW HTML (each form needs
 * "Set as raw HTML form" enabled in HubSpot; iframe-rendered forms cannot be
 * styled from page CSS). Every rule is scoped under .hs-form / .hbspt-form so
 * nothing leaks into WordPress or Elementor styles.
 *
 * Brand: Navy #002D5C · Gold #B38B3F · Teal #00778B
 */

.hbspt-form,
.hs-form {
	--ig-hs-navy: #002d5c;
	--ig-hs-gold: #b38b3f;
	--ig-hs-teal: #00778b;
	--ig-hs-border: #c9d4e0;
	--ig-hs-ink: #1c2b3a;
	font-family: inherit;
	color: var(--ig-hs-ink);
}

/* ---- Layout: one field per row, consistent rhythm ---- */
.hs-form fieldset {
	max-width: 100% !important;
	margin: 0 !important;
}

/* HubSpot's default 2/3-column rows (e.g. first/last name) stack vertically. */
.hs-form .form-columns-2 .hs-form-field,
.hs-form .form-columns-3 .hs-form-field,
.hs-form .hs-form-field {
	float: none !important;
	width: 100% !important;
	margin: 0 0 1.15rem !important;
}

.hs-form .hs-form-field .input {
	margin-right: 0 !important;
}

/* ---- Labels ---- */
.hs-form label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--ig-hs-navy);
}

.hs-form label .hs-form-required {
	color: var(--ig-hs-gold);
	margin-left: 0.15rem;
}

/* ---- Inputs ---- */
.hs-form input[type="text"],
.hs-form input[type="email"],
.hs-form input[type="tel"],
.hs-form input[type="number"],
.hs-form input[type="date"],
.hs-form select,
.hs-form textarea {
	display: block;
	width: 100% !important;
	padding: 0.65rem 0.85rem;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.4;
	color: var(--ig-hs-ink);
	background: #fff;
	border: 1px solid var(--ig-hs-border);
	border-radius: 0.5rem;
	box-shadow: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.hs-form textarea {
	min-height: 7.5rem;
	resize: vertical;
}

.hs-form select {
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='m1 1 5 5 5-5' stroke='%23002D5C' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.85rem center;
	padding-right: 2.4rem;
}

/* Teal focus ring (never HubSpot's defaults) */
.hs-form input:focus,
.hs-form select:focus,
.hs-form textarea:focus {
	outline: none;
	border-color: var(--ig-hs-teal);
	box-shadow: 0 0 0 3px rgba(0, 119, 139, 0.18);
}

/* ---- Checkboxes / radios (consent lists etc.) ---- */
.hs-form .inputs-list,
.hs-form .inputs-list li {
	list-style: none !important;
	margin: 0;
	padding: 0;
}

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

.hs-form .hs-form-booleancheckbox label,
.hs-form .hs-form-checkbox label,
.hs-form .hs-form-radio label {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-weight: 400;
	color: var(--ig-hs-ink);
}

.hs-form input[type="checkbox"],
.hs-form input[type="radio"] {
	width: 1rem;
	height: 1rem;
	margin-top: 0.2rem;
	accent-color: var(--ig-hs-teal);
	flex-shrink: 0;
}

/* ---- Submit button: brand gold, not HubSpot orange ---- */
.hs-form .hs-button,
.hs-form input[type="submit"] {
	display: inline-block;
	width: 100%;
	padding: 0.8rem 1.6rem;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	text-shadow: none;
	color: #fff !important;
	background: var(--ig-hs-gold) !important;
	border: 0 !important;
	border-radius: 0.5rem;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease;
}

.hs-form .hs-button:hover,
.hs-form input[type="submit"]:hover {
	background: #9a7532 !important;
}

.hs-form .hs-button:focus-visible,
.hs-form input[type="submit"]:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(0, 119, 139, 0.35);
}

.hs-form .hs-button:active {
	transform: translateY(1px);
}

/* ---- Validation errors: brand gold accents, readable, no orange ---- */
.hs-form .hs-error-msgs,
.hs-form .hs-error-msgs li {
	list-style: none !important;
	margin: 0;
	padding: 0;
}

.hs-form .hs-error-msg,
.hs-form .hs-error-msgs label {
	display: block;
	margin-top: 0.3rem;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--ig-hs-gold);
}

.hs-form .hs-input.invalid.error {
	border-color: var(--ig-hs-gold);
	box-shadow: 0 0 0 3px rgba(179, 139, 63, 0.18);
}

.hs-form .hs_error_rollup {
	margin: 0 0 1rem;
	padding: 0.6rem 0.85rem;
	border: 1px solid var(--ig-hs-gold);
	border-radius: 0.5rem;
	background: rgba(179, 139, 63, 0.08);
}

.hs-form .hs_error_rollup label,
.hs-form .hs_error_rollup .hs-main-font-element {
	margin: 0;
	font-size: 0.85rem;
	color: var(--ig-hs-navy);
}

/* ---- Legal consent / GDPR fine print ---- */
.hs-form .legal-consent-container,
.hs-form .legal-consent-container p {
	font-size: 0.8rem;
	line-height: 1.5;
	color: #5a6a7a;
}

.hs-form .legal-consent-container a {
	color: var(--ig-hs-teal);
}

/* ---- Post-submit confirmation ---- */
.hbspt-form .submitted-message {
	padding: 1.25rem 1.4rem;
	border-left: 4px solid var(--ig-hs-teal);
	border-radius: 0.5rem;
	background: rgba(0, 119, 139, 0.07);
	font-size: 1rem;
	color: var(--ig-hs-navy);
}
