/* imran.id contact form. Uses the imran.id theme colours when available, with fallbacks. */

.imr-contact {
	/* Same width and left edge as the page text around it. */
	max-width: none;
	--imr-c-navy: var(--wp--preset--color--navy, #1E3A5F);
	--imr-c-teal: var(--wp--preset--color--teal, #0D8070);
	--imr-c-text: var(--wp--preset--color--contrast, #0F172A);
	--imr-c-muted: var(--wp--preset--color--muted, #64748B);
	--imr-c-border: #CBD5E1;
	--imr-c-error: #B91C1C;
}

.imr-contact__form {
	display: grid;
	gap: 1.25rem;
}

.imr-field label {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--imr-c-navy);
}

.imr-optional {
	font-weight: 400;
	color: var(--imr-c-muted);
}

.imr-field input,
.imr-field select,
.imr-field textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 0.75rem 0.9rem;
	font: inherit;
	color: var(--imr-c-text);
	background: #FFFFFF;
	border: 1px solid var(--imr-c-border);
	border-radius: 8px;
}

.imr-field textarea {
	min-height: 10rem;
	resize: vertical;
}

/* Soft hint text inside empty fields, still readable (4.5:1 on white). */
.imr-field input::placeholder,
.imr-field textarea::placeholder {
	color: var(--imr-c-muted);
	opacity: 1;
}

.imr-field input:focus,
.imr-field select:focus,
.imr-field textarea:focus {
	outline: 2px solid var(--imr-c-teal);
	outline-offset: 1px;
	border-color: var(--imr-c-teal);
}

.imr-field.has-error input,
.imr-field.has-error select,
.imr-field.has-error textarea {
	border-color: var(--imr-c-error);
}

.imr-error {
	margin: 0.35rem 0 0;
	font-size: 0.875rem;
	color: var(--imr-c-error);
}

.imr-privacy {
	margin: 0;
	font-size: 0.875rem;
	color: var(--imr-c-muted);
}

.imr-submit {
	cursor: pointer;
	border: 0;
}

/* Honeypot: hidden from people and screen readers, still in the form for bots. */
.imr-hp {
	position: absolute !important;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.imr-notice {
	margin-bottom: 1.25rem;
	padding: 1rem 1.25rem;
	border: 1px solid;
	border-radius: 12px;
}

.imr-notice p {
	margin: 0.25rem 0;
}

.imr-notice__title {
	font-weight: 600;
}

.imr-notice--success {
	color: #065F46;
	background: #ECFDF5;
	border-color: #A7F3D0;
}

.imr-notice--success a {
	color: #065F46;
	text-decoration: underline;
}

.imr-notice--error {
	color: #991B1B;
	background: #FEF2F2;
	border-color: #FECACA;
}
