/* =============================================================
   HubSpot embedded-form skin — AG5 brand
   Tuned to match the live demo form on ag5.com/request-a-demo:
   soft grey-blue field fill, 46px-tall inputs, gold pill submit.

   Load AFTER the HubSpot embed loader. Scoped to .hs-form-frame so it
   only touches our embedded form, not the rest of the page.

   Usage (v2.js embed): mount into a div that carries the class, e.g.
     <div id="contact-form" class="hs-form-frame"></div>
     <script>hbspt.forms.create({ portalId, formId, region:"eu1",
                                   target:"#contact-form" });</script>
   ============================================================= */

.hs-form-frame {
  --hs-field-border: #CBD6E2;   /* ag5.com demo-form field border */
  --hs-field-bg: #F6F8FA;       /* ag5.com demo-form field fill   */
  font-family: var(--ag5-font, 'IBM Plex Sans', Helvetica, Arial, sans-serif);
  max-width: 480px;
}

.hs-form-frame .hs-form-field { margin-bottom: 18px; }

.hs-form-frame .hs-form-field > label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--ag5-text-dark, #1A1A2E);
  margin-bottom: 6px;
}
.hs-form-frame .hs-form-field > label .hs-form-required { color: #D74C5A; margin-left: 2px; }

/* Column layout — make the single-column fields (Business email, the select)
   line up exactly with the two-up First/Last name row. HubSpot's own stylesheet
   sizes the single-column inputs a touch under 100% of their wrapper, so they
   render ~21px narrower than the name row. We zero HubSpot's gutters, drive the
   2-up row with flexbox + a fixed gap, and force every control to fill its field
   (with !important to beat HubSpot's specificity) so all rows span the same width. */
.hs-form-frame fieldset { max-width: none !important; }
.hs-form-frame .hs-form-field .input { margin: 0 !important; width: 100% !important; }

.hs-form-frame .hs-input,
.hs-form-frame input[type="text"],
.hs-form-frame input[type="email"],
.hs-form-frame input[type="tel"],
.hs-form-frame input[type="number"],
.hs-form-frame select,
.hs-form-frame textarea { width: 100% !important; }

.hs-form-frame fieldset.form-columns-2 { display: flex; gap: 16px; }
.hs-form-frame fieldset.form-columns-2 .hs-form-field {
  width: 50% !important;
  float: none !important;
  padding: 0 !important;
}
.hs-form-frame fieldset.form-columns-1 .hs-form-field {
  width: 100% !important;
  float: none !important;
  padding: 0 !important;
}

.hs-form-frame input[type="text"],
.hs-form-frame input[type="email"],
.hs-form-frame input[type="tel"],
.hs-form-frame input[type="number"],
.hs-form-frame select,
.hs-form-frame textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 15px;
  font-size: 16px;
  font-family: inherit;
  color: #33475B;
  background: var(--hs-field-bg);
  border: 1px solid var(--hs-field-border);
  border-radius: var(--ag5-radius, 8px);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.hs-form-frame input[type="text"],
.hs-form-frame input[type="email"],
.hs-form-frame input[type="tel"],
.hs-form-frame input[type="number"],
.hs-form-frame select { height: 46px; padding-top: 0; padding-bottom: 0; }

.hs-form-frame textarea { min-height: 110px; resize: vertical; }

.hs-form-frame ::placeholder { color: #99A9BA; }

.hs-form-frame input:focus,
.hs-form-frame select:focus,
.hs-form-frame textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--ag5-blue, #0063E1);
  box-shadow: 0 0 0 3px rgba(0, 99, 225, 0.12);
}

/* Validation errors */
.hs-form-frame .hs-error-msg,
.hs-form-frame .hs-error-msgs label {
  color: #D74C5A;
  font-size: 13px;
  margin-top: 4px;
}

/* Submit button → AG5 gold CTA (matches ag5.com demo form) */
.hs-form-frame .hs-button,
.hs-form-frame input[type="submit"] {
  display: inline-block;
  width: 100%;
  margin-top: 22px;
  padding: 15px 24px;
  font-size: 18px;
  font-weight: 600;
  font-family: inherit;
  color: #000;
  background: var(--ag5-gold, #FFD76D);
  border: 1px solid transparent;
  border-radius: var(--ag5-radius-pill, 999px);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.05s ease;
}
.hs-form-frame .hs-button:hover,
.hs-form-frame input[type="submit"]:hover { background: var(--ag5-gold-hover, #F5C84A); }
.hs-form-frame .hs-button:active { transform: translateY(1px); }

/* Consent / legal text HubSpot renders under the form */
.hs-form-frame .legal-consent-container,
.hs-form-frame .hs-richtext {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ag5-text-light, #5B6E7F);
}
.hs-form-frame .legal-consent-container a,
.hs-form-frame .hs-richtext a { color: var(--ag5-blue, #0063E1); }
