/*
 * BOB Mentoring Programme 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.
 * .bmp { --bmp-purple: #4b2f74; }
 */
.bmp {
	--bmp-purple: #53397a;        /* crest band */
	--bmp-purple-deep: #3d2760;
	--bmp-ink: #1f0a3d;           /* "BENCHERS DATA" lettering */
	--bmp-text: #2b2338;
	--bmp-muted: #675e76;
	--bmp-gold: #b89858;          /* crest ring */
	--bmp-gold-soft: #efe3c8;
	--bmp-lilac: #f7f4fb;
	--bmp-lilac-2: #ece6f4;
	--bmp-line: #d6cbe6;
	--bmp-error: #a3242b;
	--bmp-error-bg: #fbeff0;
	--bmp-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;

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

.bmp-card {
	background: #fff;
	border: 1px solid var(--bmp-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 ---------- */
.bmp-masthead {
	padding: 2.25rem 1.5rem 2rem;
	text-align: center;
	background: linear-gradient(180deg, #fff 0%, #fff 55%, var(--bmp-lilac) 100%);
	border-bottom: 1px solid var(--bmp-line);
}
.bmp-crest-row {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 0 -1.5rem 1.25rem;
}
.bmp-band {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 34%;
	transform: translateY(-50%);
	background: var(--bmp-purple);
	box-shadow: inset 0 -3px 0 var(--bmp-gold);
}
.bmp .bmp-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);
}
.bmp .bmp-title {
	margin: 0;
	padding: 0;
	font-family: var(--bmp-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(--bmp-ink);
	border: 0;
}
.bmp .bmp-title::after {
	content: "";
	display: block;
	width: 72px;
	height: 3px;
	margin: 0.85rem auto 0;
	background: var(--bmp-gold);
	border-radius: 2px;
}
.bmp-lede {
	max-width: 36rem;
	margin: 0.9rem auto 0;
	color: var(--bmp-muted);
	font-size: 1rem;
}

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

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

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

.bmp .bmp-form input[type="text"],
.bmp .bmp-form input[type="email"],
.bmp .bmp-form input[type="tel"],
.bmp .bmp-form input[type="date"],
.bmp .bmp-form select,
.bmp .bmp-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(--bmp-text);
	background: #fff;
	border: 1px solid #c9bcdc;
	border-radius: 7px;
	box-shadow: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.bmp .bmp-form input[type="date"] { min-height: 2.95rem; }
.bmp .bmp-form textarea { min-height: 10rem; resize: vertical; line-height: 1.6; }
.bmp .bmp-form input:hover,
.bmp .bmp-form select:hover,
.bmp .bmp-form textarea:hover { border-color: var(--bmp-purple); }

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

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

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

/* Photograph: a gold-framed portrait plate */
.bmp-photo {
	display: grid;
	grid-template-columns: 10rem minmax(0, 1fr);
	gap: 1.5rem;
	align-items: start;
}
.bmp-frame {
	position: relative;
	aspect-ratio: 3 / 4;
	border: 3px solid var(--bmp-gold);
	outline: 1px solid var(--bmp-purple);
	outline-offset: 4px;
	border-radius: 6px;
	background:
		radial-gradient(circle at 50% 36%, var(--bmp-lilac-2) 0 19%, transparent 19.5%),
		radial-gradient(ellipse at 50% 100%, var(--bmp-lilac-2) 0 42%, transparent 42.5%),
		#fff;
	overflow: hidden;
	margin: 5px;
}
.bmp-preview { position: absolute; inset: 0; }
.bmp .bmp-preview img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center 25%;
}
.bmp-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(--bmp-purple);
}
.bmp-frame.has-image .bmp-frame-empty { display: none; }

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

.bmp-meta {
	display: inline-block;
	margin: 0.6rem 0 0;
	padding: 0.25rem 0.65rem;
	font-size: 0.88em;
	font-weight: 600;
	color: var(--bmp-ink);
	background: var(--bmp-gold-soft);
	border-radius: 999px;
}
.bmp-meta:empty { display: none; }
.bmp-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(--bmp-gold);
}

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

/* Submit */
.bmp-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.25rem;
	padding-top: 0.5rem;
}
.bmp .bmp-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(--bmp-purple);
	border: 0;
	border-bottom: 4px solid var(--bmp-gold);
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s;
}
.bmp .bmp-submit:hover { background: var(--bmp-purple-deep); color: #fff; }
.bmp .bmp-submit[disabled] { opacity: 0.75; cursor: progress; }
.bmp-fine { margin: 0; font-size: 0.9em; color: var(--bmp-muted); }

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


/* Subtitle under the title */
.bmp .bmp-subtitle {
	margin: 0.6rem 0 0;
	font-family: var(--bmp-display);
	font-weight: 600;
	font-size: 1.2rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--bmp-purple);
}

