.newton-form,
.oxy-modal-backdrop .ct-modal.newton-form-modal {
	--nf-ink: #1c1c1c;
	--nf-muted: #5b6256;
	--nf-green: #87bf03;
	--nf-focus: #066980;
	--nf-error: #b12815;
	color: var(--nf-ink);
	font-family: Montserrat, Arial, sans-serif;
	text-align: left;
}

.newton-form {
	display: grid;
	width: 100%;
	min-width: 0;
	gap: 16px;
	line-height: 1.45;
}

.newton-form p { margin: 0; }
.newton-form__fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.newton-form__field label > br { display: none; }

.newton-form__field label {
	display: grid;
	gap: 6px;
	color: var(--nf-ink);
	font-size: 14px;
	font-weight: 600;
}

.wpcf7 .wpcf7-form .newton-form input:is([type="text"], [type="tel"]) {
	box-sizing: border-box;
	display: block;
	width: 100%;
	min-width: 0;
	min-height: 54px;
	margin: 0;
	padding: 12px 14px;
	border: 1px solid #697861;
	border-radius: 12px;
	background: #fff;
	color: var(--nf-ink);
	font: 400 16px/1.4 Montserrat, Arial, sans-serif;
}

.wpcf7 .wpcf7-form .newton-form input.wpcf7-not-valid { border-color: var(--nf-error); }
.wpcf7 .wpcf7-form .newton-form .wpcf7-not-valid-tip {
	display: block;
	margin-top: 5px;
	color: var(--nf-error);
	font-size: 13px;
	font-weight: 500;
}

.newton-form .wpcf7-form-control-wrap { display: block; min-width: 0; }
.newton-form .wpcf7-list-item { display: block; margin: 0; }
.newton-form .wpcf7-acceptance label {
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr);
	align-items: start;
	gap: 10px;
	min-height: 24px;
	font-size: 13px;
	font-weight: 500;
	color: var(--nf-muted);
	cursor: pointer;
}

.wpcf7 .wpcf7-form .newton-form input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	accent-color: #527400;
}

.newton-form .wpcf7-acceptance a {
	color: #426000;
	text-decoration: underline;
	text-underline-offset: .16em;
}

.wpcf7 .wpcf7-form .newton-form input.wpcf7-submit[type="submit"] {
	appearance: none;
	display: inline-block;
	width: auto;
	max-width: 100%;
	min-height: 54px;
	margin: 0;
	padding: 11px 20px;
	border: 1px solid transparent;
	border-radius: 12px;
	background: var(--nf-green);
	color: var(--nf-ink);
	font: 700 16px/1.35 Montserrat, Arial, sans-serif;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
}

.wpcf7 .wpcf7-form .newton-form input.wpcf7-submit[type="submit"]:hover { background: #9acf2a; }
.wpcf7 .wpcf7-form .newton-form input.wpcf7-submit[type="submit"]:disabled,
.wpcf7 .submitting .newton-form input.wpcf7-submit[type="submit"] {
	cursor: wait;
	background: #eef3e6;
	color: var(--nf-muted);
}

.newton-form :is(input, a):focus-visible,
.newton-form-modal :is(button, a):focus-visible {
	outline: 2px solid var(--nf-focus);
	outline-offset: 3px;
}

.newton-form__action { position: relative; }
.newton-form .wpcf7-spinner {
	position: absolute;
	top: 15px;
	margin-left: 10px;
	pointer-events: none;
}

.newton-form__client-error,
.wpcf7 .wpcf7-form:has(.newton-form) .wpcf7-response-output {
	margin: 16px 0 0;
	padding: 12px 14px;
	border: 1px solid #dba796;
	border-radius: 12px;
	background: #fff5f0;
	color: #772a19;
	font-size: 14px;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.wpcf7 .wpcf7-form.sent:has(.newton-form) .wpcf7-response-output {
	border-color: #b7ce9a;
	background: #f0f6e7;
	color: #304b10;
}

.oxy-modal-backdrop:has(.newton-form-modal) {
	padding: 12px;
	background-color: rgb(18 25 13 / 64%) !important;
}

.oxy-modal-backdrop .ct-modal.newton-form-modal {
	position: relative;
	box-sizing: border-box;
	width: min(100%, 464px);
	max-width: 100%;
	max-height: calc(100vh - 24px);
	max-height: calc(var(--nf-viewport, 100dvh) - 24px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: clamp(20px, 6vw, 32px);
	border: 0;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 20px 60px rgb(17 26 12 / 24%);
}

.newton-form-modal .newton-form-modal__brand {
	margin: 0 48px 12px 0;
	color: #527400;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .055em;
}

.newton-form-modal .newton-form-modal__title {
	margin: 0 32px 9px 0;
	color: var(--nf-ink);
	font-size: clamp(24px, 6vw, 30px);
	font-weight: 700;
	line-height: 1.16;
	letter-spacing: -.025em;
}

.newton-form-modal .newton-form-modal__copy {
	margin: 0 0 20px;
	color: var(--nf-muted);
	font-size: 14px;
	line-height: 1.6;
}

.newton-form-modal .newton-form-modal__close {
	position: absolute;
	inset: 11px 11px auto auto;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f1f4ed;
	color: var(--nf-ink);
	cursor: pointer;
}

.newton-form-modal__close:hover { background: #e5eddc; }
.newton-form-modal__close::before,
.newton-form-modal__close::after {
	position: absolute;
	inset: 50% auto auto 50%;
	width: 16px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	content: "";
	transform: translate(-50%, -50%) rotate(45deg);
}
.newton-form-modal__close::after { transform: translate(-50%, -50%) rotate(-45deg); }

.newton-form-modal .newton-form-modal__shortcode { width: 100%; }
.newton-form-modal .newton-form__fields { grid-template-columns: minmax(0, 1fr); }
.newton-form-modal .wpcf7 .wpcf7-form .newton-form input.wpcf7-submit[type="submit"] { width: 100%; }
.newton-form-modal .newton-form .wpcf7-spinner { right: 10px; margin: 0; }

@media (max-width: 767px) {
	.newton-form__fields { grid-template-columns: minmax(0, 1fr); }
	.wpcf7 .wpcf7-form .newton-form input.wpcf7-submit[type="submit"] { width: 100%; }
	.newton-form .wpcf7-spinner { right: 10px; margin: 0; }
}

.wpcf7 .newton-form__field input[type="tel"]::placeholder {
	color: var(--nf-muted);
	opacity: 1;
}
