/*
 * newsletter-plate.css — the newsletter form drawn as the canvas' plate, ONE source for the white
 * plate and the dark pill (MKT-WP-NEWSLETTER-PLATE-CSS-ONE-SOURCE and MKT-WP-NEWSLETTER-PILL-CSS-ONE-SOURCE,
 * 2026-11-05).
 *
 * Until now these ~150 lines were written four times: in style.css («Newsletter band, NATIVE form»,
 * the Theme Builder footer's band), in sections/blog-news.css (the blog's own card) and, with
 * other values, in sections/affiliate-newsletter.css and sections/crypto-cta.css (the dark pill).
 * A change to one that did not reach the others left cards that no longer matched (G1).
 *
 * THE SCOPE is one common class, `.cx-nl-plate`, on the element that holds the form (the Shortcode
 * widget, or the container around it): `.cx-nl-plate .cx-form-wrap …`. `.cx-form-wrap` is the
 * plugin's wrapper of the form (native-forms.php); it carries the scope to the same two-class
 * depth the old scopes had (`.cx-newsletter-band--native .cx-newsletter-band__form`), so every
 * rule keeps the specificity it had, and with it its place against the plugin's sheet (printed
 * after the theme's, in wp_footer) and the kit's Theme Style for inputs
 * (`.elementor-kit-N input:not([type=button]):not([type=submit])`, 0,3,1).
 *
 * THE VARIANT is `.cx-nl-plate--pill` (next to `cx-nl-plate`): the dark pill of the Affiliate and
 * Cryptocurrencies cards. What changes between the white plate and the pill, and between the two
 * pills, is a custom property (`--cx-nl-*`, read with the plate's value as the fallback, so the
 * plain plate declares none); the pill sets the values its two cards share in the block «THE PILL»
 * below and each card its own (field height, margins, shadow, text colour) next to its other rules.
 * The stacking point is a media query and cannot be a variable: the plate stacks at 440 px and
 * the pill at 767 px (the kit's), so the pill has its own `@media` block.
 *
 * WHO PUTS THE CLASS: the documents, in the CSS Classes (Advanced) of the element that holds the
 * form: `cx-nl-plate` on the footer band (634 / 1542) and the blog card (642 / 1544);
 * `cx-nl-plate cx-nl-plate--pill` on the Affiliate card (1815 / 1816 and their originals) and the
 * Cryptocurrencies card (1917 / 1918 and 1820 / 1821). Marketing types the same classes to give
 * another newsletter card the finish. No PHP adds them (MKT-WP-NEWSLETTER-PILL-CLASS-ON-DOCS).
 *
 * WHEN IT LOADS: on every view that paints a newsletter card (functions.php,
 * cexum_newsletter_plate_needed()); not where the form is suppressed.
 *
 * WHAT STAYS IN THE SURFACES' SHEETS: the boxes around the form (the footer band's grid, the
 * blog card's flex row, its 420 px form column, the orbs), the hiding of the card on a suppressed
 * request, and each card's own values of the variables: they differ per surface by design.
 *
 * THE DRAW: label / [field | Subscribe] on the plate / consent / privacy line. The plate is the
 * form's ::before in row 2 (.nl-form: radius 16, 6 px around a 48 px field and button, 10 px
 * between them). The e-mail row dissolves (display: contents) so its label and field take their
 * own rows; the visible label stays (a placeholder is never a field's only name). The production
 * label, the consent box (the versioned consent, MKT-WP-FORM-05) and the privacy line stay, in
 * white (>= 4.5:1 on the lightest stop of the card's gradient, measured).
 * Colours: tokens only; no glass card inside the card.
 */

