/*
 * Bencher Biodata Form — Body of Benchers Nigeria theme.
 * Colours are taken from the BOB crest: royal purple band, aubergine lettering, gold ring.
 * Body text uses your theme's font. Override any variable in Additional CSS, e.g.
 * .bbf { --bbf-purple: #4b2f74; }
 */
.bbf {
	--bbf-purple: #53397a;        /* crest band */
	--bbf-purple-deep: #3d2760;
	--bbf-ink: #1f0a3d;           /* "BENCHERS DATA" lettering */
	--bbf-text: #2b2338;
	--bbf-muted: #675e76;
	--bbf-gold: #b89858;          /* crest ring */
	--bbf-gold-soft: #efe3c8;
	--bbf-lilac: #f7f4fb;
	--bbf-lilac-2: #ece6f4;
	--bbf-line: #d6cbe6;
	--bbf-error: #a3242b;
	--bbf-error-bg: #fbeff0;
	--bbf-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;

	max-width: 54rem;
	margin: 0 auto;
	color: var(--bbf-text);
	line-height: 1.55;
}
.bbf *, .bbf *::before, .bbf *::after { box-sizing: border-box; }

.bbf-card {
	background: #fff;
	border: 1px solid var(--bbf-line);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 18px 40px -24px rgba(83, 57, 122, 0.55);
}

/* ---------- Masthead: the crest sits on the purple band, as in the BOB letterhead ---------- */
.bbf-masthead {
	padding: 2.25rem 1.5rem 2rem;
	text-align: center;
	background: linear-gradient(180deg, #fff 0%, #fff 55%, var(--bbf-lilac) 100%);
	border-bottom: 1px solid var(--bbf-line);
}
.bbf-crest-row {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 0 -1.5rem 1.25rem;
}
.bbf-band {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 34%;
	transform: translateY(-50%);
	background: var(--bbf-purple);
	box-shadow: inset 0 -3px 0 var(--bbf-gold);
}
.bbf .bbf-crest {
	position: relative;
	display: block;
	width: 124px;
	height: 124px;
	max-width: none;
	margin: 0;
	border-radius: 50%;
	box-shadow: 0 0 0 5px #fff, 0 6px 18px rgba(31, 10, 61, 0.35);
}
.bbf .bbf-title {
	margin: 0;
	padding: 0;
	font-family: var(--bbf-display);
	font-weight: 700;
	font-size: clamp(2.1rem, 5.5vw, 3rem);
	line-height: 1.05;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--bbf-ink);
	border: 0;
}
.bbf .bbf-title::after {
	content: "";
	display: block;
	width: 72px;
	height: 3px;
	margin: 0.85rem auto 0;
	background: var(--bbf-gold);
	border-radius: 2px;
}
.bbf-lede {
	max-width: 36rem;
	margin: 0.9rem auto 0;
	color: var(--bbf-muted);
	font-size: 1rem;
}

/* ---------- Body ---------- */
.bbf-body { padding: 2rem clamp(1rem, 4vw, 2.5rem) 2.5rem; }
.bbf-intro { margin: 0 0 1.25rem; color: var(--bbf-muted); font-size: 0.92em; }

/* Sections */
.bbf .bbf-group {
	margin: 0 0 1.5rem;
	padding: 1.5rem clamp(1rem, 3vw, 1.75rem) 0.5rem;
	min-width: 0;
	background: var(--bbf-lilac);
	border: 1px solid var(--bbf-line);
	border-top: 4px solid var(--bbf-purple);
	border-radius: 10px;
}
.bbf .bbf-group > legend {
	float: left;
	display: flex;
	align-items: center;
	gap: 0.7rem;
	width: 100%;
	margin: 0 0 1.1rem;
	padding: 0;
	border: 0;
	color: var(--bbf-purple);
}
.bbf .bbf-group > legend ~ * { clear: both; }
.bbf-num {
	flex: none;
	display: inline-grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: var(--bbf-gold);
	color: var(--bbf-ink);
	font-family: var(--bbf-display);
	font-weight: 700;
	font-size: 1.15rem;
	line-height: 1;
}
.bbf-legend-text {
	font-family: var(--bbf-display);
	font-weight: 700;
	font-size: 1.55rem;
	line-height: 1.15;
}
.bbf-group-note { margin: -0.6rem 0 1rem; color: var(--bbf-muted); font-size: 0.92em; }

/* Fields */
.bbf-field { margin: 0 0 1.25rem; min-width: 0; }
.bbf .bbf-narrow input { max-width: 17rem; }
.bbf .bbf-label { display: block; margin: 0 0 0.3rem; font-weight: 600; color: var(--bbf-ink); }
.bbf-req { color: var(--bbf-error); }
.bbf-opt { font-weight: 400; color: var(--bbf-muted); font-size: 0.88em; }
.bbf-hint { margin: 0 0 0.45rem; color: var(--bbf-muted); font-size: 0.9em; }

