/* ==========================================================
   NEWSLETTER (WPForms "Subscribe Newsletter")
   The form in the "SEO Tipps in Ihrer Inbox" box (pattern "SEO - Tips"; composite class
   newsletter-signup on the outer yellow group, which sets its colours and padding in its
   definition). The box's own layout — heading, the row of form and arrow, its phone layout — is
   Von Block classes and custom styles on its blocks; here is only what is inside the form, which
   WPForms writes and Von Block does not reach, and the arrow.
   The form is found by its class, not its number: kloos-newsletter-form (WPForms → the form's
   Settings → Advanced → Form CSS Class) and its fields' kloos-field-name/-email/-consent (each
   field's Advanced → CSS Classes). Each selector is :is(…, #kloos-newsletter-form): the id matches
   nothing and is there for its weight, which is what the form's numeric ids gave.
   The form's own submit button is hidden: the arrow (.submit-arrow) sends it (script.js). No
   !important: the rules win by being specific enough (an id's weight each), checked property by
   property (2026-10-17).
   ========================================================== */

.newsletter-signup :is(.kloos-newsletter-form, #kloos-newsletter-form) {
  width: 100%;
  max-width: none;
  margin: 0;
}

.newsletter-signup :is(.kloos-newsletter-form .wpforms-form, #kloos-newsletter-form) {
  width: 100%;
  margin: 0;
  font-family: inherit;
}

