/* Contact Form 7 specific furniture and styling integration */

.contact-form .field > p {
	display: contents;
}

.contact-form .field > p > br {
	display: none;
}

/* Spinner out of flow so it doesn't push SEND in flex container */
.contact-form .wpcf7-spinner {
	position: absolute;
	margin: 0 0 0 10px;
}

/* Response output */
.contact-form .wpcf7-response-output {
	margin: 16px 0 0;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 0.95rem;
	line-height: 1.4;
	border: 1px solid transparent;
}

.contact-form form.sent .wpcf7-response-output {
	border-color: #4ade80;
	background: rgba(74, 222, 128, 0.1);
	color: #166534;
}

.contact-form form.failed .wpcf7-response-output,
.contact-form form.aborted .wpcf7-response-output,
.contact-form form.spam .wpcf7-response-output,
.contact-form form.invalid .wpcf7-response-output {
	border-color: #f87171;
	background: rgba(248, 113, 113, 0.1);
	color: #991b1b;
}

.contact-form .wpcf7-not-valid-tip {
	font-size: 0.85rem;
	color: #dc2626;
	margin-top: 4px;
	display: block;
}

/* Submit button styling */
/* The submit button.

   The original is <button class="btn btn-primary">; CF7 can only emit
   <input type="submit">. That matters because kbh-site.css styles
   ".contact-form input" -- text fields -- and an input submit matches it too,
   inheriting width:100% and the text-field padding, border and background. So
   the button rendered full width across the form, which is not the original.

   The .btn and .btn-primary classes are on the element already, but at 0-1-0
   they lose to .contact-form input at 0-1-1, so the values have to be restated
   here rather than merely reset -- kbh-site.css is a byte-identical copy of the
   FlatPages stylesheet and is not edited. Values mirror .btn/.btn-primary. */
.contact-form input[type="submit"] {
	width: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 15px 32px;
	border: 2px solid transparent;
	border-radius: var(--radius);
	font-family: var(--sans);
	font-size: 19.5px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	background: var(--orange);
	color: #fff;
	cursor: pointer;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.contact-form input[type="submit"]:hover { background: var(--orange-dark); }
.contact-form input[type="submit"]:focus {
	outline: none;
	box-shadow: 0 0 0 3px var(--orange-soft);
}

@media (max-width: 640px) {
	.contact-form .form-foot .btn,
	.contact-form input[type="submit"] {
		width: 100% !important;
	}
}

/* CF7 wraps every control in <span class="wpcf7-form-control-wrap">. The
   original has the input as a direct child of .field, which is a flex column,
   so the span would become the flex item and the input would not fill it.
   display:contents removes the span from layout without removing the element,
   which CF7 needs for validation. */
.contact-form .wpcf7-form-control-wrap { display: contents; }
