h1, .u-text-style-h1 {
  font-size: var(--_typography-tokens---h1--size);
  line-height: var(--_typography-tokens---h1--line-height);
  font-weight: var(--_typography-tokens---h1--weight);
  letter-spacing: var(--_typography-tokens---h1--letter-spacing);
  margin-top: 0;
  margin-bottom: 0;
}

h2, .u-text-style-h2 {
  font-size: var(--_typography-tokens---h2--size);
  line-height: var(--_typography-tokens---h2--line-height);
  font-weight: var(--_typography-tokens---h2--weight);
  letter-spacing: var(--_typography-tokens---h2--letter-spacing);
  margin-top: 0;
  margin-bottom: 0;
}

h3, .u-text-style-h3 {
  font-size: var(--_typography-tokens---h3--size);
  line-height: var(--_typography-tokens---h3--line-height);
  font-weight: var(--_typography-tokens---h3--weight);
  letter-spacing: var(--_typography-tokens---h3--letter-spacing);
  margin-top: 0;
  margin-bottom: 0;
}

h4, .u-text-style-h4 {
  font-size: var(--_typography-tokens---h4--size);
  line-height: var(--_typography-tokens---h4--line-height);
  font-weight: var(--_typography-tokens---h4--weight);
  letter-spacing: var(--_typography-tokens---h4--letter-spacing);
  margin-top: 0;
  margin-bottom: 0;
}

h5, .u-text-style-h5 {
  font-size: var(--_typography-tokens---h5--size);
  line-height: var(--_typography-tokens---h5--line-height);
  font-weight: var(--_typography-tokens---h5--weight);
  letter-spacing: var(--_typography-tokens---h5--letter-spacing);
  margin-top: 0;
  margin-bottom: 0;
}

h6, .u-text-style-h6 {
  font-size: var(--_typography-tokens---h6--size);
  line-height: var(--_typography-tokens---h6--line-height);
  font-weight: var(--_typography-tokens---h6--weight);
  letter-spacing: var(--_typography-tokens---h6--letter-spacing);
  margin-top: 0;
  margin-bottom: 0;
}

p[role="alert"] {
  color: red;
  margin: 0;
}

fieldset {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}

legend {
  margin-bottom: 1rem;
}
/*
 * Deliberately no background or padding on the root: the component is dropped
 * into banners and footers that own their own surface. Everything reads from
 * the Webflow variables, with fallbacks so the playground renders correctly
 * without tokens.css.
 *
 * Every rule is scoped under .newsletter-form on purpose. The enquiry forms'
 * shared/components/form-controls.css styles `input[type="email"]` directly,
 * and that selector outranks a single class — unscoped, the email field here
 * silently picked up that form's height and font size while the name field
 * kept these, which is exactly the inconsistency this component was reported
 * for. The descendant selector puts it back in front.
 */

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  font-family: var(--_typography-primitives---family--primary-family, Arial, sans-serif);
}

/* One column: name, email, consent, then the actions row. */
.newsletter-form .newsletter-form__field {
  min-width: 0;
}

/* Mirrors the site's own .form_field rule, declaration for declaration, so a
   code-component input is indistinguishable from a native Webflow one. */
