/*
 * The states are Contact Form 7 classes on the form: submitting, invalid,
 * unaccepted, spam, failed and sent. Qualified selectors outweigh the core
 * layout rules, printed later.
 */
.portfolio-contact .portfolio-contact__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--32);
	align-items: start;
}

.portfolio-contact .portfolio-contact__inner > * {
	margin: 0;
}

.wpcf7 .wpcf7-form {
	padding: var(--wp--preset--spacing--22);
	border: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--28);
	background: var(--wp--preset--color--white);
}

/* What Contact Form 7's own stylesheet, left out, did for its markup. */
.wpcf7 .screen-reader-response {
	position: absolute;
	overflow: hidden;
	width: 1px;
	height: 1px;
	clip-path: inset(50%);
	white-space: nowrap;
}

.wpcf7 .hidden-fields-container {
	display: none;
}

.portfolio-contact__fields {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--22);
}

.portfolio-contact__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--16);
}

.portfolio-contact__field,
.portfolio-contact__field .wpcf7-form-control-wrap {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--8);
}

.portfolio-contact__label {
	padding: 0;
	font-size: var(--wp--preset--font-size--14);
	font-weight: var(--wp--custom--font-weight--semibold);
	color: var(--wp--preset--color--ink);
}

.portfolio-contact__label em {
	margin-left: var(--wp--preset--spacing--6);
	font-style: normal;
	font-weight: var(--wp--custom--font-weight--regular);
	color: var(--wp--preset--color--grey);
}

.portfolio-contact__field textarea {
	min-height: var(--wp--custom--size--message);
	resize: vertical;
}

.portfolio-contact__field ::placeholder {
	color: var(--wp--custom--color--placeholder);
}

.portfolio-contact__choices {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.portfolio-contact__choices legend {
	margin-bottom: var(--wp--preset--spacing--10);
}

.portfolio-contact__choices .wpcf7-radio {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--8);
}

.portfolio-contact__choices label {
	position: relative;
	cursor: pointer;
}

.portfolio-contact :is(.portfolio-contact__choices, .portfolio-contact__consent) input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.portfolio-contact__choices .wpcf7-list-item-label {
	display: inline-flex;
	align-items: center;
	height: var(--wp--custom--control--nav);
	padding-inline: var(--wp--preset--spacing--16);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--tint);
	font-size: var(--wp--preset--font-size--14);
	font-weight: var(--wp--custom--font-weight--medium);
	color: var(--wp--preset--color--ink);
	transition:
		background-color var(--wp--custom--duration--hover) ease,
		color var(--wp--custom--duration--hover) ease;
}

.portfolio-contact__choices input:checked + .wpcf7-list-item-label {
	background: var(--wp--preset--color--blue);
	color: var(--wp--preset--color--white);
}

.portfolio-contact :is(.portfolio-contact__choices, .portfolio-contact__consent) input:focus-visible + .wpcf7-list-item-label::before,
.portfolio-contact__choices input:focus-visible + .wpcf7-list-item-label {
	outline: var(--wp--custom--border--focus) solid var(--wp--preset--color--blue);
	outline-offset: var(--wp--custom--border--focus);
}

.portfolio-contact__consent label {
	position: relative;
	display: block;
	padding-left: var(--wp--preset--spacing--36);
	font-size: var(--wp--preset--font-size--14);
	color: var(--wp--preset--color--grey);
	cursor: pointer;
}

.portfolio-contact__consent .wpcf7-list-item-label::before {
	content: "";
	position: absolute;
	top: var(--wp--custom--border--hairline);
	left: 0;
	box-sizing: border-box;
	width: var(--wp--custom--size--checkbox);
	height: var(--wp--custom--size--checkbox);
	border: var(--wp--custom--border--underline) solid var(--wp--custom--color--checkbox);
	border-radius: var(--wp--custom--radius--6);
	transition:
		background-color var(--wp--custom--duration--fast) ease,
		border-color var(--wp--custom--duration--fast) ease;
}

.portfolio-contact__consent input:checked + .wpcf7-list-item-label::before {
	border-color: var(--wp--preset--color--blue);
	background: var(--wp--preset--color--blue);
}

.portfolio-contact__consent input:checked + .wpcf7-list-item-label::after {
	content: "";
	position: absolute;
	top: var(--wp--preset--spacing--4);
	left: var(--wp--preset--spacing--8);
	width: var(--wp--preset--spacing--6);
	height: var(--wp--preset--spacing--10);
	border-right: var(--wp--custom--border--focus) solid var(--wp--preset--color--white);
	border-bottom: var(--wp--custom--border--focus) solid var(--wp--preset--color--white);
	transform: rotate(45deg);
}

.portfolio-contact__consent a {
	color: var(--wp--preset--color--blue);
	text-decoration: underline;
	text-underline-offset: var(--wp--custom--border--focus);
}

/* Hidden from people and assistive technology, filled only by bots. */
.portfolio-contact__trap {
	position: absolute;
	left: -100vw;
	overflow: hidden;
	width: 1px;
	height: 1px;
}

.portfolio-contact__submit {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--18);
	align-items: center;
	padding-top: var(--wp--preset--spacing--6);
}

.portfolio-contact__submit p {
	margin: 0;
	font-size: var(--wp--preset--font-size--14);
	color: var(--wp--preset--color--grey);
}

.wpcf7-form .portfolio-contact__button {
	display: inline-flex;
	gap: var(--wp--preset--spacing--10);
	align-items: center;
	padding-inline: var(--wp--preset--spacing--28);
	border: 0;
	font-size: var(--wp--preset--font-size--16);
	line-height: var(--wp--custom--control--xl);
	cursor: pointer;
}

