/**
 * whbuyers.club — the buyer registration form (2026-09-03 rework).
 * The scaffolding the lifted form cannot function without, restyled for the
 * dark-and-gold design; inputs/labels/hints inherit the site sheet (whb.css).
 */

/* ------------------------------------------------------------------ *
 * ⚠️⚠️ LOAD-BEARING: the hidden meta block and the honeypot.
 * Off-screen rather than display:none — some bots skip hidden subtrees.
 * Dropping this block renders the honeypot VISIBLE: humans fill it and
 * every submission is silently discarded as spam.
 * ------------------------------------------------------------------ */
.whb .whb-meta,
.whb .whb-hp {
	position: absolute !important;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
	border: 0;
	padding: 0;
	margin: 0;
}

/* Rows: two tracks, halves side by side, fulls span; inputs of a row share a
   baseline whatever hint sits under them (align-items: end). */
.whb-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.1rem 1.4rem;
	align-items: end;
	margin: 0 0 1.1rem;
}
.whb-row--full,
.whb-row > .whb-field:only-child {
	grid-template-columns: minmax(0, 1fr);
}
.whb-row--full > .whb-field {
	grid-column: 1 / -1;
}
@media (max-width: 40rem) {
	.whb-row {
		grid-template-columns: minmax(0, 1fr);
	}
}

.whb-field {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.whb-field .whb-hint {
	order: 10;
}

/* ------------------------------------------------------------------ *
 * The country checklist (JS-enhanced): a search box over a scrollable
 * list of real checkboxes, chips of the picked countries below. The
 * native <select multiple> stays in the DOM (off-screen, still the
 * submitted control) so the no-JS path never forks.
 * ------------------------------------------------------------------ */
.whb-cm {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--bc-gold-line);
	background: var(--bc-field);
	border-radius: 2px;
	overflow: hidden;
	transition: border-color .25s, box-shadow .25s;
}
/* the picked countries sit right under the search box, always in view; the list scrolls below */
.whb-cm__search { order: 1; }
.whb-cm__picked { order: 2; }
.whb-cm__list { order: 3; }
.whb-cm:focus-within {
	border-color: var(--bc-gold);
	box-shadow: 0 0 0 3px rgba(201, 165, 87, .18);
}
.whb-cm__search {
	border: 0 !important;
	border-bottom: 1px solid var(--bc-gold-line-soft) !important;
	border-radius: 0;
	box-shadow: none !important;
	background: rgba(201, 165, 87, .05);
}
.whb-cm__list {
	max-height: 13rem;
	overflow: auto;
	margin: 0;
	padding: .3rem 0;
	list-style: none;
	scrollbar-color: var(--bc-gold-deep) transparent;
}
.whb-cm__item {
	margin: 0;
}
.whb-cm__item label {
	display: flex;
	gap: .75rem;
	align-items: center;
	padding: .42rem .95rem;
	font-size: 1rem;
	color: var(--bc-ivory-soft);
	cursor: pointer;
	transition: background .2s, color .2s;
}
.whb-cm__item label:hover {
	background: var(--bc-gold-tint);
	color: var(--bc-ivory);
}
.whb-cm__item label:has(input:checked) {
	color: var(--bc-gold-light);
	background: rgba(201, 165, 87, .12);
}
.whb-cm__item input[type="checkbox"],
.whb-check {
	appearance: none;
	-webkit-appearance: none;
	flex: 0 0 auto;
	width: 1.25rem;
	height: 1.25rem;
	margin: 0;
	border: 1px solid var(--bc-gold);
	background: transparent;
	display: inline-grid;
	place-content: center;
	cursor: pointer;
	transition: background .2s, box-shadow .2s;
}
.whb-cm__item input[type="checkbox"]::before,
.whb-check::before {
	content: "\2713";
	font-family: var(--bc-serif);
	font-weight: 700;
	font-size: .95rem;
	line-height: 1;
	color: #1c150a;
	transform: scale(0);
	transition: transform .18s var(--bc-ease);
}
.whb-cm__item input[type="checkbox"]:checked,
.whb-check:checked {
	background: var(--bc-gold-fill);
	border-color: #e7cd88;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .4);
}
.whb-cm__item input[type="checkbox"]:checked::before,
.whb-check:checked::before {
	transform: scale(1);
}
.whb-cm__item input[type="checkbox"]:focus-visible,
.whb-check:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(201, 165, 87, .25);
}
.whb-cm__picked {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	padding: .7rem .95rem;
	border-bottom: 1px solid var(--bc-gold-line-soft);
	background: rgba(201, 165, 87, .06);
}
.whb-cm__picked:empty {
	display: none;
}
.whb-cm__chip {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	font-family: var(--bc-display);
	font-size: .66rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #1c150a;
	padding: .4rem .5rem .4rem .8rem;
	border: 1px solid #e7cd88;
	border-radius: 999px;
	background: var(--bc-gold-fill);
}
.whb-cm__chip button {
	display: inline-grid;
	place-content: center;
	width: 1.15rem;
	height: 1.15rem;
	border: 0;
	border-radius: 999px;
	background: rgba(28, 21, 10, .18);
	cursor: pointer;
	color: #1c150a;
	font: inherit;
	font-size: .9rem;
	line-height: 1;
	padding: 0;
	transition: background .2s, color .2s;
}
.whb-cm__chip button:hover {
	background: #1c150a;
	color: var(--bc-gold-light);
}
.whb--enhanced .whb-country-multi,
.bc-checklist-done {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ------------------------------------------------------------------ *
 * Actions + response states.
 * ------------------------------------------------------------------ */
.whb .whb-actions {
	margin: 1.6rem 0 0;
	text-align: center;
}
.whb .whb-submit {
	min-width: 17rem;
}
.whb-form.submitting .whb-submit {
	opacity: .6;
	pointer-events: none;
}
.whb-response {
	margin-top: 1.2rem;
	padding: .9rem 1.2rem;
	font-size: 1rem;
	border: 1px solid var(--bc-gold-line-soft);
	border-left: 2px solid var(--bc-gold);
	background: rgba(255, 255, 255, .03);
	color: var(--bc-ivory-soft);
}
.whb-response[aria-hidden="true"] {
	display: none;
}
.whb-form.sent .whb-response {
	border-left-color: var(--bc-ok);
	color: var(--bc-ivory);
	text-align: center;
	padding: 1.6rem 1.4rem;
	font-size: 1.1rem;
}
.whb-form.invalid .whb-response,
.whb-form.failed .whb-response {
	border-left-color: var(--bc-danger);
	color: #ecd2cf;
}
.whb-form.sent .whb-row,
.whb-form.sent .whb-actions {
	display: none;
}