/* Choice pills (sex, signature mode) */
.bmp .bmp-choice { margin: 0 0 1.25rem; padding: 0; border: 0; min-width: 0; }
.bmp .bmp-choice > legend { padding: 0; float: none; }
.bmp-pills, .bmp-tabs { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.bmp-tabs { margin: 0 0 0.9rem; }
.bmp .bmp-pill { position: relative; margin: 0; cursor: pointer; }
.bmp .bmp-pill input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}
.bmp .bmp-pill span {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.6rem 1.15rem;
	font-weight: 600;
	color: var(--bmp-ink);
	background: #fff;
	border: 1px solid #c9bcdc;
	border-radius: 999px;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.bmp .bmp-pill span::before {
	content: "";
	width: 0.95rem;
	height: 0.95rem;
	border-radius: 50%;
	border: 2px solid var(--bmp-purple);
	background: #fff;
	box-shadow: inset 0 0 0 3px #fff;
	flex: none;
}
.bmp .bmp-pill:hover span { border-color: var(--bmp-purple); }
.bmp .bmp-pill input:checked + span { background: var(--bmp-purple); border-color: var(--bmp-purple); color: #fff; }
.bmp .bmp-pill input:checked + span::before { background: var(--bmp-gold); border-color: #fff; }
.bmp .bmp-pill input:focus-visible + span { outline: 3px solid var(--bmp-gold); outline-offset: 2px; }
.bmp .has-error .bmp-pill span { border-color: var(--bmp-error); }

/* Signature */
.bmp-sign { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px dashed var(--bmp-line); }
.bmp-sign .bmp-label { display: block; }
.bmp-sig-preview:empty { display: none; }
.bmp-sig-preview {
	margin-top: 0.75rem;
	padding: 0.75rem;
	max-width: 22rem;
	background: #fff;
	border: 1px solid var(--bmp-line);
	border-radius: 8px;
}
.bmp .bmp-sig-preview img { display: block; max-width: 100%; max-height: 8rem; margin: 0 auto; }
.bmp-pad-wrap {
	position: relative;
	max-width: 36rem;
	background: #fff;
	border: 2px solid #c9bcdc;
	border-radius: 10px;
	overflow: hidden;
}
.bmp .bmp-pad {
	display: block;
	width: 100%;
	height: 12rem;
	touch-action: none;
	cursor: crosshair;
}
.bmp-pad-line {
	position: absolute;
	left: 1.25rem;
	right: 1.25rem;
	bottom: 2.2rem;
	padding-top: 0.3rem;
	border-top: 1px solid var(--bmp-gold);
	font-size: 0.78em;
	color: var(--bmp-muted);
	pointer-events: none;
}
.bmp .bmp-clear {
	margin: 0.6rem 0 0;
	padding: 0.45rem 0.9rem;
	font: inherit;
	font-size: 0.9em;
	font-weight: 600;
	color: var(--bmp-purple);
	background: transparent;
	border: 1px solid var(--bmp-purple);
	border-radius: 6px;
	cursor: pointer;
}
.bmp .bmp-clear:hover { background: var(--bmp-lilac-2); }
.bmp .has-error .bmp-pad-wrap { border-color: var(--bmp-error); }

/* Declaration */
.bmp-declare {
	margin: 0 0 1.5rem;
	padding: 1.1rem 1.25rem;
	background: var(--bmp-gold-soft);
	border: 1px solid #e3d3ad;
	border-left: 5px solid var(--bmp-gold);
	border-radius: 10px;
}
.bmp-declare.has-error { background: var(--bmp-error-bg); border-color: #efc9cc; border-left-color: var(--bmp-error); }
.bmp .bmp-check { display: flex; gap: 0.8rem; align-items: flex-start; margin: 0; cursor: pointer; font-weight: 600; color: var(--bmp-ink); }
.bmp .bmp-check input {
	flex: none;
	width: 1.35rem;
	height: 1.35rem;
	margin: 0.15rem 0 0;
	accent-color: var(--bmp-purple);
	cursor: pointer;
}
.bmp .bmp-check input:focus-visible { outline: 3px solid var(--bmp-gold); outline-offset: 2px; }

.bmp-closed .bmp-done-title { color: var(--bmp-ink); }

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