.portfolio-contact__spinner {
	box-sizing: border-box;
	width: var(--wp--custom--size--icon);
	height: var(--wp--custom--size--icon);
	border: var(--wp--custom--border--focus) solid var(--wp--custom--color--on-blue-line);
	border-top-color: var(--wp--preset--color--white);
	border-radius: var(--wp--custom--radius--pill);
	animation: portfolio-spin var(--wp--custom--duration--slower) linear infinite;
}

.portfolio-contact__spinner,
.portfolio-contact__sending,
.portfolio-contact__success {
	display: none;
}

.wpcf7-form.submitting .portfolio-contact__spinner,
.wpcf7-form.submitting .portfolio-contact__sending {
	display: inline-block;
}

.wpcf7-form.submitting .portfolio-contact__send {
	display: none;
}

.wpcf7-form.submitting .portfolio-contact__button {
	background: var(--wp--custom--color--blue-busy);
	pointer-events: none;
}

.wpcf7-form.submitting .portfolio-contact__fields > :not(.portfolio-contact__submit) {
	opacity: 0.55;
	pointer-events: none;
	transition: opacity var(--wp--custom--duration--base) ease;
}

.wpcf7-form .wpcf7-response-output {
	display: flex;
	gap: var(--wp--preset--spacing--12);
	align-items: flex-start;
	margin: 0;
	padding: var(--wp--preset--spacing--14) var(--wp--preset--spacing--16);
	border-radius: var(--wp--custom--radius--14);
	background: var(--wp--custom--color--error-surface);
	font-size: var(--wp--preset--font-size--15);
	color: var(--wp--custom--color--error-strong);
}

.wpcf7-form .wpcf7-response-output::before,
.wpcf7-not-valid-tip::before {
	content: "";
	flex: none;
	width: var(--wp--custom--size--icon);
	height: var(--wp--custom--size--icon);
	background: currentcolor;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Contact Form 7 only prints it while the form holds an error. */
.wpcf7-form:is(.init, .submitting, .sent) .wpcf7-response-output {
	display: none;
}

.wpcf7-not-valid-tip {
	display: flex;
	gap: var(--wp--preset--spacing--6);
	align-items: center;
	font-size: var(--wp--preset--font-size--13);
	font-weight: var(--wp--custom--font-weight--medium);
	color: var(--wp--preset--color--error);
}

.wpcf7-not-valid-tip::before {
	width: var(--wp--custom--size--icon-sm);
	height: var(--wp--custom--size--icon-sm);
}

.portfolio-contact__consent .wpcf7-not-valid-tip {
	margin-top: var(--wp--preset--spacing--8);
	padding-left: var(--wp--preset--spacing--36);
}

.portfolio-contact__field .wpcf7-not-valid {
	border-color: var(--wp--custom--color--error-border);
	background: var(--wp--custom--color--error-field);
}

.portfolio-contact__consent .wpcf7-not-valid .wpcf7-list-item-label::before {
	border-color: var(--wp--custom--color--error-border);
}

.wpcf7-form.sent .portfolio-contact__fields {
	display: none;
}

.wpcf7-form.sent .portfolio-contact__success {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--16);
	align-items: flex-start;
	--portfolio-reveal-distance: var(--wp--preset--spacing--12);

	animation: portfolio-reveal var(--wp--custom--duration--slower) var(--wp--custom--easing--out) both;
}

.portfolio-contact__success > * {
	margin: 0;
}

.portfolio-contact__check {
	width: var(--wp--custom--size--check);
	height: var(--wp--custom--size--check);
	color: var(--wp--preset--color--success);
}

.portfolio-contact__check :is(circle, path) {
	stroke-dasharray: 1;
	stroke-dashoffset: 1;
}

.portfolio-contact__check circle {
	animation: portfolio-contact-draw var(--wp--custom--duration--enter) var(--wp--custom--easing--in-out) var(--wp--custom--duration--draw-start) forwards;
}

.portfolio-contact__check path {
	animation: portfolio-contact-draw var(--wp--custom--duration--slow) var(--wp--custom--easing--in-out) var(--wp--custom--duration--draw-end) forwards;
}

.portfolio-contact__success h2 {
	font-size: var(--wp--preset--font-size--34);
}

.portfolio-contact__success > p {
	max-width: var(--wp--custom--size--pitch);
	font-size: var(--wp--preset--font-size--17);
	color: var(--wp--preset--color--grey);
}

.portfolio-contact__success .portfolio-link-cards {
	align-self: stretch;
	margin-top: var(--wp--preset--spacing--12);
}

@keyframes portfolio-spin {

	to {
		transform: rotate(1turn);
	}
}

@keyframes portfolio-contact-draw {

	to {
		stroke-dashoffset: 0;
	}
}

@media (hover: hover) and (pointer: fine) {

	.portfolio-contact__choices label:hover input:not(:checked) + .wpcf7-list-item-label {
		background: var(--wp--custom--color--tint-hover);
	}
}

@media (prefers-reduced-motion: reduce) {

	.portfolio-contact__spinner {
		animation-duration: var(--wp--custom--duration--loop);
	}

	.wpcf7-form.sent .portfolio-contact__success,
	.portfolio-contact__check :is(circle, path) {
		animation: none;
		stroke-dashoffset: 0;
	}
}

@media (min-width: 1001px) {

	.portfolio-contact .portfolio-contact__inner {
		grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
		gap: var(--wp--preset--spacing--56);
	}

	.wpcf7 .wpcf7-form {
		padding: var(--wp--preset--spacing--36);
	}

	.wpcf7 .wpcf7-form.sent {
		padding-block: var(--wp--preset--spacing--40);
	}

	.portfolio-contact__row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
