/* Nexus Forms: scoped under .nxf so it cannot leak into, or be broken by, the theme. */

.nxf, .nxf *, .nxf *::before, .nxf *::after { box-sizing: border-box; }
.nxf [hidden] { display: none !important; }

.nxf {
	--nx-red: #B00000;
	--nx-deep: #5C0000;
	--nx-ink: #241010;
	--nx-cream: #FDF6F2;
	--nx-line: #EAD9D9;
	--nx-muted: #6f5a5a;
	width: 100%;
	max-width: 880px;
	margin: 0 auto;
	font-family: "PT Serif", Georgia, "Times New Roman", serif;
	font-size: 17px;
	line-height: 1.6;
	color: var(--nx-ink);
	text-align: left;
}

.nxf .nxf-card {
	background: #fff;
	border: 1px solid var(--nx-line);
	border-top: 4px solid var(--nx-red);
	border-radius: 6px;
	padding: 40px 44px 36px;
	box-shadow: 0 18px 40px -26px rgba(92, 0, 0, .35);
}

.nxf .nxf-title {
	font-family: "Playfair Display", Georgia, serif;
	font-size: 30px;
	line-height: 1.2;
	font-weight: 700;
	color: #170707;
	margin: 0 0 8px;
	padding: 0;
}
.nxf .nxf-intro { margin: 0 0 26px; color: var(--nx-muted); font-size: 17px; }

.nxf .nxf-grid { display: flex; flex-wrap: wrap; gap: 22px 22px; margin: 0 0 28px; }
.nxf .nxf-field { flex: 1 1 100%; min-width: 0; position: relative; }
.nxf .nxf-field.nxf-half { flex: 1 1 calc(50% - 11px); }

.nxf .nxf-field label {
	display: block;
	margin: 0 0 8px;
	font-family: "Playfair Display", Georgia, serif;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .01em;
	color: var(--nx-deep);
	text-transform: none;
}
.nxf .nxf-req label::after { content: " *"; color: var(--nx-red); }

.nxf .nxf-field input,
.nxf .nxf-field select,
.nxf .nxf-field textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 13px 16px;
	font-family: "PT Serif", Georgia, serif;
	font-size: 17px;
	line-height: 1.4;
	color: var(--nx-ink);
	background-color: var(--nx-cream);
	border: 1px solid var(--nx-line);
	border-radius: 4px;
	box-shadow: none;
	outline: 0;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.nxf .nxf-field input,
.nxf .nxf-field select { height: 52px; }
.nxf .nxf-field textarea { min-height: 150px; resize: vertical; }
.nxf .nxf-field ::placeholder { color: #a08e8e; opacity: 1; }

.nxf .nxf-field select {
	padding-right: 44px;
	cursor: pointer;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1.5l6 6 6-6' fill='none' stroke='%23B00000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
	background-repeat: no-repeat;
	background-position: right 16px center;
}

.nxf .nxf-field input:hover,
.nxf .nxf-field select:hover,
.nxf .nxf-field textarea:hover { border-color: #d6b9b9; }

.nxf .nxf-field input:focus,
.nxf .nxf-field select:focus,
.nxf .nxf-field textarea:focus {
	background-color: #fff;
	border-color: var(--nx-red);
	box-shadow: 0 0 0 3px rgba(176, 0, 0, .14);
}

.nxf .nxf-field.nxf-invalid input,
.nxf .nxf-field.nxf-invalid select,
.nxf .nxf-field.nxf-invalid textarea { border-color: var(--nx-red); background-color: #fff6f6; }
.nxf .nxf-field.nxf-invalid label { color: var(--nx-red); }

.nxf .nxf-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.nxf .nxf-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 200px;
	height: 56px;
	margin: 0;
	padding: 0 38px;
	font-family: "Playfair Display", Georgia, serif;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: .02em;
	line-height: 1;
	color: #fff;
	background: var(--nx-red);
	border: 0;
	border-radius: 4px;
	cursor: pointer;
	text-transform: none;
	box-shadow: 0 10px 22px -12px rgba(176, 0, 0, .75);
	transition: background-color .18s ease, transform .18s ease;
}
.nxf .nxf-submit:hover { background: var(--nx-deep); transform: translateY(-1px); }
.nxf .nxf-submit:focus-visible { outline: 3px solid rgba(176, 0, 0, .35); outline-offset: 3px; }
.nxf .nxf-submit[disabled] { opacity: .75; cursor: progress; transform: none; }
.nxf.nxf-busy .nxf-submit .nxf-btn-label::after {
	content: "";
	display: inline-block;
	width: 15px;
	height: 15px;
	margin-left: 12px;
	vertical-align: -2px;
	border: 2px solid rgba(255, 255, 255, .45);
	border-top-color: #fff;
	border-radius: 50%;
	animation: nxf-spin .7s linear infinite;
}
@keyframes nxf-spin { to { transform: rotate(360deg); } }

.nxf .nxf-note { margin: 16px 0 0; font-size: 14px; color: var(--nx-muted); }

.nxf .nxf-alert {
	margin: 0 0 24px;
	padding: 14px 18px;
	font-size: 16px;
	color: #7a0000;
	background: #fff1f1;
	border: 1px solid #efc4c4;
	border-left: 4px solid var(--nx-red);
	border-radius: 4px;
}

.nxf .nxf-success { text-align: center; padding: 28px 12px 20px; }
.nxf .nxf-success-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin: 0 0 18px;
	color: #fff;
	background: var(--nx-red);
	border-radius: 50%;
	box-shadow: 0 0 0 8px rgba(176, 0, 0, .10);
}
.nxf .nxf-success h3 {
	margin: 0 0 8px;
	padding: 0;
	font-family: "Playfair Display", Georgia, serif;
	font-size: 26px;
	line-height: 1.25;
	color: #170707;
}
.nxf .nxf-success p { margin: 0; color: var(--nx-muted); }

@media (max-width: 680px) {
	.nxf .nxf-card { padding: 28px 22px 26px; }
	.nxf .nxf-field.nxf-half { flex-basis: 100%; }
	.nxf .nxf-submit { width: 100%; }
	.nxf .nxf-title { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
	.nxf * { transition: none !important; animation: none !important; }
}

.nxf .nxf-success .nxf-admin-note { margin-top: 18px; padding: 10px 14px; font-size: 14px; text-align: left; color: #5C0000; background: #FDF6F2; border: 1px dashed #d9a768; border-radius: 4px; }
