/* Contact form shared by the contact and contact_page layouts (template-parts/global/contact-form.php). */

/* Form: Framer's native form fields. */
.contact-form {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-20);
	width: 100%;
	overflow: hidden;
}

.contact-form__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.contact-form__field {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-10);
	width: 100%;
	min-width: 1px;
	margin: 0;
	padding: 0;
	border: 0;
}

.contact-form__pair {
	display: flex;
	align-items: center;
	gap: var(--space-20);
	width: 100%;

	& .contact-form__field {
		flex: 1 0 0;
	}
}

.contact-form__muted {
	font-family: var(--font-inter);
	font-size: var(--fs-12);
	font-weight: var(--fw-medium);
	line-height: var(--lh-120);
	color: var(--color-gray);
}

.contact-form__input {
	width: 100%;
	padding: 12px;
	font-family: var(--font-figtree);
	font-size: var(--fs-14);
	font-weight: var(--fw-regular);
	line-height: var(--lh-120);
	color: var(--color-ink-70);
	background: var(--color-white);
	border: 1px solid var(--color-ink-10);
	border-radius: var(--radius-10);
	outline: none;
	transition: border-color 0.2s var(--ease-framer);

	&::placeholder {
		color: var(--color-ink-50);
		opacity: 1;
	}

	&:focus {
		border-color: var(--color-sand);
	}
}

.contact-form__textarea {
	min-height: 100px;
	resize: vertical;
}

.contact-form__select {
	padding-right: 36px;
	font-family: var(--font-inter);
	color: #999;
	background: rgb(187 187 187 / 0.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
	border-color: rgb(136 136 136 / 0.1);
	appearance: none;

	&:focus {
		border-color: #09f;
	}
}

/* Offer subpages: translucent white select, olive text, sage-light arrow. */
.contact-form__select--light {
	color: var(--color-olive);
	background-color: rgb(255 255 255 / 0.42);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23dce3d7' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

	&:invalid {
		color: #999;
	}
}

.contact-form__heading {
	width: 100%;
	max-width: 800px;
	font-family: var(--font-questrial);
	font-size: var(--fs-30);
	font-weight: var(--fw-regular);
	line-height: var(--lh-120);
	letter-spacing: var(--ls-wide);
	color: var(--color-olive);
}

.contact-form__radios legend {
	margin-bottom: var(--space-10);
	padding: 0;
}

.contact-form__options {
	display: flex;
	align-items: center;
	gap: var(--space-10);
	width: 100%;

	& .contact-form__option {
		flex: 1 0 0;
	}
}

.contact-form__option {
	display: flex;
	align-items: center;
	gap: var(--space-10);
	cursor: pointer;
	user-select: none;
}

.contact-form__consent {
	display: flex;
	align-items: center;
	gap: var(--space-10);
	width: 100%;
}

/* Framer's default link preset (1ydy5hk): blue, no underline. */
.contact-form__consent-link {
	color: #09f;
}

/* Framer's default boolean inputs, blue (#09f) when checked. */
.contact-form__radio,
.contact-form__checkbox {
	flex: none;
	width: 16px;
	height: 16px;
	margin: 0;
	cursor: pointer;
	background: rgb(187 187 187 / 0.2);
	border: 1px solid rgb(136 136 136 / 0.2);
	appearance: none;

	&:focus-visible {
		outline: 1px solid #09f;
		outline-offset: 1px;
	}
}

.contact-form__radio {
	border-radius: 8px;

	&:checked {
		background: var(--color-white);
		border-color: #09f;
		box-shadow: inset 0 0 0 5px #09f;
	}
}

.contact-form__checkbox {
	border-radius: 4px;

	&:checked {
		background: #09f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.5 7 11l4.5-5.5' fill='none' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
		border-color: #09f;
	}
}

/* Submit: Framer states Default / hover / Success / Error / Disabled. */
.contact-form__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 240px;
	height: 40px;
	color: var(--color-sage);
	cursor: pointer;
	background: var(--color-olive);
	border-radius: 100px;
	transition:
		background-color 0.2s var(--ease-framer),
		color 0.2s var(--ease-framer),
		opacity 0.2s var(--ease-framer);

	& .type-small {
		color: inherit;
	}

	& svg {
		flex: none;
		fill: none;
		stroke: currentColor;
		stroke-linecap: round;
		stroke-linejoin: round;
		stroke-width: 1;
		transform: rotate(-45deg);
		transition: transform 0.2s var(--ease-framer);
	}

	&:hover {
		background: rgb(147 171 135);

		& svg {
			transform: none;
		}
	}

	&.is-sent {
		color: var(--color-olive);
		cursor: default;
		background: var(--color-sage);
	}

	&.is-error,
	&.is-invalid {
		color: rgb(255 34 68);
		background: rgb(255 34 68 / 0.15);
	}

	&:disabled:not(.is-sent) {
		opacity: 0.5;
	}
}

.contact-form__submit--full {
	width: 100%;
}