/* The plugin's wrapper draws a glass card of its own: none inside this card. */
.cx-nl-plate .cx-form-wrap {
  max-width: none;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.cx-nl-plate .cx-form-wrap .cx-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 10px;
  align-items: center;
}
.cx-nl-plate .cx-form-wrap .cx-form::before {
  content: "";
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: stretch;
  background: var(--cx-nl-plate-bg, var(--cx-blanco));
  border: var(--cx-nl-plate-border, 0);
  border-radius: var(--cx-nl-plate-radius, var(--cx-radius));
  box-shadow: var(--cx-nl-plate-shadow, none);
}
.cx-nl-plate .cx-form-wrap .cx-form__row:not(.cx-form__row--consent) {
  display: contents;
}
.cx-nl-plate .cx-form-wrap .cx-form__label {
  grid-column: 1 / -1;
  grid-row: 1;
  margin: 0 0 8px;
  color: var(--cx-nl-label, var(--cx-blanco));
}
.cx-nl-plate .cx-form-wrap .cx-form .cx-form__row .cx-form__control {
  grid-column: 1;
  grid-row: 2;
  width: auto;
  min-width: 0;
  height: var(--cx-nl-field-h, 48px);
  margin: var(--cx-nl-gap, 6px) 0 var(--cx-nl-gap, 6px) var(--cx-nl-gap, 6px);
  padding: 0 var(--cx-nl-field-px, 14px);
  border: 1px solid transparent;
  border-radius: var(--cx-nl-field-radius, 10px);
  background: transparent;
  box-shadow: none;
  color: var(--cx-nl-field-color, var(--cx-azul-noche));
  font-size: var(--cx-nl-field-fs, 1rem);
  line-height: 1.5;
}
/* Focus: the ring is `--cx-nl-ring`: «Azul Corporativo» on the white plate (5.1:1; the site's
 * turquoise ring would be 2.0:1 there), turquoise on the dark pill. */
.cx-nl-plate .cx-form-wrap .cx-form .cx-form__row .cx-form__control:focus {
  border-color: transparent;
  background: transparent;
}
.cx-nl-plate .cx-form-wrap .cx-form .cx-form__row .cx-form__control:focus-visible {
  outline: 2px solid var(--cx-nl-ring, var(--cx-azul-corporativo));
  outline-offset: 0;
}
/* Invalid (typed and left, or server-marked after a failed submission): a 2 px red border (4.8:1
 * on white), plus the warning icon in the label and the banner text the field is described by:
 * never colour alone. The padding gives back the pixel the border takes. */
.cx-nl-plate .cx-form-wrap .cx-form .cx-form__row .cx-form__control:user-invalid,
.cx-nl-plate .cx-form-wrap .cx-form .cx-form__row--invalid .cx-form__control {
  border: 2px solid var(--cx-danger);
  padding: 0 calc(var(--cx-nl-field-px, 14px) - 1px);
}
.cx-nl-plate .cx-form-wrap .cx-form__actions {
  grid-column: 2;
  grid-row: 2;
  margin: var(--cx-nl-gap, 6px) var(--cx-nl-gap, 6px) var(--cx-nl-gap, 6px) 0;
}
/* .bl-btn geometry (48 px, 0 / 24, radius 12, 16 / 600) on the site's primary finish: the
 * canvas' #1D5FFF -> #18C9D7 leaves "Subscribe" at about 3.2:1. The scope sits in :where(): over
 * the base .cx-btn / .cx-btn-primary (0,1,0) and the kit's button Theme Style (0,1,1), under any
 * setting on the widget (the specificity gate counts .cx-btn as a widget class). */
:where(.cx-nl-plate .cx-form-wrap .cx-form__actions) .cx-btn.cx-btn-primary {
  height: var(--cx-nl-btn-h, 48px);
  padding: 0 var(--cx-nl-btn-px, 24px);
  border-radius: var(--cx-radius-btn);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}
.cx-nl-plate .cx-form-wrap .cx-form__row--consent {
  grid-column: 1 / -1;
  grid-row: 3;
  margin: 14px 0 0;
}
.cx-nl-plate .cx-form-wrap .cx-form__consent,
.cx-nl-plate .cx-form-wrap .cx-form__legal,
.cx-nl-plate .cx-form-wrap .cx-form__req,
.cx-nl-plate .cx-form-wrap .cx-form__invalid-icon {
  color: var(--cx-nl-text, var(--cx-blanco));
}
.cx-nl-plate .cx-form-wrap .cx-form__legal {
  grid-column: 1 / -1;
  grid-row: 4;
  margin: 10px 0 0;
}
/* The unticked box after a failed submission: a white outline (the plugin's red one is 1.2:1 on
 * the gradient), next to the warning icon and the banner. */