/* Name and e-mail side by side, the consent checkbox under them */
.newsletter-signup :is(.kloos-newsletter-form .wpforms-form, #kloos-newsletter-form) .wpforms-field-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: var(--g1, 24px);
  row-gap: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.newsletter-signup :is(.kloos-newsletter-form .kloos-field-name, #kloos-newsletter-form) {
  grid-column: 1;
}

.newsletter-signup :is(.kloos-newsletter-form .kloos-field-email, #kloos-newsletter-form) {
  grid-column: 2;
}

/* No WPForms spacing round the fields */
.newsletter-signup :is(.kloos-newsletter-form .wpforms-form, #kloos-newsletter-form) .wpforms-field {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* The checkbox across both columns, below name and e-mail */
.newsletter-signup :is(.kloos-newsletter-form .wpforms-form, #kloos-newsletter-form) :is(.kloos-newsletter-form .kloos-field-consent, #kloos-newsletter-form) {
  grid-column: 1 / -1;
  max-width: var(--c7); /* Figma: the consent seven columns wide */
  margin-top: 16px;
}

/* Name and e-mail: outlined pills (Figma "input field NL": 51px high, a 1.5px line, 15px in) */
.newsletter-signup :is(.kloos-newsletter-form .kloos-field-name input, #kloos-newsletter-form),
.newsletter-signup :is(.kloos-newsletter-form .kloos-field-email input, #kloos-newsletter-form) {
  display: block;
  width: 100%;
  max-width: none;
  height: 51px;
  min-height: 51px;
  margin: 0;
  padding: 0 15px;
  box-sizing: border-box;
  background: transparent;
  color: var(--newsletter-ink);
  border: 1.5px solid var(--newsletter-ink);
  border-radius: 999px;
  box-shadow: none;
  outline: none;
  font-family: inherit;
  font-size: var(--mcg-font-size-copy, 18px);
  font-style: normal;
  font-weight: 500;
  line-height: 1;
  appearance: none;
  -webkit-appearance: none;
  transition:
    border-color 180ms ease,
    background-color 180ms ease;
}

.newsletter-signup :is(.kloos-newsletter-form .kloos-field-name input, #kloos-newsletter-form)::placeholder,
.newsletter-signup :is(.kloos-newsletter-form .kloos-field-email input, #kloos-newsletter-form)::placeholder {
  color: var(--newsletter-muted);
  opacity: 1;
}

.newsletter-signup :is(.kloos-newsletter-form .kloos-field-name input, #kloos-newsletter-form):focus,
.newsletter-signup :is(.kloos-newsletter-form .kloos-field-email input, #kloos-newsletter-form):focus {
  border-color: var(--newsletter-ink);
  background-color: color-mix(in srgb, var(--mcg-color-surface) 8%, transparent);
}

/* The focus seen from the keyboard: a ring round the field, and round the arrow that sends the form
   (script.js makes the arrow a button) */
.newsletter-signup :is(.kloos-newsletter-form .kloos-field-name input, #kloos-newsletter-form):focus-visible,
.newsletter-signup :is(.kloos-newsletter-form .kloos-field-email input, #kloos-newsletter-form):focus-visible,
.newsletter-signup :is(.kloos-newsletter-form .wpforms-form, #kloos-newsletter-form) input[type="checkbox"]:focus-visible,
.newsletter-signup .submit-arrow:focus-visible {
  outline: 2px solid var(--newsletter-ink);
  outline-offset: 2px;
}

/* The fields' labels: for screen readers only (the placeholders show) */
.newsletter-signup :is(.kloos-newsletter-form .wpforms-form, #kloos-newsletter-form) .wpforms-label-hide {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ----------------------------------------------------------
   The consent checkbox: the native one hidden, a box drawn on its label instead
   ---------------------------------------------------------- */
.newsletter-signup :is(.kloos-newsletter-form .kloos-field-consent, #kloos-newsletter-form) fieldset,
.newsletter-signup :is(.kloos-newsletter-form .kloos-field-consent, #kloos-newsletter-form) ul,
.newsletter-signup :is(.kloos-newsletter-form .kloos-field-consent, #kloos-newsletter-form) li {
  margin: 0;
  padding: 0;
  border: 0;
}

.newsletter-signup :is(.kloos-newsletter-form .kloos-field-consent, #kloos-newsletter-form) ul {
  list-style: none;
}

.newsletter-signup :is(.kloos-newsletter-form .kloos-field-consent, #kloos-newsletter-form) li {
  display: block;
  position: relative;
}

.newsletter-signup :is(.kloos-newsletter-form .kloos-field-consent input[type="checkbox"], #kloos-newsletter-form) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}

.newsletter-signup :is(.kloos-newsletter-form .kloos-field-consent, #kloos-newsletter-form) .wpforms-field-label-inline {
  position: relative;
  display: block;
  margin: 0;
  padding-left: 53px;
  color: var(--newsletter-ink);
  font-family: inherit;
  font-size: var(--mcg-font-size-copy, 18px);
  font-style: normal;
  font-weight: 500;
  line-height: 170%;
  hyphens: manual;
  cursor: pointer;
}

.newsletter-signup :is(.kloos-newsletter-form .kloos-field-consent, #kloos-newsletter-form) .wpforms-field-label-inline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 30px;
  height: 30px;
  box-sizing: border-box;
  background: transparent;
  border: 1.5px solid var(--newsletter-ink);
  border-radius: 0;
}

/* Ticked: the box filled, with a yellow tick */
.newsletter-signup :is(.kloos-newsletter-form .kloos-field-consent input[type="checkbox"], #kloos-newsletter-form):checked
+ .wpforms-field-label-inline::before {
  background-color: var(--newsletter-ink);
}

.newsletter-signup :is(.kloos-newsletter-form .kloos-field-consent input[type="checkbox"], #kloos-newsletter-form):checked
+ .wpforms-field-label-inline::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 6px;
  width: 8px;
  height: 14px;
  border-right: 3px solid var(--newsletter-yellow);
  border-bottom: 3px solid var(--newsletter-yellow);
  transform: rotate(45deg);
}

/* ----------------------------------------------------------
   Sending: WPForms' own button is out of sight and out of the screen reader's way; the arrow beside
   the form (an image block with the class submit-arrow) sends it (script.js)
   ---------------------------------------------------------- */
.newsletter-signup :is(.kloos-newsletter-form .wpforms-form, #kloos-newsletter-form) button[type="submit"] {
  display: none;
}

.newsletter-signup :is(.kloos-newsletter-form .wpforms-form, #kloos-newsletter-form) .wpforms-submit-container {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}

.newsletter-signup .submit-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 0;
  flex-shrink: 0;
  flex-basis: auto;
  width: 94px;
  height: auto;
  margin: 9px 0 0; /* centred on the 51px fields beside it */
  cursor: pointer;
  transition: transform 180ms ease;
}

.newsletter-signup .submit-arrow img {
  display: block;
  width: 94px;
  max-width: none;
  height: auto;
  margin: 0;
}

@media (hover: hover) and (pointer: fine) {
  .newsletter-signup .submit-arrow:hover {
    transform: translateX(6px);
  }
}

/* ----------------------------------------------------------
   Below Von Block's sm breakpoint (768px): the fields one under the other (Figma: 58px high, 20px
   apart), the consent smaller; the arrow at the right under the form
   ---------------------------------------------------------- */
@container (max-width: 768px) {
  .newsletter-signup :is(.kloos-newsletter-form .wpforms-form, #kloos-newsletter-form) .wpforms-field-container {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0;
  }

  .newsletter-signup :is(.kloos-newsletter-form .wpforms-form, #kloos-newsletter-form) :is(.kloos-newsletter-form .kloos-field-email, #kloos-newsletter-form) {
    margin-top: 20px;
  }

  .newsletter-signup :is(.kloos-newsletter-form .kloos-field-name, #kloos-newsletter-form),
  .newsletter-signup :is(.kloos-newsletter-form .kloos-field-email, #kloos-newsletter-form),
  .newsletter-signup :is(.kloos-newsletter-form .kloos-field-consent, #kloos-newsletter-form) {
    grid-column: 1;
  }

  .newsletter-signup :is(.kloos-newsletter-form .kloos-field-name input, #kloos-newsletter-form),
  .newsletter-signup :is(.kloos-newsletter-form .kloos-field-email input, #kloos-newsletter-form) {
    height: 58px;
    min-height: 58px;
    font-size: var(--mcg-font-size-copy, 18px);
  }

  .newsletter-signup :is(.kloos-newsletter-form .wpforms-form, #kloos-newsletter-form) :is(.kloos-newsletter-form .kloos-field-consent, #kloos-newsletter-form) {
    max-width: none;
    margin-top: 16px;
  }

  .newsletter-signup :is(.kloos-newsletter-form .kloos-field-consent, #kloos-newsletter-form) .wpforms-field-label-inline {
    padding-left: 57px;
    /* The typography style small-print's size (WPForms' label takes no class) */
    font-size: var(--mcg-font-size-small-print, 14px);
    line-height: 150%;
  }

  .newsletter-signup .submit-arrow {
    align-self: flex-end;
    width: 70px;
    margin-top: 0;
  }

  .newsletter-signup .submit-arrow img {
    width: 70px;
  }
}