.bbf .bbf-form input[type="text"],
.bbf .bbf-form input[type="email"],
.bbf .bbf-form input[type="tel"],
.bbf .bbf-form input[type="date"],
.bbf .bbf-form textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	margin: 0;
	padding: 0.7rem 0.85rem;
	font: inherit;
	line-height: 1.4;
	color: var(--bbf-text);
	background: #fff;
	border: 1px solid #c9bcdc;
	border-radius: 7px;
	box-shadow: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.bbf .bbf-form input[type="date"] { min-height: 2.95rem; }
.bbf .bbf-form textarea { min-height: 10rem; resize: vertical; line-height: 1.6; }
.bbf .bbf-form input:hover,
.bbf .bbf-form textarea:hover { border-color: var(--bbf-purple); }

.bbf .bbf-form input:focus-visible,
.bbf .bbf-form textarea:focus-visible {
	outline: none;
	border-color: var(--bbf-purple);
	box-shadow: 0 0 0 3px rgba(184, 152, 88, 0.55);
}
.bbf .bbf-submit:focus-visible,
.bbf .bbf-form input[type="file"]:focus-visible,
.bbf-summary a:focus-visible {
	outline: 3px solid var(--bbf-gold);
	outline-offset: 2px;
}

.bbf-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 1.25rem;
}

/* Timeline: call to Bar, then Bencher, then Life Bencher */
.bbf .bbf-timeline {
	position: relative;
	margin: 0;
	padding: 0 0 0 2.25rem;
	list-style: none;
}
.bbf .bbf-stop { position: relative; margin: 0; padding: 0 0 1.25rem; }
.bbf .bbf-stop .bbf-field { margin-bottom: 0; }
.bbf .bbf-stop:not(.bbf-stop-last)::after {
	content: "";
	position: absolute;
	left: calc(-2.25rem + 0.625rem - 1px);
	top: 1.55rem;
	bottom: -0.3rem;
	width: 2px;
	background: linear-gradient(var(--bbf-purple), var(--bbf-gold));
}
.bbf .bbf-stop::before {
	content: "";
	position: absolute;
	left: -2.25rem;
	top: 0.3rem;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 50%;
	background: #fff;
	border: 3px solid var(--bbf-purple);
	transition: background 0.2s, border-color 0.2s;
}
.bbf .bbf-stop.is-set::before { background: var(--bbf-gold); border-color: var(--bbf-gold); }
.bbf .bbf-stop-last::before { border-color: var(--bbf-gold); }

/* Errors */
.bbf .has-error input,
.bbf .has-error textarea { border-color: var(--bbf-error); border-width: 2px; }
.bbf-error { margin: 0 0 0.4rem; color: var(--bbf-error); font-weight: 600; font-size: 0.92em; }
.bbf-error:empty { display: none; }
.bbf-summary {
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	background: var(--bbf-error-bg);
	border: 1px solid #efc9cc;
	border-left: 5px solid var(--bbf-error);
	border-radius: 8px;
}
.bbf-summary p { margin: 0 0 0.5rem; }
.bbf-summary ul { margin: 0 0 0.5rem 1.1rem; padding: 0; }
.bbf-summary a { color: var(--bbf-error); }

/* Photograph: a gold-framed portrait plate */
.bbf-photo {
	display: grid;
	grid-template-columns: 10rem minmax(0, 1fr);
	gap: 1.5rem;
	align-items: start;
}
.bbf-frame {
	position: relative;
	aspect-ratio: 3 / 4;
	border: 3px solid var(--bbf-gold);
	outline: 1px solid var(--bbf-purple);
	outline-offset: 4px;
	border-radius: 6px;
	background:
		radial-gradient(circle at 50% 36%, var(--bbf-lilac-2) 0 19%, transparent 19.5%),
		radial-gradient(ellipse at 50% 100%, var(--bbf-lilac-2) 0 42%, transparent 42.5%),
		#fff;
	overflow: hidden;
	margin: 5px;
}
.bbf-preview { position: absolute; inset: 0; }
.bbf .bbf-preview img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center 25%;
}
.bbf-frame-empty {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0.6rem;
	padding: 0 0.5rem;
	text-align: center;
	font-size: 0.78em;
	font-weight: 600;
	color: var(--bbf-purple);
}
.bbf-frame.has-image .bbf-frame-empty { display: none; }