.cx-nl-plate .cx-form-wrap .cx-form__row--invalid .cx-form__checkbox {
  outline-color: var(--cx-blanco);
}
.cx-nl-plate .cx-form-wrap .cx-form__row--invalid .cx-form__checkbox:focus-visible {
  outline-color: hsl(var(--cx-accent-hsl));
}
/* The canvas stacks the plate at 440 px and below (.nl-form column, button full width). */
@media (max-width: 440px) {
  .cx-nl-plate .cx-form-wrap .cx-form {
    grid-template-columns: minmax(0, 1fr);
  }
  .cx-nl-plate .cx-form-wrap .cx-form::before {
    grid-row: 2 / 4;
  }
  .cx-nl-plate .cx-form-wrap .cx-form .cx-form__row .cx-form__control {
    margin: var(--cx-nl-gap-stack, 6px) var(--cx-nl-gap-stack, 6px) 0;
  }
  .cx-nl-plate .cx-form-wrap .cx-form__actions {
    grid-column: 1;
    grid-row: 3;
    margin: 10px var(--cx-nl-gap-stack, 6px) var(--cx-nl-gap-stack, 6px);
  }
  :where(.cx-nl-plate .cx-form-wrap .cx-form__actions) .cx-btn.cx-btn-primary {
    width: 100%;
  }
  .cx-nl-plate .cx-form-wrap .cx-form__row--consent {
    grid-row: 4;
  }
  .cx-nl-plate .cx-form-wrap .cx-form__legal {
    grid-row: 5;
  }
}

/* ---- THE PILL: `cx-nl-plate--pill`, the dark plate of the Affiliate and Cryptocurrencies cards ----
 * The values the two pills share. Each card sets its own next to its other rules (field and
 * button height, margins, radius of the pill and of the field, shadows, ring and text colours). */
.cx-nl-plate--pill {
  --cx-nl-plate-bg: var(--cx-azul-noche);
  --cx-nl-plate-border: 1.5px solid hsl(var(--cx-accent-hsl) / 0.55);
  --cx-nl-field-px: 16px;
  --cx-nl-field-color: var(--cx-blanco);
  --cx-nl-field-fs: 1.0625rem;
  --cx-nl-ring: hsl(var(--cx-accent-hsl));
  --cx-nl-btn-px: 26px;
}
/* the card's own copy may be centred: the form's rows and the error banner read from the start */
.cx-nl-plate--pill .cx-form-wrap,
.cx-nl-plate--pill .cx-form-wrap .cx-form {
  text-align: start;
}
/* a turquoise border and a soft ring around the pill while its field has the focus */
.cx-nl-plate--pill .cx-form-wrap .cx-form:has(.cx-form__control:focus-visible)::before {
  border-color: var(--cx-nl-ring);
  box-shadow: var(--cx-nl-plate-shadow-focus, none);
}
/* The pill stacks at the kit's 767 px (the canvas' phone break), not at the plate's 440 px. */
@media (max-width: 767px) {
  .cx-nl-plate--pill .cx-form-wrap .cx-form {
    grid-template-columns: minmax(0, 1fr);
  }
  .cx-nl-plate--pill .cx-form-wrap .cx-form::before {
    grid-row: 2 / 4;
  }
  .cx-nl-plate--pill .cx-form-wrap .cx-form .cx-form__row .cx-form__control {
    margin: var(--cx-nl-gap-stack, 6px) var(--cx-nl-gap-stack, 6px) 0;
  }
  .cx-nl-plate--pill .cx-form-wrap .cx-form__actions {
    grid-column: 1;
    grid-row: 3;
    margin: 10px var(--cx-nl-gap-stack, 6px) var(--cx-nl-gap-stack, 6px);
  }
  :where(.cx-nl-plate--pill .cx-form-wrap .cx-form__actions) .cx-btn.cx-btn-primary {
    width: 100%;
  }
  .cx-nl-plate--pill .cx-form-wrap .cx-form__row--consent {
    grid-row: 4;
  }
  .cx-nl-plate--pill .cx-form-wrap .cx-form__legal {
    grid-row: 5;
  }
}
