/* ==========================================================================
   PurOstill V2 — Ninja Forms
   Makes the contact and newsletter forms (Hooks/ninja-forms) look like the
   theme's own forms. Everything is scoped to .v2-nf so other Ninja Forms
   placed in page content keep the plugin's look.
   ========================================================================== */

.v2-nf .nf-form-cont { margin: 0; }
.v2-nf .nf-form-content { max-width: none; padding: 0; margin: 0; }
.v2-nf .nf-form-title,
.v2-nf .nf-before-form-content { display: none; } /* "Fields marked with * are required" */
.v2-nf .nf-field-container { margin: 0; }
.v2-nf .nf-field-label { margin: 0 0 .4rem; padding: 0; }
.v2-nf .nf-field-label label { font-size: .85rem; font-weight: 600; color: var(--v2-ink); margin: 0; }
.v2-nf .ninja-forms-req-symbol { color: var(--v2-sale); }

/* Inputs: same as the theme's .v2 inputs, beating the plugin's own styles. */
.v2-nf .nf-form-content input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
.v2-nf .nf-form-content textarea,
.v2-nf .nf-form-content select,
.v2-nf .nf-form-content .list-select-wrap .nf-field-element > div {
	width: 100%;
	height: auto;
	min-height: 48px;
	padding: .7rem 1rem;
	border: 1px solid color-mix(in srgb, var(--v2-line) 70%, var(--v2-muted));
	border-radius: .9rem;
	background: var(--v2-surface);
	color: var(--v2-ink);
	font-family: inherit;
	font-size: 1rem;
	box-shadow: none;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.v2-nf .nf-form-content textarea { min-height: 140px; height: 160px; resize: vertical; }
/* Dropdown: drop the plugin's fake arrow box and style the real select. */
.v2-nf .nf-form-content .list-select-wrap .nf-field-element > div { padding: 0; border: 0; background: none; min-height: 0; }
.v2-nf .nf-form-content .list-select-wrap > div div { display: none !important; }
.v2-nf .nf-form-content .list-select-wrap .nf-field-element select {
	-webkit-appearance: none; appearance: none;
	height: auto; min-height: 48px;
	padding: .7rem 2.75rem .7rem 1rem;
	border: 1px solid color-mix(in srgb, var(--v2-line) 70%, var(--v2-muted));
	border-radius: .9rem;
	background: var(--v2-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234c809a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 1rem center / 16px;
	color: var(--v2-ink);
	cursor: pointer;
}
.v2-nf .nf-form-content .list-select-wrap .nf-field-element select:focus {
	border-color: var(--v2-accent);
	box-shadow: 0 0 0 3px rgba(var(--v2-accent-rgb), .15);
}
.v2-nf .nf-form-content input:focus,
.v2-nf .nf-form-content textarea:focus,
.v2-nf .nf-form-content select:focus {
	outline: none;
	border-color: var(--v2-accent);
	box-shadow: 0 0 0 3px rgba(var(--v2-accent-rgb), .15);
}

/* Submit: the theme button. */
.v2-nf .nf-form-content input[type="submit"],
.v2-nf .nf-form-content button {
	display: inline-flex; align-items: center; justify-content: center;
	height: 48px; padding: 0 1.5rem;
	border: none; border-radius: .75rem;
	background: var(--v2-accent); color: #fff;
	font-family: inherit; font-size: 1rem; font-weight: 700; letter-spacing: .015em;
	cursor: pointer;
	transition: background .2s ease;
}
.v2-nf .nf-form-content input[type="submit"]:hover { background: rgba(var(--v2-accent-rgb), .9); color: #fff; }
.v2-nf .nf-form-content input[type="submit"]:disabled { opacity: .6; cursor: wait; }

/* Errors and the thank-you message. */
.v2-nf .nf-error .ninja-forms-field { border-color: var(--v2-sale) !important; }
.v2-nf .nf-error-msg,
.v2-nf .nf-error-required-error { color: var(--v2-sale); font-size: .85rem; margin-top: .35rem; }
.v2-nf .nf-form-errors .nf-error-msg { margin: .75rem 0 0; }
.v2-nf .nf-response-msg { color: var(--v2-ok); font-weight: 600; }
.v2-nf .nf-response-msg p { margin: 0; }
.v2-nf .nf-after-form-content { margin: 0; }

/* --- Contact: name and email side by side, the rest full width ---------- */
.v2-nf--contact nf-fields-wrap { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) {
	.v2-nf--contact nf-fields-wrap { grid-template-columns: 1fr 1fr; }
	.v2-nf--contact nf-field:has(.listselect-container, .textarea-container, .submit-container) { grid-column: 1 / -1; }
}
.v2-nf--contact .submit-container input[type="submit"] { width: 100%; }
.v2-nf--contact .nf-response-msg { padding: 1rem 1.25rem; border-radius: .9rem; background: rgba(21, 128, 61, .08); }

/* --- Newsletter: email and button on one row ---------------------------- */
.v2-nf--newsletter nf-fields-wrap { display: flex; flex-direction: column; gap: .6rem; }
@media (min-width: 640px) {
	.v2-nf--newsletter nf-fields-wrap { flex-direction: row; }
	.v2-nf--newsletter nf-field:has(.email-container) { flex: 1; min-width: 0; }
	.v2-nf--newsletter nf-field:has(.submit-container) { flex: none; }
}
.v2-nf--newsletter .submit-container input[type="submit"] { width: 100%; min-width: 150px; }
.v2-nf--newsletter .nf-field-label { display: none; }

/* Footer: the signup sits on the dark band. */
.v2-footer .v2-nf--newsletter .nf-form-content input[type="email"]:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]) {
	border-color: color-mix(in srgb, var(--v2-on-dark) 25%, transparent);
	border-radius: .75rem;
	background: color-mix(in srgb, #fff 8%, transparent);
	color: #fff;
	font-size: .95rem;
}
.v2-footer .v2-nf--newsletter .nf-form-content input[type="email"]:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"])::placeholder { color: color-mix(in srgb, var(--v2-on-dark) 55%, transparent); }
.v2-footer .v2-nf--newsletter .nf-form-content input[type="email"]:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):focus { background: color-mix(in srgb, #fff 12%, transparent); }
.v2-footer .v2-nf .nf-response-msg { color: var(--v2-on-dark); font-size: .95rem; }
.v2-footer .v2-nf .nf-error-msg { color: #fca5a5; }
@media (max-width: 639px) {
	.v2-footer .v2-nf--newsletter .submit-container input[type="submit"] { width: 100%; }
}
