/*
 * Structural / functional form CSS.
 * Site-specific colours, typography, text transforms, decorative borders,
 * radii, shadows, etc. belong in the site/theme CSS.
 */

.zd-mailerlite-form,
.zd-mailerlite-form *,
.zd-mailerlite-form *::before,
.zd-mailerlite-form *::after {
  box-sizing: border-box;
}

/* Keep the email field inside its available column/container. */
.zd-mailerlite-form .form-type-email input.form-email {
  width: 100%;
  max-width: 100%;
}

/* Keep checkbox and its label together as one predictable two-column row. */
.zd-mailerlite-form .zd-mailerlite-form__consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: 0.5rem;
}

.zd-mailerlite-form .zd-mailerlite-form__consent input[type="checkbox"] {
  grid-column: 1;
  margin-top: 0.2em;
}

.zd-mailerlite-form .zd-mailerlite-form__consent label {
  grid-column: 2;
  min-width: 0;
}

/* Keep form actions/buttons in normal document flow and usable. */
.zd-mailerlite-form .form-actions {
  display: block;
}

.zd-mailerlite-form input[type="submit"],
.zd-mailerlite-form button[type="submit"] {
  max-width: 100%;
}

.zd-mailerlite-form input[type="submit"][disabled],
.zd-mailerlite-form button[type="submit"][disabled] {
  cursor: wait;
}

/* Inline feedback belongs to the signup block rather than global messages. */
.zd-mailerlite-form__response {
  box-sizing: border-box;
}

.zd-mailerlite-form__response-slot:empty {
  display: none;
}
