/*
 * safenmedical.com — the ii-forms contact form, styled to the Kadence theme.
 * Colours and type come from Kadence's own custom properties (--global-palette*),
 * with the live site's values as fallbacks (measured 2026-10-22).
 * The class names are ii-forms' shipped interface (.ii-nc-form*).
 */
.ii-nc-form {
	--sm-form-accent: var(--global-palette1, #25408f);
	--sm-form-accent-2: var(--global-palette2, #7b9ac3);
	--sm-form-text: var(--global-palette3, #292929);
	--sm-form-muted: var(--global-palette5, #54595f);
	--sm-form-line: #c9cdd3;
	--sm-form-bg: var(--global-palette9, #ffffff);
	--sm-form-error: #b3261e;
	--sm-form-radius: 4px;
	color: var(--sm-form-text);
	/* The Contact page is Kadence full-width: its rows carry their own padding, and the
	   form sits outside them. So the form brings its own: centred under the heading,
	   at most 760px of fields, and the theme's content-edge gutter on every side. */
	box-sizing: content-box;
	max-width: 760px;
	margin: 0 auto var(--global-xxl-spacing, 4rem);
	padding: 0 var(--global-content-edge-padding, 1.5rem);
}

.ii-nc-form__form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem 1.25rem;
}

.ii-nc-form__summary,
.ii-nc-form__field--textarea,
.ii-nc-form__field--select,
.ii-nc-form__consent,
.ii-nc-form__failure,
.ii-nc-form__status,
.ii-nc-form__submit,
.ii-nc-form__field[data-field="other_source"] {
	grid-column: 1 / -1;
}

@media (max-width: 640px) {
	.ii-nc-form__form {
		grid-template-columns: 1fr;
	}
}

.ii-nc-form__field[hidden] {
	display: none;
}

.ii-nc-form__label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
	font-size: 0.95rem;
}

.ii-nc-form__required {
	color: var(--sm-form-error);
}

.ii-nc-form__control {
	display: block;
	width: 100%;
	box-sizing: border-box;
	min-height: 2.75rem;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--sm-form-line);
	border-radius: var(--sm-form-radius);
	background: var(--sm-form-bg);
	color: var(--sm-form-text);
	font: inherit;
	line-height: 1.4;
}

.ii-nc-form__control:focus {
	outline: 2px solid var(--sm-form-accent-2);
	outline-offset: 1px;
	border-color: var(--sm-form-accent);
}

.ii-nc-form__control[aria-invalid="true"] {
	border-color: var(--sm-form-error);
}

.ii-nc-form__error {
	margin: 0.3rem 0 0;
	color: var(--sm-form-error);
	font-size: 0.875rem;
}

.ii-nc-form__error:empty {
	display: none;
}

.ii-nc-form__summary {
	padding: 1rem 1.25rem;
	border: 2px solid var(--sm-form-error);
	border-radius: var(--sm-form-radius);
	background: #fdf3f2;
}

.ii-nc-form__summary-title {
	margin: 0 0 0.5rem;
	font-weight: 700;
}

.ii-nc-form__summary-list {
	margin: 0;
	padding-left: 1.25rem;
}

.ii-nc-form__summary-list a {
	color: var(--sm-form-error);
}

/* Doubled class: Kadence's `.single-content p` margin would otherwise win. */
.ii-nc-form .ii-nc-form__consent,
.ii-nc-form .ii-nc-form__status {
	margin: 0;
	color: var(--sm-form-muted);
	font-size: 0.9rem;
}

.ii-nc-form__consent a,
.ii-nc-form__failure a {
	color: var(--sm-form-accent);
}

.ii-nc-form__failure {
	padding: 0.85rem 1rem;
	border-left: 4px solid var(--sm-form-error);
	background: #fdf3f2;
}

.ii-nc-form__submit,
.ii-nc-form__again {
	justify-self: start;
	padding: 0.8rem 2rem;
	border: 0;
	border-radius: var(--sm-form-radius);
	background: var(--sm-form-accent);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.ii-nc-form__submit:hover,
.ii-nc-form__submit:focus-visible,
.ii-nc-form__again:hover,
.ii-nc-form__again:focus-visible {
	background: var(--sm-form-text);
}

.ii-nc-form__submit[disabled] {
	opacity: 0.6;
	cursor: progress;
}

.ii-nc-form__success {
	padding: 1.5rem;
	border-left: 4px solid var(--sm-form-accent);
	background: var(--global-palette8, #f9f9f9);
}

.ii-nc-form__success-heading {
	margin: 0 0 1rem;
	font-size: 1.25rem;
}

@media (prefers-reduced-motion: no-preference) {
	.ii-nc-form__success {
		animation: sm-form-in 240ms ease-out;
	}
}

@keyframes sm-form-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: none; }
}
