/* Employment forms (Contact Form 7): Employment Inquiry and the English/Spanish Employment Application.
   Layout only. The inputs, card, Turnstile spacing and Submit button come from the Contact Form 7 rules in content-pages.css.
   Everything is scoped to .bb-app, the wrapper in both forms' markup. */

.wpcf7 .bb-app { color: var(--bb-text); }
.wpcf7 .bb-app em { color: var(--bb-muted); }
.wpcf7 .bb-app br { display: none; }
/* content-pages.css sets every form paragraph to margin 0 !important; text paragraphs here need their spacing back. */
.wpcf7 .bb-app p { margin: 0 0 12px !important; }
.wpcf7 .bb-app :is(.bb-row, .bb-qgrid, label) > p,
.wpcf7 .bb-app p:has(> label:only-child),
.wpcf7 .bb-app p:empty { margin: 0 !important; }

/* Base field look on a page without the content-page styling */
.wpcf7 .bb-app .wpcf7-form-control-wrap { display: block; }
.wpcf7 .bb-app :is(input[type="text"], input[type="tel"], input[type="email"], input[type="date"], textarea) { box-sizing: border-box; width: 100%; max-width: 100%; }

/* Section headings (they also feed the page's "On this page" list) */
.wpcf7 .bb-app h3 {
	margin: 32px 0 14px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--bb-border);
	color: var(--bb-purple-dark);
	font-family: var(--bb-heading-font);
	font-size: 1.6rem;
	line-height: 1.2;
}
.wpcf7 .bb-app h3:first-of-type { margin-top: 8px; }
.wpcf7 .bb-app h3 span { color: var(--bb-muted); font-weight: 400; }

/* Fields: label above, input below */
.wpcf7 .bb-app label { display: block; margin: 0 0 16px; color: var(--bb-night); font-weight: 600; line-height: 1.35; }
.wpcf7 .bb-app label em { font-weight: 400; }
.wpcf7 .bb-app label .wpcf7-form-control-wrap { margin-top: 6px; }
.bb-cp .wpcf7 .bb-app textarea { height: auto; min-height: 0; }

/* Side-by-side fields; CF7 wraps lines in <p>, so the row and that <p> both lay out as flex. */
.wpcf7 .bb-row,
.wpcf7 .bb-row > p { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 16px; width: 100%; margin: 0; }
.wpcf7 .bb-row label { flex: 1 1 200px; min-width: 0; }
.wpcf7 .bb-row-3 label { flex: 1 1 160px; }
.wpcf7 .bb-row-4 label { flex: 1 1 130px; }
.wpcf7 .bb-row label.bb-wide { flex: 3 1 280px; }

/* Yes/No questions, two per line where there is room */
.wpcf7 .bb-qgrid,
.wpcf7 .bb-qgrid > p { display: flex; flex-wrap: wrap; gap: 0 28px; margin: 0; }
.wpcf7 .bb-qgrid > .bb-q { flex: 1 1 300px; }
.wpcf7 .bb-q { margin: 0 0 20px; }
.wpcf7 .bb-q > p:first-child { margin-bottom: 8px !important; }
.wpcf7 .bb-q .wpcf7-list-item { display: inline-block; margin: 0 20px 6px 0; }
.wpcf7 .bb-q .wpcf7-list-item label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; cursor: pointer; }
.wpcf7 .bb-app input[type="radio"],
.wpcf7 .bb-app input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: var(--bb-purple); }

/* Repeating blocks: employers, schools, references */
.wpcf7 .bb-block {
	margin: 0 0 18px;
	padding: 16px 18px 2px;
	border: 1px solid var(--bb-border);
	border-radius: var(--bb-radius);
	background: var(--bb-white);
}
.wpcf7 .bb-block legend { padding: 0 6px; color: var(--bb-purple-dark); font-weight: 700; }

/* "+ Add more" collapsed sections */
.wpcf7 .bb-more { margin: 0 0 20px; }
.wpcf7 .bb-more > summary {
	display: inline-block;
	margin-bottom: 14px;
	color: var(--bb-purple);
	font-weight: 700;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.wpcf7 .bb-more > summary::-webkit-details-marker { display: none; }
.wpcf7 .bb-more[open] > summary { text-decoration: none; }

/* Small print */
/* Text paragraphs (not the ones holding fields): one size for the English and the Spanish lines */
.wpcf7 .bb-app p:not(:has(label, input, textarea)) { font-size: .95rem; line-height: 1.55; }
.wpcf7 .resume-note,
.wpcf7 .bb-disclaimer { color: var(--bb-muted); font-size: .9rem; font-weight: 400; }
.wpcf7 .resume-note { display: block; margin-top: 6px; }
.wpcf7 .bb-disclaimer { margin-top: 14px !important; }
.wpcf7 .bb-app input[type="file"] { display: block; max-width: 100%; margin-top: 6px; font-weight: 400; }

/* Legal text in a scroll box */
.wpcf7 .bb-legal {
	max-height: 320px;
	margin: 0 0 18px;
	padding: 16px 18px;
	overflow-y: auto;
	border: 1px solid var(--bb-border);
	border-radius: var(--bb-radius);
	background: var(--bb-white);
	font-size: .88rem;
	line-height: 1.55;
}
.wpcf7 .bb-legal p { margin: 0 0 12px !important; }

/* "I have read and agree" + typed signature */
.wpcf7 .bb-app .wpcf7-acceptance { display: block; margin: 0 0 18px; }
.wpcf7 .bb-app .wpcf7-acceptance label { display: inline-flex; align-items: flex-start; gap: 10px; margin: 0; }
.wpcf7 .bb-app .bb-signature { font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 1.4rem; }

.wpcf7 .bb-app .cf7-submit-wrap { margin: 8px 0 0 !important; }

@media (max-width: 560px) {
	.wpcf7 .bb-row label,
	.wpcf7 .bb-row label.bb-wide { flex-basis: 100%; }
	.wpcf7 .bb-block { padding: 12px 12px 0; }
}