.bbf .bbf-form input[type="file"] {
	display: block;
	width: 100%;
	padding: 0.85rem;
	font: inherit;
	font-size: 0.95em;
	color: var(--bbf-text);
	background: #fff;
	border: 2px dashed var(--bbf-line);
	border-radius: 8px;
	cursor: pointer;
}
.bbf .bbf-form input[type="file"]:hover { border-color: var(--bbf-purple); }
.bbf .bbf-form input[type="file"]::file-selector-button {
	margin-right: 0.8rem;
	padding: 0.5rem 1rem;
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--bbf-purple);
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}
.bbf-pick {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem 0.9rem;
}
.bbf .bbf-pick input[type="file"]#bbf_image { flex: 1 1 16rem; }
.bbf-or { color: var(--bbf-muted); font-size: 0.9em; }
.bbf .bbf-camera {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0;
	padding: 0.75rem 1.1rem;
	font-weight: 700;
	color: var(--bbf-ink);
	background: var(--bbf-gold);
	border-radius: 8px;
	cursor: pointer;
}
.bbf .bbf-camera:hover { background: #c7a965; }
.bbf-pick:has(.bbf-camera-input:focus-visible) .bbf-camera {
	outline: 3px solid var(--bbf-purple);
	outline-offset: 2px;
}
.bbf-camera-icon {
	position: relative;
	width: 1.25rem;
	height: 0.95rem;
	border: 2px solid currentColor;
	border-radius: 3px;
}
.bbf-camera-icon::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 0.45rem;
	height: 0.45rem;
	border: 2px solid currentColor;
	border-radius: 50%;
	transform: translate(-50%, -50%);
}
.bbf-camera-icon::after {
	content: "";
	position: absolute;
	left: 0.2rem;
	top: -0.3rem;
	width: 0.4rem;
	height: 0.2rem;
	background: currentColor;
	border-radius: 1px 1px 0 0;
}
.bbf .bbf-form input.bbf-camera-input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	opacity: 0;
	overflow: hidden;
	border: 0;
}
.bbf-camera-tip { margin-top: 0.6rem; }

/* On computers with a mouse the camera button would just reopen the file picker, so hide it. */
@media (hover: hover) and (pointer: fine) {
	.bbf .bbf-camera,
	.bbf-or,
	.bbf-camera-tip { display: none; }
}

.bbf-meta {
	display: inline-block;
	margin: 0.6rem 0 0;
	padding: 0.25rem 0.65rem;
	font-size: 0.88em;
	font-weight: 600;
	color: var(--bbf-ink);
	background: var(--bbf-gold-soft);
	border-radius: 999px;
}
.bbf-meta:empty { display: none; }
.bbf-meta.is-soft {
	display: block;
	border-radius: 8px;
	padding: 0.5rem 0.75rem;
	font-weight: 500;
	background: #fdf3dc;
	color: #5c4413;
	border-left: 4px solid var(--bbf-gold);
}

/* Honeypot */
.bbf-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Submit */
.bbf-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.25rem;
	padding-top: 0.5rem;
}
.bbf .bbf-submit {
	display: inline-block;
	margin: 0;
	padding: 0.95rem 2.25rem;
	font: inherit;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	text-transform: none;
	color: #fff;
	background: var(--bbf-purple);
	border: 0;
	border-bottom: 4px solid var(--bbf-gold);
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s;
}
.bbf .bbf-submit:hover { background: var(--bbf-purple-deep); color: #fff; }
.bbf .bbf-submit[disabled] { opacity: 0.75; cursor: progress; }
.bbf-fine { margin: 0; font-size: 0.9em; color: var(--bbf-muted); }

/* Success */
.bbf-done { padding: 2.5rem 1.5rem 3rem; text-align: center; }
.bbf-done-mark {
	display: block;
	width: 3.5rem;
	height: 3.5rem;
	margin: 0 auto 1rem;
	border-radius: 50%;
	background: var(--bbf-gold);
	position: relative;
}
.bbf-done-mark::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 46%;
	width: 0.85rem;
	height: 1.6rem;
	border: solid var(--bbf-ink);
	border-width: 0 4px 4px 0;
	transform: translate(-50%, -50%) rotate(45deg);
}
.bbf .bbf-done-title {
	margin: 0 0 0.5rem;
	font-family: var(--bbf-display);
	font-weight: 700;
	font-size: 2rem;
	color: var(--bbf-purple);
}
.bbf-done p { max-width: 32rem; margin: 0 auto 0.5rem; }

@media (max-width: 640px) {
	.bbf-row { grid-template-columns: 1fr; }
	.bbf-photo { grid-template-columns: 1fr; }
	.bbf-frame { width: 9.5rem; }
	.bbf .bbf-narrow input { max-width: none; }
	.bbf .bbf-submit { width: 100%; }
	.bbf .bbf-crest { width: 104px; height: 104px; }
}
