/* Shared Contact Form 7 styling (theme styles; CF7's own stylesheet is switched off) - used by the
   Investors Area forms and the Contact page form (inc/contact-form.php). */
.bb-form .bb-form__intro,
.bb-form .bb-form__legal {
	margin: 0 0 1rem;
	font-size: 0.925rem;
	line-height: 1.55;
}
.bb-form .bb-form__note {
	margin: 0 0 1.25rem;
	padding: 1rem 1.25rem;
	border-left: 3px solid var(--wp--preset--color--primary);
	background: var(--wp--preset--color--secondary);
	font-size: 0.875rem;
	line-height: 1.55;
	color: var(--wp--preset--color--charcoal);
}

.bb-form .bb-form__note summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}
.bb-form .bb-form__note summary::-webkit-details-marker {
	display: none;
}
.bb-form .bb-form__note summary::after {
	content: '';
	flex: 0 0 auto;
	width: 0.55rem;
	height: 0.55rem;
	border-right: 2px solid var(--wp--preset--color--charcoal);
	border-bottom: 2px solid var(--wp--preset--color--charcoal);
	transform: rotate(45deg);
	transition: transform 150ms ease;
}
.bb-form .bb-form__note[open] > summary::after {
	transform: rotate(225deg);
}
.bb-form .bb-form__note-body {
	margin-top: 0.6rem;
}

/* Proxy form: on wide screens the explanatory note and legal wording sit in a left column
   and the fields in a right column, so the dialog doesn't run to a great height. On narrow
   screens it's one column and the note starts collapsed (investor-area.js). */
@media (min-width: 56rem) {
	.bb-form__cols {
		display: grid;
		grid-template-columns: 5fr 6fr;
		gap: 2.5rem;
		align-items: start;
	}
	.bb-form__aside {
		position: sticky;
		top: 0;
	}
	.bb-form .bb-form__note summary {
		cursor: default;
		pointer-events: none;
	}
	.bb-form .bb-form__note summary::after {
		display: none;
	}
}
/* CF7 wraps its hidden inputs in a fieldset that its own (disabled) stylesheet hides. */
.bb-form .hidden-fields-container {
	display: none;
}
.bb-form__field {
	margin-bottom: 1.1rem;
}
.bb-form__field label,
.bb-form__label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--wp--preset--color--charcoal);
}
.bb-form .wpcf7-form-control-wrap {
	display: block;
}
.bb-form input[type="text"],
.bb-form input[type="email"],
.bb-form input[type="date"],
.bb-form textarea {
	display: block;
	box-sizing: border-box;
	width: 100%;
	padding: 0.7rem 0.9rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0.5rem;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--charcoal);
	font: inherit;
	font-size: 1rem;
}
.bb-form input:focus,
.bb-form textarea:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--primary);
}
.bb-form .wpcf7-radio {
	display: flex;
	gap: 1.5rem;
}
.bb-form .wpcf7-list-item {
	margin: 0;
}
.bb-form .wpcf7-list-item label {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
	font-weight: 400;
}
.bb-form .wpcf7-list-item input {
	accent-color: var(--wp--preset--color--primary);
}
.bb-form input[type="submit"] {
	padding: 0.7rem 1.75rem;
	border: 2px solid var(--wp--preset--color--primary);
	border-radius: 0.5rem;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 150ms ease, border-color 150ms ease;
}
.bb-form input[type="submit"]:hover {
	background: var(--wp--preset--color--gold-dark);
	border-color: var(--wp--preset--color--gold-dark);
}
.bb-form .wpcf7-spinner {
	margin-left: 0.75rem;
}
.bb-form .wpcf7-not-valid-tip {
	display: block;
	margin-top: 0.3rem;
	color: #b32d2e;
	font-size: 0.825rem;
}
.bb-form .wpcf7-not-valid {
	border-color: #b32d2e;
}
/* Hidden until CF7 has a message to show (its own stylesheet normally does this). */
.bb-form.init .wpcf7-response-output,
.bb-form .wpcf7-response-output:empty {
	display: none;
}
.bb-form .wpcf7-response-output {
	margin: 1.25rem 0 0;
	padding: 0.85rem 1rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0.5rem;
	font-size: 0.9rem;
}
.bb-form.sent .wpcf7-response-output {
	border-color: var(--wp--preset--color--forest);
	background: rgba(85, 139, 110, 0.1);
}
.bb-form.invalid .wpcf7-response-output,
.bb-form.failed .wpcf7-response-output,
.bb-form.spam .wpcf7-response-output {
	border-color: #b32d2e;
}
.bb-form .screen-reader-response {
	position: absolute;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	width: 1px;
	height: 1px;
}

/* ── Additions for the Contact page form ── */
.bb-form input[type="tel"],
.bb-form select {
	display: block;
	box-sizing: border-box;
	width: 100%;
	padding: 0.7rem 0.9rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 0.5rem;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--charcoal);
	font: inherit;
	font-size: 1rem;
}
.bb-form select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 2.5rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23272B2A' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.9rem center;
	background-size: 1rem;
}
.bb-form input[type="tel"]:focus,
.bb-form select:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--primary);
}
.bb-form__row {
	display: grid;
	grid-template-columns: 1fr;
	column-gap: 1rem;
}
@media (min-width: 37.5rem) {
	.bb-form__row {
		grid-template-columns: 1fr 1fr;
	}
}
/* Honeypot: off-screen rather than display:none, so simple bots still fill it in. */
.bb-form .bb-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.bb-form__field .bb-form__optional {
	color: var(--wp--preset--color--muted-foreground);
	font-weight: 400;
}
