/* Benjax — formulário em etapas. Usa os tokens do tema com fallback. */
.bjx-form {
	--w-ink: var(--asfalto, #141414);
	--w-paper: var(--papel, #f4f1ea);
	--w-yellow: var(--faixa, #f5c400);
	--w-green: var(--zap, #0b6b3a);
	--w-muted: var(--concreto, #5a5650);
	--w-red: #a8200d;
	--w-radius: 6px;
	max-width: 40rem;
	margin: 0 auto;
	color: var(--w-ink);
}

.bjx-wizard { margin: 0; }
.bjx-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.bjx-step {
	border: 0;
	margin: 0 0 2.5rem;
	padding: 0;
	min-width: 0;
}
.bjx-wizard.is-enhanced .bjx-step { margin-bottom: 1.5rem; }
.bjx-step legend { padding: 0; margin-bottom: .5rem; width: 100%; }
.bjx-step__title {
	display: block;
	font-family: var(--font-display, inherit);
	font-weight: 800;
	font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem);
	line-height: 1.05;
	text-transform: uppercase;
	letter-spacing: -.01em;
}
.bjx-step__title:focus { outline: none; }
.bjx-step__title:focus-visible { outline: 3px solid var(--w-ink); outline-offset: 4px; }
.bjx-step__hint { color: var(--w-muted); margin: 0 0 1rem; }

/* Progresso */
.bjx-wizard__progress { margin: 0 0 1.25rem; }
.bjx-wizard__count {
	margin: 0 0 .4rem;
	font-family: var(--font-mono, ui-monospace, monospace);
	font-weight: 700;
	font-size: .8rem;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.bjx-wizard__bar { height: 8px; background: #e2ddd1; border-radius: 2px; overflow: hidden; }
.bjx-wizard__bar span { display: block; height: 100%; width: 0; background: var(--w-ink); transition: width .25s ease; }
@media (prefers-reduced-motion: reduce) { .bjx-wizard__bar span { transition: none; } }

/* Opções (cards grandes, alvo de toque >= 56px) */
.bjx-options { display: grid; gap: .6rem; }
.bjx-options--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .bjx-options--grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.bjx-option { position: relative; display: block; cursor: pointer; }
.bjx-option input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.bjx-option__box {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: .2rem;
	min-height: 56px;
	padding: .8rem 1rem .8rem 2.9rem;
	background: #fff;
	border: 2px solid var(--w-ink);
	border-radius: var(--w-radius);
	font-weight: 600;
	line-height: 1.25;
	position: relative;
	transition: background .1s;
}
.bjx-option__box small { font-weight: 400; color: var(--w-muted); }
.bjx-option__box::before {
	content: "";
	position: absolute;
	left: 1rem;
	top: 50%;
	width: 1.1rem;
	height: 1.1rem;
	margin-top: -.55rem;
	border: 2px solid var(--w-ink);
	border-radius: 50%;
	background: #fff;
}
.bjx-option--check .bjx-option__box::before { border-radius: 3px; }
.bjx-option input:checked + .bjx-option__box { background: var(--w-yellow); }
.bjx-option input:checked + .bjx-option__box::before {
	background: var(--w-ink);
	box-shadow: inset 0 0 0 3px var(--w-yellow);
}
.bjx-option--check input:checked + .bjx-option__box::before {
	box-shadow: none;
	background: var(--w-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%23f5c400' stroke-width='2.5'/%3E%3C/svg%3E") center/80% no-repeat;
}
.bjx-option input:focus-visible + .bjx-option__box { outline: 3px solid var(--w-ink); outline-offset: 3px; }
.bjx-option:hover .bjx-option__box { background: #fffbe6; }
.bjx-option:hover input:checked + .bjx-option__box { background: var(--w-yellow); }

/* Segmentos com ícone */
.bjx-options--grid .bjx-option__box {
	padding: 1rem .75rem;
	align-items: center;
	text-align: center;
	min-height: 96px;
}
.bjx-options--grid .bjx-option__box::before { display: none; }
.bjx-options--grid svg {
	width: 28px;
	height: 28px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.bjx-option__price { font-weight: 700; font-family: var(--font-mono, ui-monospace, monospace); font-size: .9rem; }

.bjx-step.has-error .bjx-option__box { border-color: var(--w-red); }

/* Campos */
.bjx-field { margin: 0 0 1rem; }
.bjx-field label { display: block; font-weight: 700; margin-bottom: .35rem; }
.bjx-opt { font-weight: 400; color: var(--w-muted); }
.bjx-field input[type="text"],
.bjx-field input[type="tel"],
.bjx-field input[type="email"] {
	width: 100%;
	min-height: 52px;
	padding: .7rem .85rem;
	font: inherit;
	font-size: 1.0625rem; /* >= 16px evita zoom no iOS */
	color: var(--w-ink);
	background: #fff;
	border: 2px solid var(--w-ink);
	border-radius: var(--w-radius);
	box-sizing: border-box;
}
.bjx-field input:focus-visible { outline: 3px solid var(--w-yellow); outline-offset: 0; box-shadow: 0 0 0 5px var(--w-ink); }
.bjx-field input[aria-invalid="true"] { border-color: var(--w-red); background: #fff6f4; }
.bjx-field__error { color: var(--w-red); font-weight: 600; margin: .35rem 0 0; }
.bjx-prefix { display: flex; align-items: stretch; }
.bjx-prefix span {
	display: flex;
	align-items: center;
	padding: 0 .75rem;
	border: 2px solid var(--w-ink);
	border-right: 0;
	border-radius: var(--w-radius) 0 0 var(--w-radius);
	background: #ebe6da;
	font-weight: 700;
}
.bjx-prefix input { border-radius: 0 var(--w-radius) var(--w-radius) 0 !important; }

.bjx-more { margin: 0 0 1rem; }
.bjx-more summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; gap: .35rem; list-style: none; }
.bjx-more summary::-webkit-details-marker { display: none; }
.bjx-more summary::before { content: "+"; display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border: 2px solid var(--w-ink); font-family: var(--font-mono, monospace); font-weight: 700; flex: none; }
.bjx-more[open] summary::before { content: "–"; }
.bjx-more[open] summary { margin-bottom: .75rem; }

.bjx-consent { display: flex !important; gap: .7rem; align-items: flex-start; font-weight: 400 !important; cursor: pointer; }
.bjx-consent input { width: 1.4rem; height: 1.4rem; margin: .1rem 0 0; flex: none; accent-color: var(--w-ink); }
.bjx-consent a { color: inherit; }

.bjx-chosen { background: #fff; border: 2px dashed var(--w-ink); border-radius: var(--w-radius); padding: .6rem .8rem; }

/* Botões */
.bjx-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	min-height: 52px;
	padding: .75rem 1.4rem;
	font: 700 1.0625rem/1 var(--font-text, inherit);
	border: 2px solid var(--w-ink);
	border-radius: 4px;
	cursor: pointer;
	text-decoration: none;
}
.bjx-btn--primary { background: var(--w-yellow); color: var(--w-ink); box-shadow: 0 4px 0 var(--w-ink); }
.bjx-btn--primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--w-ink); }
.bjx-btn--primary:disabled { opacity: .7; cursor: progress; }
.bjx-btn--ghost { background: transparent; color: var(--w-ink); }
.bjx-btn--zap { background: var(--w-green); border-color: var(--w-green); color: #fff; }
.bjx-btn:focus-visible { outline: 3px solid var(--w-ink); outline-offset: 4px; }
.bjx-submit { width: 100%; margin-top: .5rem; }
.bjx-link { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; min-height: 24px; }

.bjx-wizard__nav {
	display: flex;
	justify-content: space-between;
	gap: .75rem;
	margin-top: .5rem;
}
.bjx-wizard__nav .bjx-next { flex: 1; max-width: 18rem; margin-left: auto; }
.bjx-wizard__nav [hidden] { display: none; }

.bjx-wizard__errors, .bjx-alert {
	background: #fff1ee;
	border-left: 5px solid var(--w-red);
	color: #5e1206;
	padding: .8rem 1rem;
	margin: 0 0 1rem;
	font-weight: 600;
}

.bjx-success {
	background: var(--w-ink);
	color: var(--w-paper);
	border-radius: var(--w-radius);
	padding: 2rem 1.5rem;
}
.bjx-success__tag {
	display: inline-block;
	margin: 0 0 .75rem;
	font-family: var(--font-mono, ui-monospace, monospace);
	font-weight: 700;
	font-size: .8rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--w-yellow);
}
.bjx-success__title {
	font-family: var(--font-display, inherit);
	font-weight: 800;
	text-transform: uppercase;
	font-size: clamp(1.8rem, 1.4rem + 2vw, 2.6rem);
	line-height: 1;
	margin: 0 0 .75rem;
	color: var(--w-paper);
}
.bjx-success__title:focus { outline: none; }
.bjx-success .bjx-link { color: var(--w-paper); }
.bjx-success .bjx-btn--zap { border-color: var(--w-paper); }

/* Celular: navegação da etapa sempre à mão (fixa no rodapé da tela). */
@media (max-width: 767px) {
	.bjx-wizard.is-enhanced .bjx-wizard__nav {
		position: sticky;
		bottom: 0;
		z-index: 5;
		margin-inline: calc(-1 * var(--gutter, 16px));
		padding: .75rem var(--gutter, 16px) calc(.75rem + env(safe-area-inset-bottom));
		background: var(--w-paper);
		border-top: 2px solid var(--w-ink);
	}
}

.bjx-option__badge {
	align-self: flex-start;
	margin-bottom: .2rem;
	padding: .15rem .45rem;
	background: var(--w-ink);
	color: var(--w-yellow);
	font-family: var(--font-mono, ui-monospace, monospace);
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	border-radius: 2px;
}

.bjx-submit + .bjx-step__hint { margin-top: 1rem; }
.bjx-options--grid .bjx-option { display: flex; }
.bjx-options--grid .bjx-option__box { flex: 1; }
