.bpt-contact-location {
	display: grid;
	gap: var(--bpt-space-xl);
	align-items: start;
}

.bpt-contact-location__details {
	display: grid;
	gap: var(--bpt-space-sm);
	font-style: normal;
}

.bpt-contact-location__details a {
	color: var(--section-link);
}

.bpt-contact-location__map {
	overflow: hidden;
	min-height: var(--contact-map-min-height, 20rem);
	background: var(--section-card-bg);
	border: var(--bpt-border-thin) solid var(--section-border);
	border-radius: var(--bpt-radius-md);
}

.bpt-contact-location__map iframe {
	display: block;
	width: 100%;
	min-height: var(--contact-map-min-height, 20rem);
	border: 0;
}

@media (min-width: 900px) {
	.bpt-contact-location {
		grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	}
}

/* Details on the left, lead form in a card on the right (form_shortcode set). The card follows the
   section palette's card colours; CF7 fields run two per row from 600px, with message boxes and
   choice groups across the full width. */
.bpt-contact-location__form {
	padding: clamp(1.25rem, 3vw, 2rem);
	background: var(--section-card-bg);
	color: var(--section-card-fg);
	border: var(--bpt-border-thin) solid var(--section-border);
	border-radius: var(--bpt-radius-md);
}

.bpt-contact-location__form-heading {
	margin: 0;
	font-size: var(--bpt-text-xl);
	line-height: var(--bpt-leading-tight);
}

.bpt-contact-location__form-intro {
	margin: var(--bpt-space-2xs) 0 0;
	color: var(--section-fg-muted);
	font-size: var(--bpt-text-sm);
}

.bpt-contact-location__form-body {
	margin-top: var(--bpt-space-lg);
	padding: 0;
	background: none;
	border: 0;
}

.bpt-contact-location__form-body .wpcf7-form label {
	font-size: var(--bpt-text-sm);
}

.bpt-contact-location__form-body .wpcf7-submit {
	width: 100%;
}

.bpt-contact-location__form-body :is(.wpcf7-form, .uacf7-form-wrapper-container) {
	position: relative;
}

.bpt-contact-location__form-body .wpcf7-spinner {
	position: absolute;
	right: 0.75rem;
	bottom: calc((3.25rem - 24px) / 2);
	margin: 0;
}

.bpt-contact-location--has-form .bpt-contact-location__map {
	margin-top: var(--bpt-space-lg);
}

@media (min-width: 600px) {
	.bpt-contact-location__form-body .wpcf7-form:not(:has(.uacf7-form-wrapper-container)),
	.bpt-contact-location__form-body .uacf7-form-wrapper-container {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: var(--bpt-space-md);
		row-gap: 0;
		align-items: end;
	}

	.bpt-contact-location__form-body :is(.wpcf7-form, .uacf7-form-wrapper-container) > * {
		grid-column: 1 / -1;
	}

	.bpt-contact-location__form-body :is(.wpcf7-form, .uacf7-form-wrapper-container) > :is(label, p:has(> label)) {
		grid-column: auto;
	}

	.bpt-contact-location__form-body :is(.wpcf7-form, .uacf7-form-wrapper-container) > :is(label, p):has(textarea, .wpcf7-radio, .wpcf7-checkbox, .wpcf7-acceptance) {
		grid-column: 1 / -1;
	}
}

@media (min-width: 900px) {
	.bpt-contact-location--has-form {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: clamp(2rem, 5vw, 5rem);
	}
}
