/**
 * Brio Business Name Search — front-end styles.
 * Locked Brio design (footer-parity fields/buttons, same tokens and
 * breakpoints as the other tools) with a .bns- prefix; two-column form.
 *   ink #1A1B25 · text #666D80 · accent #1641FF · border #ECEFF3
 *   background #FFFFFF / alt #FAFCFF · font Poppins · radius 4px (12px box)
 */

.bns {
	--bns-ink: #1a1b25;
	--bns-text: #666d80;
	--bns-accent: #1641ff;
	--bns-border: #eceff3;
	--bns-bg: #ffffff;
	--bns-bg-alt: #fafcff;
	font-family: "Poppins", sans-serif;
	color: var(--bns-text);
	max-width: 1300px;
	margin: 0 auto;
	padding: 0 1rem;
	box-sizing: border-box;
}

.bns *,
.bns *::before,
.bns *::after {
	box-sizing: border-box;
}

.bns [hidden] {
	display: none !important;
}

.bns-title {
	color: var(--bns-ink);
	font-weight: 600;
	font-size: 1.8rem;
	line-height: 1.25;
	margin: 0 0 0.5rem;
	text-align: left;
}

.bns-subtitle {
	margin: 0 0 1rem;
	text-align: left;
	font-size: 1rem;
}

.bns-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	background: var(--bns-bg);
	border: 1px solid var(--bns-border);
	border-radius: 12px;
	padding: 1rem;
	overflow: hidden;
}

.bns-field--full {
	grid-column: 1 / -1;
}

.bns-field label {
	display: block;
	color: var(--bns-ink);
	font-weight: 500;
	font-size: 0.9rem;
	margin-bottom: 6px;
}

.bns-field input,
.bns-field select {
	width: 100%;
	font-family: "Poppins", Sans-serif;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.1rem;
	color: var(--bns-ink);
	background: var(--bns-bg-alt);
	border: 1px solid var(--bns-border);
	border-radius: 4px;
	padding: 8px 16px;
	min-height: 40px;
	outline: none;
	transition: border-color 0.15s ease;
}

.bns-field select {
	height: 40px;
}

.bns-field input:focus,
.bns-field select:focus {
	border-color: var(--bns-ink);
}

.bns-btn {
	display: block;
	width: 100%;
	font-family: "Poppins", Sans-serif;
	font-size: 1.05rem;
	font-weight: 500;
	line-height: 1.1;
	color: #ffffff;
	background-color: var(--bns-accent);
	border: none;
	border-radius: 4px;
	padding: 10px 22px;
	min-height: 44px;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.05s ease;
}

.bns-btn:hover {
	background-color: var(--bns-ink);
	color: #ffffff;
}

.bns-btn:active {
	transform: translateY(1px);
}

.bns-btn[disabled] {
	opacity: 0.6;
	cursor: default;
}

.bns-privacy {
	font-size: 0.78rem;
	margin: 10px 0 0;
	text-align: center;
	color: var(--bns-text);
}

.bns-privacy a {
	color: var(--bns-accent);
	text-decoration: none;
}

.bns-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.bns-error {
	margin-top: 16px;
	background: #fff4f4;
	border: 1px solid #f3caca;
	color: #a13030;
	border-radius: 10px;
	overflow: hidden;
	padding: 12px 16px;
	font-size: 0.92rem;
	text-align: center;
}

.bns-success {
	margin-top: 16px;
	background: var(--bns-bg-alt);
	border: 1px solid var(--bns-border);
	border-radius: 10px;
	overflow: hidden;
	padding: 1.5rem;
	text-align: center;
}

.bns-success-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 4px;
	background: #fff501;
	color: var(--bns-ink);
	font-size: 1.1rem;
	font-weight: 600;
	margin-bottom: 8px;
}

.bns-success p {
	margin: 0 0 6px;
	color: var(--bns-ink);
	font-weight: 500;
	font-size: 1rem;
	line-height: 1.6;
}

.bns-success-sub {
	font-weight: 400 !important;
	color: var(--bns-text) !important;
	font-size: 0.9rem !important;
}

.bns-success-sub a {
	color: var(--bns-accent);
	font-weight: 500;
	text-decoration: none;
}

.bns-btn--loading::after {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: 10px;
	vertical-align: -2px;
	border: 2px solid rgba(255, 255, 255, 0.45);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: bns-spin 0.7s linear infinite;
}

@keyframes bns-spin {
	to { transform: rotate(360deg); }
}

/* ── Tablet ───────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
	.bns-title {
		font-size: 1.6rem;
		margin-bottom: 0.3rem;
	}

	.bns-subtitle {
		font-size: 0.9rem;
	}

	.bns-field input,
	.bns-field select {
		font-size: 1rem;
		line-height: 1em;
	}

	.bns-field select {
		height: 43px;
	}

	.bns-field input {
		min-height: 43px;
	}
}

/* ── Mobile ───────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
	.bns-title {
		font-size: 1.2rem;
		margin-bottom: 0.25rem;
	}

	.bns-subtitle {
		font-size: 0.8rem;
	}

	.bns-form {
		grid-template-columns: 1fr;
		padding: 0.75rem;
	}

	.bns-success {
		padding: 1rem;
	}
}

/* Keyboard focus must be visible. The fields set outline:none and rely on a
   border-colour change alone, which is too subtle to locate by keyboard. */
.bns input:focus-visible,
.bns select:focus-visible,
.bns textarea:focus-visible,
.bns button:focus-visible,
.bns a:focus-visible {
	outline: 2px solid #1641FF;
	outline-offset: 2px;
}

/* Field prefilled from a ?name= link (Business Name Generator "Check availability"). */
#bns-name.bns-name--prefilled {
	border-color: #1641FF;
	box-shadow: 0 0 0 3px rgba( 22, 65, 255, 0.12 );
	background: #FAFCFF;
}

/* International phone input (intl-tel-input) — fill the field width and match
   the form's inputs. The library wraps #bns-phone in a .iti container. */
.bns .iti { width: 100%; display: block; }
.bns .iti input#bns-phone { width: 100%; }
.bns .iti__country-list { text-align: left; }
/* Keep the flag dropdown above sibling fields. */
.bns .iti--allow-dropdown .iti__flag-container { z-index: 3; }
