/**
 * BenefitBridge assessment quiz.
 *
 * Tokens are declared on .bb-card so Elementor's style controls can override
 * any of them per instance without this file growing selector weight.
 */

.bb-card {
	--bb-surface: #ffffff;
	--bb-line: #dce4dd;
	--bb-ink: #16302a;
	--bb-muted: #5c6e66;
	--bb-brand: #1c5d48;
	--bb-brand-deep: #123f31;
	--bb-amber: #e0a33a;
	--bb-amber-deep: #c6892a;
	--bb-wash: #e7f1ea;
	--bb-tint: #ecf1ec;
	--bb-error: #b3261e;
	--bb-radius-card: 22px;
	--bb-radius-input: 16px;

	box-sizing: border-box;
	background: var(--bb-surface);
	border: 1px solid var(--bb-line);
	border-radius: var(--bb-radius-card);
	padding: 28px;

	/* The site's one shadow, tinted to the forest ground. Never pure black. */
	box-shadow:
		0 1px 2px rgba(18, 63, 49, 0.06),
		0 12px 32px -12px rgba(18, 63, 49, 0.16);
}

.bb-card *,
.bb-card *::before,
.bb-card *::after {
	box-sizing: inherit;
}

/* ------------------------------------------------------------------ */
/* Progress                                                            */
/* ------------------------------------------------------------------ */

.bb-quiz-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.bb-step {
	font-size: 13px;
	font-weight: 600;
	color: var(--bb-muted);
}

.bb-card .bb-back {
	appearance: none;
	background: none;
	border: 0;
	padding: 4px 2px;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	color: var(--bb-brand);
	cursor: pointer;
}

.bb-card .bb-back:hover {
	color: var(--bb-brand-deep);
}

.bb-track {
	height: 6px;
	border-radius: 999px;
	background: var(--bb-tint);
	overflow: hidden;
	margin-bottom: 24px;
}

.bb-fill {
	height: 100%;
	width: 0;
	border-radius: 999px;
	background: var(--bb-brand);
	transition: width 0.25s ease;
}

/* ------------------------------------------------------------------ */
/* Question                                                            */
/* ------------------------------------------------------------------ */

.bb-q {
	margin: 0 0 20px;
	font-family: Fraunces, Georgia, serif;
	font-size: 24px;
	font-weight: 500;
	line-height: 1.25;
	color: var(--bb-ink);
}

.bb-q:focus {
	outline: none;
}

.bb-opts {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.bb-card .bb-opt {
	display: block;
	width: 100%;
	text-align: left;
	background: var(--bb-surface);
	border: 1px solid var(--bb-line);
	border-radius: var(--bb-radius-input);
	padding: 15px 18px;
	font: inherit;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--bb-ink);
	cursor: pointer;
	transition:
		background 0.15s ease,
		border-color 0.15s ease;
}

.bb-card .bb-opt:hover,
.bb-card .bb-opt-on {
	background: var(--bb-wash);
	border-color: var(--bb-brand);
}

/* ------------------------------------------------------------------ */
/* Fields                                                              */
/* ------------------------------------------------------------------ */

.bb-stack {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.bb-row {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.bb-label {
	font-size: 14px;
	font-weight: 600;
	color: var(--bb-ink);
}

.bb-req {
	color: var(--bb-brand);
}

.bb-card .bb-field {
	width: 100%;
	background: var(--bb-surface);
	border: 1px solid var(--bb-line);
	border-radius: var(--bb-radius-input);
	padding: 14px 16px;
	font: inherit;
	font-size: 16px;
	line-height: 1.4;
	color: var(--bb-ink);
}

.bb-card .bb-field::placeholder {
	color: var(--bb-muted);
	opacity: 1;
}

.bb-card select.bb-field {
	appearance: none;
	padding-right: 44px;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%235C6E66' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
}

.bb-card .bb-field[aria-invalid='true'] {
	border-color: var(--bb-error);
}

.bb-err {
	margin: 0;
	font-size: 14px;
	line-height: 1.45;
	color: var(--bb-error);
}

.bb-help {
	margin: 2px 0 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--bb-muted);
}

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */

.bb-card .bb-btn {
	appearance: none;
	align-self: flex-start;
	border: 0;
	border-radius: 999px;
	padding: 15px 26px;
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition:
		background 0.15s ease,
		transform 0.08s ease;
}

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

.bb-card .bb-btn-amber {
	background: var(--bb-amber);
	color: var(--bb-ink);
}

.bb-card .bb-btn-amber:hover {
	background: var(--bb-amber-deep);
}

.bb-card .bb-btn[disabled],
.bb-card .bb-is-busy {
	opacity: 0.65;
	cursor: progress;
	transform: none;
}

/* A stray `display` rule from a builder stylesheet must never override the
   hidden attribute: the Back control on step one depends on it. */
.bb-card [hidden] {
	display: none !important;
}

/* ------------------------------------------------------------------ */
/* Focus and assistive text                                            */
/* ------------------------------------------------------------------ */

.bb-card :focus-visible {
	outline: 2px solid var(--bb-brand);
	outline-offset: 2px;
	border-radius: 4px;
}

.bb-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.bb-fill,
	.bb-card .bb-opt,
	.bb-card .bb-btn {
		transition: none;
	}
}

@media (max-width: 480px) {
	.bb-card {
		padding: 22px 18px;
	}

	.bb-q {
		font-size: 21px;
	}

	.bb-card .bb-btn {
		align-self: stretch;
		text-align: center;
	}
}
