/* Small additions to the old theme (styles.css) for what the static site now does
   in the browser — form feedback and the broker finder. Colours and type come from
   the theme's own .message and .button rules. */

/* The theme's display utilities (.flex, .block) would otherwise beat [hidden]. */
[hidden] { display: none !important; }

/* Spam trap field on every form; people never see it. */
.form-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

[data-form-message] { margin-bottom: 1rem; }

/* "Arrow from line" bullets (ul.arrow). The theme drew them with a Font Awesome Pro
   glyph the free font doesn't have, so draw the same shape here. */
.typography ul.arrow li:before {
  content: "";
  width: .9em;
  height: .9em;
  vertical-align: -.05em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' fill='%236cbd53'%3E%3Crect x='0' y='96' width='56' height='320' rx='28'/%3E%3Cpath d='M502.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 224H128c-17.7 0-32 14.3-32 32s14.3 32 32 32h274.7l-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l128-128z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Keep embeds and form groups inside the screen on phones (two pages on the old site
   scrolled sideways: a fixed-width calculator iframe and a referral-form fieldset). */
iframe { max-width: 100%; }
fieldset { min-width: 0; }
/* Half-width field groups (the referral forms' "Client 1 / Client 2") are too narrow
   for their fields on a phone; stack them. */
@media (max-width: 767px) {
  .userform .userformsgroup.uf-6 { grid-column: 1 / -1; }
}

/* Collection notice and separate optional marketing choice, below the form fields. */
.form-privacy { margin: 1.5rem 0; font-size: .875rem; line-height: 1.6; }
.form-privacy p { margin: 0 0 1rem; }
.form-privacy a { text-decoration: underline; overflow-wrap: anywhere; }
.form-privacy .form-marketing-consent { display: flex; align-items: flex-start; gap: .75rem; cursor: pointer; }
.form-marketing-consent input[type="checkbox"] { flex: 0 0 auto; width: 1.125rem; height: 1.125rem; margin-top: .2rem; appearance: auto; }
.form-marketing-consent input:focus-visible { outline: 2px solid #276b30; outline-offset: 3px; }

/* Long legal-page tables. Web addresses wrap; on a phone each cell stacks so
   words in the label column are not broken mid-letter. Shared by the privacy
   policy, the credit guide and the complaints page. */
.privacy-policy a,
.credit-guide a,
.complaints-page a { overflow-wrap: anywhere; }
.privacy-policy th,
.privacy-policy td,
.credit-guide th,
.credit-guide td,
.complaints-page th,
.complaints-page td { vertical-align: top; }
@media (max-width: 767px) {
  .privacy-policy table,
  .privacy-policy thead,
  .privacy-policy tbody,
  .privacy-policy tr,
  .privacy-policy th,
  .privacy-policy td,
  .credit-guide table,
  .credit-guide thead,
  .credit-guide tbody,
  .credit-guide tr,
  .credit-guide th,
  .credit-guide td,
  .complaints-page table,
  .complaints-page thead,
  .complaints-page tbody,
  .complaints-page tr,
  .complaints-page th,
  .complaints-page td { display: block; width: 100%; }
}
