/*
 * Pattern: Closing form (see README.md).
 * A pale band: the invitation, award badges and notes beside the contact form in a white panel.
 */

:is(.biovid-main, .editor-styles-wrapper) .bv-close {
	background: var(--bv-mist);
}

:is(.biovid-main, .editor-styles-wrapper) .bv-close .wp-block-columns {
	gap: var(--bv-gap) !important;
	align-items: flex-start !important;
	margin-bottom: 0;
}

:is(.biovid-main, .editor-styles-wrapper) .bv-close h2 {
	margin-bottom: 0.6em;
}

:is(.biovid-main, .editor-styles-wrapper) .bv-form {
	box-sizing: border-box;
	background: var(--bv-paper);
	border-radius: var(--bv-radius-panel);
	box-shadow: 0 0 0 1px rgba(16, 44, 88, 0.05), 0 22px 50px -24px rgba(16, 44, 88, 0.3);
	padding: clamp(18px, 2.2vw, 32px);
}

:is(.biovid-main, .editor-styles-wrapper) .bv-awards {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 22px;
	margin-top: clamp(28px, 3vw, 40px);
	margin-bottom: 14px;
}

:is(.biovid-main, .editor-styles-wrapper) .bv-awards .wp-block-image {
	margin: 0;
}

:is(.biovid-main, .editor-styles-wrapper) .bv-awards img {
	display: block;
	width: auto;
	height: clamp(84px, 3vw + 56px, 104px);
}

/* The site's contact form (Contact Form 7, form 5747) in the panel: its floated half-width fields become a grid with even gaps, two across. */

:is(.biovid-main, .editor-styles-wrapper) .bv-form .wpcf7-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

:is(.biovid-main, .editor-styles-wrapper) .bv-form .wpcf7-form > * {
	grid-column: 1 / -1;
	margin: 0;
}

:is(.biovid-main, .editor-styles-wrapper) .bv-form .wpcf7-form > :is(.contact_half_left, .contact_half_right) {
	grid-column: auto;
	float: none;
	width: auto !important;
	padding: 0;
}

/* The form's 15px spacer row isn't needed with the grid's gaps. */
:is(.biovid-main, .editor-styles-wrapper) .bv-form .wpcf7-form > .contact_whole:not(.add_border):not(:has(*)) {
	display: none !important;
}

:is(.biovid-main, .editor-styles-wrapper) .bv-form .contact_whole button {
	margin-top: 4px;
}

@media (max-width: 980px) {
	:is(.biovid-main, .editor-styles-wrapper) .bv-close .wp-block-columns:not(.bv-decision) {
		flex-wrap: wrap !important;
	}

	:is(.biovid-main, .editor-styles-wrapper) .bv-close .wp-block-columns:not(.bv-decision) > .wp-block-column {
		flex-basis: 100% !important;
	}
}

@media (max-width: 767px) {
	/* The form: one field per row, closer to the panel's edge. */
	:is(.biovid-main, .editor-styles-wrapper) .bv-form {
		border-radius: 20px;
		padding: 16px;
	}

	:is(.biovid-main, .editor-styles-wrapper) .bv-form .wpcf7-form {
		grid-template-columns: 1fr;
		gap: 12px;
	}
}
