/* ==========================================================================
   Forms (Fluent Forms, theme-inherited), form card, contact grid + panel.
   Fluent Forms markup is scoped through .frm-fluent-form (form element).
   ========================================================================== */

.nj-form-section > * { max-width: 880px; }
.nj-form-card {
	background: #fff;
	border-radius: var(--nj-r-card);
	padding: clamp(1.75rem, 4vw, 3.5rem);
	border: var(--nj-hair);
	border-top: 3px solid var(--nj-ink);
	display: grid;
	gap: 1.75rem;
}
.nj-form-card > * { margin: 0 !important; }

/* Contact page: form + details side by side */
.nj-form-section:has(.nj-contact-grid) > * { max-width: var(--nj-wide); }
.nj-contact-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.nj-contact-grid > * { margin: 0 !important; }
.nj-contact-panel { background: var(--nj-graphite); color: rgb(255 255 255 / .76); border-radius: var(--nj-r-card); padding: clamp(1.75rem, 3.5vw, 3rem); display: grid; gap: 1rem; }
.nj-contact-panel > * { margin: 0 !important; }
.nj-contact-panel h4 { color: #fff; font-size: 1.6rem; }
.nj-contact-panel h4 + p { color: #fff; }
.nj-contact-panel h4:not(:first-child) { margin-top: 1rem !important; padding-top: 1.5rem; border-top: 1px solid rgb(255 255 255 / .12); font-size: 1.25rem; }
.nj-contact-panel a { color: #fff; text-decoration-color: var(--nj-red); }
.nj-contact-panel a:hover { color: var(--nj-red); }
.nj-week { margin: 0; }
.nj-week table { width: 100%; border-collapse: collapse; font-size: .9375rem; table-layout: auto; border: 0; }
.nj-week td { padding: 9px 0; border: 0; border-bottom: 1px solid rgb(255 255 255 / .1); white-space: nowrap; }
.nj-week td:first-child { color: rgb(255 255 255 / .55); width: 30%; }
.nj-week td:last-child { color: #fff; text-align: right; }
@media (max-width: 900px) { .nj-contact-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------------
   Fluent Forms reset (per form: Styling = Inherit Theme Style, button No style)
   ------------------------------------------------------------------------- */
.frm-fluent-form { --nj-field-bg: #fff; margin: 0; }
.frm-fluent-form fieldset { border: 0; padding: 0; margin: 0; }
/* Columns wrap by the form's own width (sidebar, hero, page), not the viewport: 3-field rows go 3 → 2+1 → 1,
   4-field rows go 4 → 2+2 → 1 (never 3+1) */
.frm-fluent-form { container-type: inline-size; }
.frm-fluent-form .ff-t-container { display: flex; flex-direction: row; flex-wrap: wrap; gap: 0 16px; }
.frm-fluent-form .ff-t-cell { flex: 1 1 200px !important; width: auto !important; max-width: 100%; min-width: 0; padding: 0 !important; }
@container (max-width: 841px) {
	.frm-fluent-form .ff-t-container:has(> .ff-t-cell:nth-child(4):last-child) > .ff-t-cell { flex-basis: max(160px, calc(50% - 16px)) !important; }
}
.frm-fluent-form .ff-el-group { margin-bottom: 18px; }
.frm-fluent-form .ff-el-input--label { margin-bottom: 8px; }
.frm-fluent-form .ff-el-input--label label { font-size: 13px; font-weight: 700; color: var(--nj-ink); letter-spacing: .04em; }
.frm-fluent-form .ff-el-is-required.asterisk-right label::after { content: " *"; color: var(--nj-red-700); }
.frm-fluent-form .wpr-hide-label .ff-el-input--label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.frm-fluent-form .ff-el-form-control {
	width: 100%;
	min-height: 50px;
	padding: 12px 14px;
	font: inherit;
	font-size: 1rem;
	color: var(--nj-ink);
	background: var(--nj-field-bg);
	border: 1px solid #9A968E;
	border-radius: var(--nj-r-btn);
	box-shadow: none;
	transition: border-color .2s, box-shadow .2s;
	appearance: none;
}
.frm-fluent-form textarea.ff-el-form-control { min-height: 150px; resize: vertical; }
.frm-fluent-form .ff-el-form-control::placeholder { color: var(--nj-muted); opacity: 1; }
.frm-fluent-form .ff-el-form-control:hover { border-color: var(--nj-ink); }
.frm-fluent-form .ff-el-form-control:focus { outline: none; background: #fff; border-color: var(--nj-ink); box-shadow: 0 0 0 3px rgb(230 76 80 / .28); }
.frm-fluent-form .ff-el-is-error .ff-el-form-control { border-color: #c4332b; box-shadow: inset 0 0 0 1px #c4332b; background: #fff7f6; }
.frm-fluent-form .error.text-danger { display: block; margin-top: 6px; color: #b3261e; font-size: .8125rem; font-weight: 500; }
.frm-fluent-form .ff_submit_btn_wrapper { margin-top: 8px; }
.frm-fluent-form .ff-btn-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 0 24px;
	border: 0;
	border-radius: var(--nj-r-btn);
	background: var(--nj-red-600);
	color: #fff;
	font: 600 15px/1 var(--nj-body);
	letter-spacing: .01em;
	cursor: pointer;
	transition: background-color .32s var(--nj-ease-io), transform .1s;
}
.frm-fluent-form .ff-btn-submit:hover { background: var(--nj-ink); }
.frm-fluent-form .ff-btn-submit:active { transform: translateY(1px); }
.frm-fluent-form .ff-btn-submit:disabled { opacity: .6; cursor: wait; }
.nj-lp-form .frm-fluent-form .ff-btn-submit, .nj-contact__form .frm-fluent-form .ff-btn-submit { width: 100%; }
.ff-message-success {
	padding: 1.25rem 1.5rem;
	border-radius: var(--nj-r-card);
	background: #f1f8f2;
	box-shadow: inset 0 0 0 1px #cfe7d4;
	color: #1d4d2a;
	font-weight: 500;
}
.ff-errors-in-stack { margin-top: 1rem; color: #b3261e; }
@media (min-width: 640px) {
	/* Name / Email / Phone side by side where the form has them in sequence */
	.nj-form-card .frm-fluent-form fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
	.nj-form-card .frm-fluent-form fieldset > * { grid-column: 1 / -1; }
	.nj-form-card .frm-fluent-form fieldset > .ff-el-group:has(input[type="text"]),
	.nj-form-card .frm-fluent-form fieldset > .ff-el-group:has(input[type="email"]),
	.nj-form-card .frm-fluent-form fieldset > .ff-el-group:has(input[type="tel"]) { grid-column: auto; }
}
