/* ITSA Contact Form styles — accessibility-focused (dyslexia-friendly) */

/* Base: generous letter spacing, clear line height, large readable text */
.itsa-contact-form-wrap {
	max-width: 700px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Open Sans", Helvetica, Arial, sans-serif;
	color: #222;
	line-height: 1.6;
	letter-spacing: 0.02em;
	border: 1px solid #dfe3e8;
	border-radius: 10px;
	margin-top: 1.5rem;
	padding: 2rem 2rem 1.5rem 2rem;
	background: #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.itsa-contact-form {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

/* Inline field: label and input side by side */
.itsa-contact-form__field {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.75rem;
}

.itsa-contact-form__field label {
	font-size: 0.95rem;
	font-weight: 600;
	margin-bottom: 0;
	color: #444;
	letter-spacing: 0.02em;
	flex-shrink: 0;
	min-width: 115px;
	text-align: right;
}

.itsa-contact-form__field .required {
	color: #d63638;
	margin-left: 0.25em;
	font-weight: 700;
}

.itsa-contact-form__field input,
.itsa-contact-form__field textarea {
	width: auto;
	flex: 1;
	padding: 0.5rem 1rem;
	font-size: 1.1rem;
	font-family: inherit;
	border: 2px solid #9aa3ad;
	border-radius: 6px;
	box-sizing: border-box;
	background: #fff;
	color: #222;
	letter-spacing: 0.03em;
	line-height: 1.5;
}

.itsa-contact-form__field input:focus,
.itsa-contact-form__field textarea:focus {
	outline: 3px solid #0073aa;
	outline-offset: 2px;
	border-color: #0073aa;
	box-shadow: 0 0 0 4px rgba(0, 115, 170, 0.15);
}

.itsa-contact-form__field--consent input {
	width: auto;
	flex-shrink: 0;
	margin: 0;
}

.itsa-contact-form__error {
	color: #d63638;
	font-size: 0.95rem;
	margin-top: 0.4rem;
	display: none;
	letter-spacing: 0.02em;
}

/* Icon prefix for errors so color isn't the only cue */
.itsa-contact-form__error::before {
	content: "⚠ ";
	margin-right: 0.35em;
}

.itsa-contact-form__messages {
	margin-bottom: 1rem;
	min-height: 1.5rem;
}

.itsa-contact-form__messages--success {
	color: #1e7e34;
	background: #e7f7ea;
	border: 1px solid #b7e4c7;
	border-radius: 6px;
	padding: 0.6rem 1rem;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.itsa-contact-form__messages--error {
	color: #d63638;
	background: #fdecea;
	border: 1px solid #f5c6c6;
	border-radius: 6px;
	padding: 0.6rem 1rem;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.itsa-contact-form__messages--error::before {
	content: "⚠ ";
	margin-right: 0.5em;
	font-weight: 700;
}

.itsa-contact-form__submit {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.9rem 1.75rem;
	font-size: 1.1rem;
	font-weight: 600;
	border: 2px solid #005f8d;
	border-radius: 6px;
	background: #0073aa;
	color: #fff;
	cursor: pointer;
	align-self: center;
	letter-spacing: 0.02em;
}

.itsa-contact-form__submit:hover {
	background: #005f8d;
	border-color: #003d66;
}

.itsa-contact-form__submit:focus {
	outline: 3px solid #0073aa;
	outline-offset: 2px;
	box-shadow: 0 0 0 4px rgba(0, 115, 170, 0.3);
}

.itsa-contact-form__submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
	border-color: #9aa3ad;
	background: #9aa3ad;
}

.itsa-contact-form__submit-loading {
	font-size: 0.95rem;
}

/* Honeypot: hidden from humans and screen readers */
.itsa-contact-form__honeypot {
	position: absolute !important;
	left: -9999px;
	pointer-events: none;
}

/* Screen-reader only text (for honeypot label) */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	word-wrap: normal !important;
	border: 0;
}

@media (max-width: 560px) {
	.itsa-contact-form-wrap {
		padding: 0 1rem;
	}

	.itsa-contact-form__field {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.4rem;
	}

	.itsa-contact-form__field label {
		min-width: auto;
		text-align: left;
		margin-bottom: 0.4rem;
	}

	.itsa-contact-form__field input,
	.itsa-contact-form__field textarea {
		width: 100%;
		flex: none;
	}
}

/* Remove white border outline on header navigation links when clicked/focused */
nav a,
header a,
.wp-block-navigation-item__content {
	outline: 0 !important;
	box-shadow: none !important;
}
nav a:focus,
nav a:focus-visible,
header a:focus,
header a:focus-visible,
.wp-block-navigation-item__content:focus,
.wp-block-navigation-item__content:focus-visible {
	outline: 0 !important;
	box-shadow: none !important;
}
