/* HubSpot form styles — all EverSmith landing pages.
   Requires "Set as raw HTML form" in HubSpot so this CSS can reach the form.

   Colors come from the brand skin on <body> (.b-uslawns, .b-kitchenguard …),
   set in Theme Options → Brand. Neutrals default to the brand's own tokens
   from eversmith.css; each brand sets its button / accent color below.
   Button colors keep white text at 4.5:1 or better, except Kitchen Guard,
   which uses the values from its design system as supplied. */

.hs-form {
  --form-accent: var(--brand, #24338a);   /* button, focus ring, radios, asterisks */
  --form-accent-hover: var(--brand-dk, #1a2566);
  --form-accent-text: #ffffff;
  --form-link: var(--brand-dk, #1a2566);
  --form-radius: 4px;            /* 999px for pill-shaped buttons */
  --form-text: var(--ink, #232a31);
  --form-muted: var(--text-mute, #5e6873);
  --form-border: var(--line, #d3d9dc);
  --form-field-bg: var(--surface-2, #f4f6f7);
  --form-error: #c43b2b;
}

/* Brand colors (primary brand color for buttons) */
.b-uslawns .hs-form      { --form-accent: #ad262b; --form-accent-hover: #8c1e22; --form-link: #8c1e22; }
.b-clintar .hs-form      { --form-accent: #008349; --form-accent-hover: #00713e; --form-link: #00713e; }
.b-millicare .hs-form    { --form-accent: #003bcb; --form-accent-hover: #071e51; --form-link: #003bcb; }
.b-prism .hs-form        { --form-accent: #00a0df; --form-accent-hover: #008ec6; --form-link: #00658f; }
.b-seals .hs-form        { --form-accent: #f73930; --form-accent-hover: #d32a22; --form-link: #007bbe; }
.b-tomplumber .hs-form   { --form-accent: #ed0180; --form-accent-hover: #c4106b; --form-link: #c4106b; }
.b-kitchenguard .hs-form {
  --form-accent: #599c1e;
  --form-accent-hover: #4c871a;
  --form-link: #4c871a;
  --form-text: #1d2327;
  --form-muted: #6b6f76;
  --form-border: #dcdee3;
  --form-field-bg: #f6f7f8;
}

/* 1. One font for everything (inherits the page font instead of Arial) */
.hs-form,
.hs-form * {
  font-family: inherit;
}

/* 2. Two-column rows: real gap between fields, one column on phones.
      !important is needed to beat HubSpot's own 50% column widths. */
.hs-form fieldset {
  max-width: none !important;
}
.hs-form fieldset.form-columns-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
}
.hs-form fieldset[class*="form-columns"] .hs-form-field {
  width: 100% !important;
  float: none !important;
  padding: 0 !important;
}
.hs-form fieldset[class*="form-columns"] .input {
  margin-right: 0 !important;
}
@media (max-width: 480px) {
  .hs-form fieldset.form-columns-2 {
    grid-template-columns: 1fr;
  }
}

/* 3. Even rhythm between fields */
.hs-form .hs-form-field {
  margin-bottom: 20px;
}
.hs-form .hs-form-field > label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--form-text);
}
.hs-form .hs-form-required {
  color: var(--form-accent);
}

/* 4. Inputs: consistent height and padding */
.hs-form input[type="text"],
.hs-form input[type="email"],
.hs-form input[type="tel"],
.hs-form input[type="number"],
.hs-form select {
  width: 100% !important;
  height: 44px;
  padding: 0 12px;
  font-size: 15px;
  color: var(--form-text);
  background: var(--form-field-bg);
  border: 1px solid var(--form-border);
  border-radius: 4px;
  box-sizing: border-box;
}
.hs-form input:focus,
.hs-form select:focus {
  outline: none;
  border-color: var(--form-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--form-accent) 35%, transparent);
}

/* 5. Radio and checkbox lists: aligned to the left edge */
.hs-form .hs-fieldtype-radio > label {
  line-height: 1.5;
  margin-bottom: 10px;
}
.hs-form .inputs-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.hs-form .inputs-list li {
  margin: 0 0 8px;
}
.hs-form .inputs-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
}
.hs-form .inputs-list input[type="radio"],
.hs-form .inputs-list input[type="checkbox"] {
  margin: 0;
  accent-color: var(--form-accent);
}

/* 6. Consent section (built-in HubSpot consent) */
.hs-form .legal-consent-container {
  margin-top: 8px;
}
.hs-form .legal-consent-container .hs-form-field,
.hs-form .legal-consent-container .inputs-list li {
  margin-bottom: 0;
}
/* clear, even gap between the SMS checkbox text and the "By submitting" text */
.hs-form .legal-consent-container .hs-richtext {
  margin-top: 16px;
}
.hs-form .legal-consent-container .hs-form-booleancheckbox-display {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--form-muted);
}
.hs-form .legal-consent-container input[type="checkbox"] {
  flex-shrink: 0;
  margin: 3px 0 0;
}
.hs-form .legal-consent-container .hs-form-booleancheckbox-display > span {
  margin: 0;
}
.hs-form .hs-richtext,
.hs-form .hs-richtext p,
.hs-form .legal-consent-container p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--form-muted);
  margin: 0;
}
.hs-form .hs-richtext a,
.hs-form .legal-consent-container a {
  color: var(--form-link);
}

/* 7. Error messages */
.hs-form .hs-error-msgs {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.hs-form .hs-error-msg,
.hs-form .hs-main-font-element {
  font-size: 12px;
  color: var(--form-error);
}

/* 8. Submit: brand color, right size, sensible gap above */
.hs-form .hs_submit {
  margin-top: 24px;
}
.hs-form .hs-button.primary {
  height: 48px;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--form-accent-text);
  background: var(--form-accent);
  border: 0;
  border-radius: var(--form-radius);
  cursor: pointer;
}
.hs-form .hs-button.primary:hover {
  background: var(--form-accent-hover);
}