.newsletter-form .newsletter-form__input {
  width: 100%;
  /* form-controls.css pins input[type="email"] to a fixed 48px. Scoping wins
     the cascade but only for properties declared here, so height has to be
     reset explicitly or the email field stays 8px taller than the name one. */
  height: auto;
  min-height: var(--_site-sizes---spacing--2-5rem, 2.5rem);
  padding-right: var(--_site-sizes---spacing--1rem, 1rem);
  padding-left: var(--_site-sizes---spacing--1rem, 1rem);
  box-sizing: border-box;
  font-family: inherit;
  font-size: var(--_typography-tokens---body-small--size, 0.875rem);
  color: var(--text--primary, #3e3e3a);
  background-color: var(--input--bg-idle, #fff);
  border: 1px solid var(--input--border-idle, #d4d4d4);
  border-radius: var(--_site-sizes---radius--small, 0.5rem);
  transition: border-color 0.3s;
}

.newsletter-form .newsletter-form__input::placeholder {
  color: var(--text--primary, #3e3e3a);
  opacity: 1;
}

.newsletter-form .newsletter-form__input:focus-visible {
  outline: none;
  border-color: var(--_colour-primitives---brand--primary--500, #7938b4);
  box-shadow: 0 0 0 3px rgb(121 56 180 / 25%);
}

.newsletter-form .newsletter-form__input--error {
  border-color: var(--input--border-error, #e91817);
}

/* Opaque rather than faded: the component sits on coloured banners, and
   opacity would let the banner show through the field. */
.newsletter-form .newsletter-form__input:disabled {
  color: var(--_colour-primitives---neutral--400, #a3a3a3);
  cursor: not-allowed;
}

/* Submit and privacy link share the last row, left-aligned, wrapping on narrow
   screens rather than squashing the link under the button. */
.newsletter-form .newsletter-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.newsletter-form .newsletter-form__privacy {
  font-size: var(--_typography-tokens---body-medium--size, 1rem);
  font-weight: 600;
  color: var(--text-link--content-idle, #7938b4);
  text-decoration: none;
}

.newsletter-form .newsletter-form__privacy:hover {
  color: var(--text-link--content-hover, #3e1d78);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Same geometry and typography as the submit button on the enquiry forms
   (see shared/components/form-controls.css), in the brand purple rather than
   their green. */
.newsletter-form .newsletter-form__submit {
  /* Sized to its own content, so the privacy link sits beside it rather than
     being pushed to the next line by a full-width button. */
  align-self: flex-start;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: var(--_button-tokens---button-large--padding-top-bottom, 1.25rem)
    var(--_button-tokens---button-large--padding-left-right, 2rem);
  font-family: var(--_typography-primitives---family--primary-family, Arial, sans-serif);
  font-size: var(--_typography-tokens---body-medium--size, 1rem);
  font-weight: 700;
  line-height: var(--_button-tokens---button-medium--line-height, 100%);
  text-transform: uppercase;
  color: var(--button-primary--primary-content-idle, #fff);
  background-color: var(--button-primary--primary-bg-idle, #7938b4);
  border: 1px solid transparent;
  border-radius: var(--_site-sizes---radius--small, 0.5rem);
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
}

.newsletter-form .newsletter-form__submit:hover:not(:disabled) {
  background-color: var(--button-primary--primary-bg-hover, #f07af0);
  border-color: var(--button-primary--primary-border-hover, transparent);
  color: var(--button-primary--primary-content-hover, #3e1d78);
}

.newsletter-form .newsletter-form__submit:focus-visible {
  outline: 3px solid var(--_colour-primitives---brand--primary--700, #52278c);
  outline-offset: 2px;
}

.newsletter-form .newsletter-form__submit:disabled {
  background: var(--_colour-primitives---brand--primary--700, #52278c);
  cursor: not-allowed;
}

.newsletter-form .newsletter-form__consent {
  display: flex;
  align-items: flex-start;
  /* Anchored left even inside a centred container: the label runs to two or
     three lines in a narrow card, and centred wrapped text next to a
     left-aligned checkbox reads badly. */
  text-align: left;
  gap: 0.75rem;
  font-size: var(--_typography-tokens---body-small--size, 0.875rem);
  color: var(--text--primary, #3e3e3a);
  cursor: pointer;
}

.newsletter-form .newsletter-form__checkbox {
  margin: 0;
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--_colour-primitives---brand--primary--500, #7938b4);
  cursor: pointer;
}

.newsletter-form .newsletter-form__message {
  margin: 0;
  font-size: var(--_typography-tokens---body-small--size, 0.875rem);
}

.newsletter-form .newsletter-form__message--error {
  color: var(--input--border-error, #e91817);
}

.newsletter-form .newsletter-form__field .newsletter-form__message {
  margin-top: 0.375rem;
}

.newsletter-form__success {
  margin: 0;
  font-family: var(--_typography-primitives---family--primary-family, Arial, sans-serif);
  font-size: var(--_typography-tokens---body-medium--size, 1rem);
  color: var(--text--primary, #3e3e3a);
}

/* Placeholders carry the labelling visually, so the real labels are kept for
   screen readers only. */
.newsletter-form .newsletter-form__sr-only,
/* Honeypot: off-screen rather than display:none, so a bot filling every input
   still reaches it. */
.newsletter-form .newsletter-form__honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 767px) {
  /* The button goes full width once it is no longer sharing a line with the
     privacy link. */
  .newsletter-form .newsletter-form__submit {
    align-self: stretch;
    width: 100%;
  }

  .newsletter-form .newsletter-form__actions {
    gap: 1rem;
  }
}

/*
 * Compact layout — narrow containers such as the blog article sidebar card.
 *
 * Same markup, same wording; only the last row changes. In a ~300px column a
 * content-width button looks stranded against full-width inputs, and the
 * privacy link has nowhere to sit beside it, so the button fills the width and
 * the link drops beneath. Text alignment is left to the container, since the
 * card centres its own content deliberately.
 */

.newsletter-form.newsletter-form--compact {
  gap: 0.75rem;
}

.newsletter-form--compact .newsletter-form__actions {
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.newsletter-form--compact .newsletter-form__submit {
  align-self: stretch;
  width: 100%;
  /* The large button padding is generous for a narrow card. */
  padding: var(--_button-tokens---button-medium--padding-top-bottom, 1rem)
    var(--_button-tokens---button-small--padding-left-right, 1rem);
}

.newsletter-form--compact .newsletter-form__privacy {
  font-size: var(--_typography-tokens---body-small--size, 0.875rem);
}

