/* =============================================================================
   HubSpot Forms — Site-wide Styling
   =============================================================================
   Styles for embedded HubSpot forms (class `.hbspt-form`).
   Targets field layout, spacing, and responsive behavior.
   ============================================================================= */

/* Form container baseline */
.hbspt-form {
	width: 100%;
}

/* Form fieldset (HubSpot wraps fields in fieldsets) */
.hbspt-form fieldset {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	border: none;
	padding: 0;
	margin: 0;
	margin-bottom: 16px;
}

/* Single column fields */
.hbspt-form .hs-form-field {
	display: flex;
	flex-direction: column;
	margin-bottom: 0;
}

/* Span the full width for full-width fields (name, email, message, etc.) */
.hbspt-form .hs-form-field.hs_firstname,
.hbspt-form .hs-form-field.hs_lastname,
.hbspt-form .hs-form-field.hs_email,
.hbspt-form .hs-form-field.hs_message,
.hbspt-form .hs-form-field.hs_phone,
.hbspt-form .hs-form-field.hs_country,
.hbspt-form .hs-form-field.hs_lifecyclestage {
	grid-column: 1 / -1;
}

/* Label styling */
.hbspt-form label {
	display: block;
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 6px;
	color: #1a1e22;
}

.hbspt-form label.hs-form-required::after {
	content: ' *';
	color: #d32f2f;
}

/* Input, textarea, select styling */
.hbspt-form input[type="text"],
.hbspt-form input[type="email"],
.hbspt-form input[type="tel"],
.hbspt-form input[type="number"],
.hbspt-form input[type="date"],
.hbspt-form select,
.hbspt-form textarea {
	width: 100%;
	padding: 12px;
	font-size: 14px;
	border: 1px solid #a7b1c1;
	border-radius: 6px;
	font-family: inherit;
	background-color: #ffffff;
	color: #1a1e22;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	box-sizing: border-box;
}

/* Focus state */
.hbspt-form input[type="text"]:focus,
.hbspt-form input[type="email"]:focus,
.hbspt-form input[type="tel"]:focus,
.hbspt-form input[type="number"]:focus,
.hbspt-form input[type="date"]:focus,
.hbspt-form select:focus,
.hbspt-form textarea:focus {
	outline: none;
	border-color: #0e60c3;
	box-shadow: 0 0 0 3px rgba(14, 96, 195, 0.1);
}

/* Placeholder styling */
.hbspt-form input::placeholder,
.hbspt-form textarea::placeholder {
	color: #7b8ba1;
}

/* Textarea specific */
.hbspt-form textarea {
	resize: vertical;
	min-height: 100px;
}

/* Button styling */
.hbspt-form .hs-button {
	display: inline-block;
	padding: 12px 24px;
	font-size: 16px;
	font-weight: 600;
	background-color: #0e60c3;
	color: #ffffff;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-top: 8px;
}

.hbspt-form .hs-button:hover {
	background-color: #0b4d9c;
	transform: translateY(-2px);
}

.hbspt-form .hs-button:active {
	transform: translateY(0);
}

/* Error styling */
.hbspt-form .hs-form-field.error input,
.hbspt-form .hs-form-field.error select,
.hbspt-form .hs-form-field.error textarea {
	border-color: #d32f2f;
}

.hbspt-form .hs-error-msgs {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: #d32f2f;
}

/* Success message */
.hbspt-form .hs-form-submitted-message {
	padding: 12px 16px;
	background-color: #e8f5e9;
	border-left: 4px solid #4caf50;
	border-radius: 4px;
	color: #2e7d32;
	font-size: 14px;
	margin-bottom: 16px;
}

/* Responsive: stack to 1 column on tablet and mobile */
@media (max-width: 767px) {
	.hbspt-form fieldset {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.hbspt-form .hs-form-field.hs_firstname,
	.hbspt-form .hs-form-field.hs_lastname,
	.hbspt-form .hs-form-field.hs_email,
	.hbspt-form .hs-form-field.hs_message,
	.hbspt-form .hs-form-field.hs_phone,
	.hbspt-form .hs-form-field.hs_country,
	.hbspt-form .hs-form-field.hs_lifecyclestage {
		grid-column: auto;
	}
}

/* Disable browser autocomplete styling if needed */
.hbspt-form input:-webkit-autofill,
.hbspt-form input:-webkit-autofill:hover,
.hbspt-form input:-webkit-autofill:focus {
	-webkit-box-shadow: 0 0 0 1000px white inset !important;
	-webkit-text-fill-color: #1a1e22 !important;
}
