.b-frm3__form .wpcf7-form,
.b-frm3__form .wpcf7-form .row {
	display: flex;
	flex-wrap: wrap;
	row-gap: var(--spacing-md);
}

.b-frm3__form .cf-wrap {
	position: relative;
}

.b-frm3__form .wpcf7-form-control-wrap {
	position: static;
}

.b-frm3__form input[type=text], 
.b-frm3__form input[type=email], 
.b-frm3__form input[type=tel],
.b-frm3__form textarea {
	display: block;
	width: 100%;
	min-height: 44px;
	padding: var(--spacing-sm) var(--spacing-md);
	color: inherit;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: var(--border-radius-sm);
	transition: border-color 0.3s ease;
}

.b-frm3__form textarea {
	height: 10rem;
	resize: vertical;
}

.b-frm3__form .cf-wrap label {
	position: absolute;
	top: var(--spacing-sm);
	left: calc(var(--gutters) / 2 + var(--spacing-md));
	right: var(--spacing-sm);
	width: fit-content;
	z-index: 1;
	overflow: hidden;
	pointer-events: none;
	transition: transform 0.2s;
}

.b-frm3__form .cf-wrap.is-focus label,
.b-frm3__form .cf-wrap.is-filled label {
	background: var(--color-white);
	transform: translateY(-1.5rem) scale(0.75);
	transform-origin: left top;
}

.b-frm3.bgc-light .cf-wrap.is-focus label,
.b-frm3.bgc-light .cf-wrap.is-filled label {
	background: var(--color-light);
}

.b-frm3__form .cf-wrap label span.required,
.b-frm3__form .wpcf7-list-item-label .required {
	color: var(--color-error);
}

.b-frm3__form .wpcf7-not-valid-tip {
	display: block;
	margin-top: var(--spacing-2xs);
	color: var(--color-error);
}

.b-frm3__form .wpcf7-not-valid {
	border-color: var(--color-error);
	color: var(--color-error);
}

.b-frm3__form .wpcf7-list-item {
	position: relative;
	display: block;
	margin: 0 0 var(--spacing-2xs);
}

.b-frm3__form .wpcf7-list-item:last-child {
	margin-bottom: 0;
}

.b-frm3__form input[type="radio"],
.b-frm3__form input[type="checkbox"] {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.b-frm3__form .wpcf7-radio label,
.b-frm3__form .wpcf7-acceptance label {
	position: static;
	pointer-events: auto;
}

.b-frm3__form .wpcf7-list-item-label {
	position: relative;
	display: block;
	padding-left: calc(var(--checkbox-size) + var(--spacing-xs));
	cursor: pointer;
}

.b-frm3__form .wpcf7-list-item-label::before {
	position: absolute;
	top: 0.2em;
	left: 0;
	width: var(--checkbox-size);
	height: var(--checkbox-size);
	border: 1px solid currentColor;
	content: "";
}

.b-frm3__form .wpcf7-radio .wpcf7-list-item-label::before {
	border-radius: 50%;
}

.b-frm3__form .wpcf7-checkbox .wpcf7-list-item-label::before,
.b-frm3__form .wpcf7-acceptance .wpcf7-list-item-label::before {
	border-radius: var(--border-radius-3xs);
}

.b-frm3__form input[type="radio"]:checked + .wpcf7-list-item-label::before,
.b-frm3__form input[type="checkbox"]:checked + .wpcf7-list-item-label::before {
	border-color: var(--color-secondary);
	background: var(--color-secondary);
}

.b-frm3__form input[type="radio"]:checked + .wpcf7-list-item-label::after {
	position: absolute;
	top: 0.2em;
	left: 0;
	width: var(--checkbox-size);
	height: var(--checkbox-size);
	border: 4px solid transparent;
	border-radius: 50%;
	background: var(--color-white);
	background-clip: padding-box;
	content: "";
}

.b-frm3__form input[type="checkbox"]:checked + .wpcf7-list-item-label::after {
	position: absolute;
	top: 0.35em;
	left: 0.35em;
	width: 0.35em;
	height: 0.6em;
	border: solid var(--color-white);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
	content: "";
}

.b-frm3__form input[type="radio"]:focus-visible + .wpcf7-list-item-label::before,
.b-frm3__form input[type="checkbox"]:focus-visible + .wpcf7-list-item-label::before {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}

.b-frm3__form .wpcf7-acceptance a {
	text-decoration: underline;
}

.b-frm3__form .wpcf7-submit,
.b-frm3__form .btn {
	width: 100%;
	min-height: 44px;
	min-width: 44px;
	cursor: pointer;
}

.b-frm3__form .wpcf7-spinner {
	display: none;
}

.b-frm3__form .wpcf7-response-output {
	margin: 0;
	padding: 0;
	border: 0;
}

.b-frm3__form .wpcf7-form.invalid .wpcf7-response-output,
.b-frm3__form .wpcf7-form.unaccepted .wpcf7-response-output {
	color: var(--color-error);
}

.b-frm3__form .wpcf7-form.sent .wpcf7-response-output {
	color: var(--color-success);
}

@media (hover: hover) {
	.b-frm3__form input[type=text]:hover, 
	.b-frm3__form input[type=email]:hover, 
	.b-frm3__form input[type=tel]:hover, 
	.b-frm3__form textarea:hover,
	.b-frm3__form .wpcf7-list-item-label:hover::before {
		border-color: var(--color-secondary);
	}
}

@media (prefers-reduced-motion: reduce) {
	.b-frm3__form input,
	.b-frm3__form textarea,
	.b-frm3__form .cf-wrap label {
		transition: none;
	}
}
