/*
 * /newsletter-2/ (page 238959), v2 design (build/mockups/newsletter-v2/). Enqueued only on that page (inc/page-styles.php).
 * Styles the Kit form printed by snippets/kit-newsletter.html; the page layout and copy are Elementor V4 (build/pages/newsletter.py).
 * Field and button tokens are the /login/ page's (.cjm): ink #262626, muted #656563, field border #c9d1d1, brand #56c6d6.
 * Selectors carry .cjpt-nl-form twice where Hello Elementor's reset / the Elementor kit would otherwise win.
 */

.cjpt-nl-form { display: block; width: 100%; margin: 0; padding: 0; text-align: left; font-family: "Open Sans", Helvetica, Arial, sans-serif; color: #262626; }
.cjpt-nl-form.cjpt-nl-form form.formkit-form { display: block; width: 100%; max-width: none; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
/* Error list sits between the field and the button (mockup): the fields wrapper is flattened so its children can be ordered. */
.cjpt-nl-form.cjpt-nl-form form.formkit-form [data-style] { display: flex; flex-direction: column; margin: 0; padding: 0; }
.cjpt-nl-form.cjpt-nl-form .formkit-fields { display: contents; }
.cjpt-nl-form.cjpt-nl-form .formkit-field { order: 1; margin: 0 0 16px 0; padding: 0; }
.cjpt-nl-form.cjpt-nl-form .formkit-alert-error { order: 2; }
.cjpt-nl-form.cjpt-nl-form button.formkit-submit { order: 3; }
.cjpt-nl-form.cjpt-nl-form .formkit-alert-success { order: 4; }

.cjpt-nl-form .cjpt-nl-form__field { display: block; margin: 0; padding: 0; }
.cjpt-nl-form .cjpt-nl-form__label { display: block; margin: 0 0 7px 0; font-family: "Open Sans", Helvetica, Arial, sans-serif; font-size: 14px; font-weight: 600; line-height: 1.55; letter-spacing: normal; color: #262626; }
.cjpt-nl-form.cjpt-nl-form input.formkit-input {
	display: block; box-sizing: border-box; width: 100%; height: 52px; margin: 0; padding: 0 16px;
	border: 1.5px solid #c9d1d1; border-radius: 6px; box-shadow: none; outline: none; background: #ffffff;
	font-family: "Open Sans", Helvetica, Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 1.2; letter-spacing: normal; color: #262626;
	transition: none;
}
.cjpt-nl-form.cjpt-nl-form input.formkit-input::placeholder { color: #737371; opacity: 1; }
.cjpt-nl-form.cjpt-nl-form input.formkit-input:focus { border-color: #262626; box-shadow: 0 0 0 1px #262626; outline: none; }
.cjpt-nl-form.cjpt-nl-form input.formkit-input[aria-invalid="true"],
.cjpt-nl-form.cjpt-nl-form form:has(.formkit-alert-error li) input.formkit-input { border-color: #b42318; box-shadow: 0 0 0 1px #b42318; }

.cjpt-nl-form.cjpt-nl-form button.formkit-submit {
	position: relative; display: flex; align-items: center; justify-content: center; box-sizing: border-box;
	width: 100%; height: 48px; margin: 0; padding: 3px 26px 0; border: 1.5px solid transparent; border-radius: 0; box-shadow: none;
	background: #56c6d6; color: #262626; font-family: "Josefin Sans", Helvetica, Arial, sans-serif; font-size: 14px; font-weight: 700;
	line-height: 1; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; white-space: nowrap; cursor: pointer;
	transition: background-color 0.2s;
}
.cjpt-nl-form.cjpt-nl-form button.formkit-submit:hover { background: #c3e800; color: #262626; }
.cjpt-nl-form.cjpt-nl-form button.formkit-submit:focus { background: #56c6d6; color: #262626; outline: none; }
.cjpt-nl-form.cjpt-nl-form button.formkit-submit:hover:focus { background: #c3e800; }
.cjpt-nl-form.cjpt-nl-form button.formkit-submit:focus-visible { outline: 2px solid #262626; outline-offset: 2px; }
.cjpt-nl-form .formkit-spinner { display: none; }
.cjpt-nl-form button.formkit-submit[data-active] .cjpt-nl-form__btn { visibility: hidden; }
.cjpt-nl-form button.formkit-submit[data-active] .formkit-spinner { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 5px; }
.cjpt-nl-form .formkit-spinner span { width: 7px; height: 7px; border-radius: 50%; background: #262626; animation: cjpt-nl-dots 1.2s infinite ease-in-out both; }
.cjpt-nl-form .formkit-spinner span:nth-child(1) { animation-delay: -0.3s; }
.cjpt-nl-form .formkit-spinner span:nth-child(2) { animation-delay: -0.15s; }
@keyframes cjpt-nl-dots { 0%, 80%, 100% { transform: scale(0.4); } 40% { transform: scale(1); } }

/* Error (login .cjm-msg.is-error): Kit's own <ul data-element="errors">, filled by ck.5.js (server errors) or the snippet's check. */
.cjpt-nl-form.cjpt-nl-form .formkit-alert-error:empty { display: none; }
.cjpt-nl-form.cjpt-nl-form .formkit-alert-error {
	display: grid; grid-template-columns: 18px 1fr; column-gap: 10px; align-items: start;
	margin: -6px 0 16px 0; padding: 12px 14px; list-style: none; border: 1px solid #f0c7c3; border-radius: 8px; background: #fdf1f0;
	font-family: "Open Sans", Helvetica, Arial, sans-serif; font-size: 14.5px; line-height: 1.45; color: #7a1a12;
}
.cjpt-nl-form.cjpt-nl-form .formkit-alert-error::before {
	content: ""; grid-column: 1; grid-row: 1; width: 18px; height: 18px; margin-top: 1px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a1a12' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 7.5v5.5M12 16.4v.1'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}
.cjpt-nl-form.cjpt-nl-form .formkit-alert-error li { grid-column: 2; margin: 0; padding: 0; list-style: none; }

/* Fine print + success follow-up */
.cjpt-nl-form .cjpt-nl-form__fine { margin: 14px 0 0 0; padding: 0; font-size: 13.5px; line-height: 1.5; color: #656563; }
.cjpt-nl-form .cjpt-nl-form__fine a { color: #656563; font-weight: 400; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.cjpt-nl-form .cjpt-nl-form__after { display: none; }

/* Success (mockup: hairline, teal check, Josefin heading, two lines with the Field Guide link). Kit puts the message in
   .formkit-alert-success (innerText); the follow-up lines are ours, shown once that message exists. */
.cjpt-nl-form.cjpt-nl-form .formkit-alert-success {
	position: relative; margin: 0; padding: 26px 0 0 48px; border-top: 1px solid #e3e8e8; background: none; border-radius: 0;
	font-family: "Josefin Sans", Helvetica, Arial, sans-serif; font-size: 22px; font-weight: 700; line-height: 1.3; text-align: left; color: #262626;
	text-wrap: balance;
}
.cjpt-nl-form.cjpt-nl-form .formkit-alert-success:focus { outline: none; }
.cjpt-nl-form.cjpt-nl-form .formkit-alert-success::before {
	content: ""; position: absolute; left: 0; top: 22px; width: 34px; height: 34px; border-radius: 50%;
	background: #56c6d6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23262626' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}
.cjpt-nl-form:has(.formkit-alert-success) .cjpt-nl-form__fine,
.cjpt-nl-form.is-done .cjpt-nl-form__fine { display: none; }
.cjpt-nl-form:has(.formkit-alert-success) .cjpt-nl-form__after,
.cjpt-nl-form.is-done .cjpt-nl-form__after { display: block; padding: 0 0 4px 48px; }
.cjpt-nl-form .cjpt-nl-form__after p { margin: 10px 0 0 0; padding: 0; font-size: 15.5px; line-height: 1.55; color: #656563; }
.cjpt-nl-form .cjpt-nl-form__after p.cjpt-nl-form__next { margin-top: 14px; color: #262626; }
.cjpt-nl-form .cjpt-nl-form__after a { color: #262626; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.cjpt-nl-form .cjpt-nl-form__after a:hover { color: #262626; }

@media (max-width: 767px) {
	.cjpt-nl-form .cjpt-nl-form__fine { font-size: 13.5px; }
}
