/* Toqio brand palette.
   --toqio-blue:    #09446B   (primary text, link)
   --toqio-pink:    #F22AA2   (primary CTA — matches Book a demo etc.)
   --toqio-pink-2:  #d6209a   (pink hover)
   --hs-text:       #33475B   (HubSpot-style text — matches prod form)
   --hs-input-bg:   #F5F8FA   (HubSpot-style input background)
   --hs-input-bd:   #CBD6E2   (HubSpot-style input border)
*/
.toqio-form {
  display: grid;
  gap: 1rem;
  margin: 0;
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #33475B;
}

/* HubSpot-style fieldset grid layout — mirrors prod form-columns-N classes. */
.toqio-form fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.toqio-form fieldset.form-columns-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1rem;
  row-gap: 1rem;
}
.toqio-form fieldset.form-columns-1 {
  display: block;
}
.toqio-form fieldset.form-columns-3 {
  /* Used by prod to wrap hidden UTM fields — keep them collapsed. */
  display: none;
}
@media (max-width: 600px) {
  .toqio-form fieldset.form-columns-2 {
    grid-template-columns: 1fr;
  }
}

.toqio-form .field {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.toqio-form label {
  font-family: helvetica, "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #33475B;
  margin-bottom: 4px;
  line-height: 1.4;
}

.toqio-form input,
.toqio-form textarea,
.toqio-form select {
  width: 100%;
  box-sizing: border-box;
  height: 40px;
  padding: 0 15px;
  border: 1px solid #CBD6E2;
  border-radius: 50px;
  background: #F5F8FA;
  color: #33475B;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
}
.toqio-form select {
  /* Down-chevron caret. */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%2333475B' d='M1.41 0L6 4.58 10.59 0 12 1.41 6 7.41 0 1.41z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
/* Dim text when the placeholder option (empty value) is still selected. */
.toqio-form select:has(option[value=""]:checked) { color: rgba(51, 71, 91, 0.55); }
.toqio-form textarea {
  height: auto;
  min-height: 120px;
  padding: 12px 15px;
  border-radius: 14px;
  resize: vertical;
}
.toqio-form input[type="checkbox"] {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid #CBD6E2;
  border-radius: 3px;
  background: #fff;
  appearance: auto;
  -webkit-appearance: auto;
  accent-color: #F22AA2;
}
.toqio-form input::placeholder,
.toqio-form textarea::placeholder { color: rgba(51, 71, 91, 0.55); }
.toqio-form input:focus,
.toqio-form textarea:focus,
.toqio-form select:focus {
  outline: none;
  border-color: #09446B;
  box-shadow: 0 0 0 2px rgba(9, 68, 107, 0.12);
}

/* Rich-text helper (e.g. "* mandatory field"). */
.toqio-form-richtext {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 12px;
  color: #33475B;
  text-align: right;
  margin: 0;
  line-height: 1.4;
}

/* Consent / GDPR checkboxes. */
.toqio-form-consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #33475B;
  line-height: 1.5;
  cursor: pointer;
}
.toqio-form-consent input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  margin-top: 0.2rem;
  flex: 0 0 auto;
  border-radius: 3px !important;
  padding: 0 !important;
  appearance: auto !important;
  -webkit-appearance: auto !important;
  accent-color: #F22AA2;
}
.toqio-form-consent a { color: inherit; text-decoration: underline; }
.toqio-form-consent .hs-form-required { color: #E62E60; margin-left: 2px; }

/* reCAPTCHA widget container. */
.toqio-form-captcha {
  margin-top: 0.5rem;
  display: flex;
  justify-content: flex-start;
}
.toqio-form-captcha .g-recaptcha { transform-origin: top left; }
@media (max-width: 360px) {
  /* Shrink the 304px-wide widget to fit very narrow screens. */
  .toqio-form-captcha .g-recaptcha { transform: scale(0.85); }
}

/* Submit button. */
.toqio-form-submit {
  justify-self: end;
  padding: 12px 24px;
  border: 1px solid #F22AA2;
  border-radius: 12px;
  background: #F22AA2;
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  margin-top: 0.25rem;
}
.toqio-form-submit:hover { background: #d6209a; border-color: #d6209a; }
.toqio-form-submit[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Status message (success / error feedback). */
.toqio-form-status { margin: 0; padding: 0.75rem; border-radius: 8px; font-size: 0.9rem; }
.toqio-form-status[data-state="error"] { background: #fee; color: #800; }
.toqio-form-status[data-state="ok"]    { background: #efe; color: #060; }

/* Optional description rendered below a field. */
.toqio-form .description {
  font-size: 0.85rem;
  color: rgba(51, 71, 91, 0.65);
  margin-top: 0.25rem;
}
