/* Formulário de orçamento e proposta. Cores herdadas do tema por variáveis. */
.fmt-form, .fmt-success, .fmt-proposal {
	--fmt-ink: var(--ink, #0d1b2e);
	--fmt-ground: var(--paper, #ffffff);
	--fmt-field: var(--field, #f2efe8);
	--fmt-accent: var(--accent, #0d1b2e);
	--fmt-accent-ink: var(--accent-ink, #ffffff);
	--fmt-soft: var(--ink-soft, #44506a);
	--fmt-error: #a1261b;
	--fmt-ok: #1f6a3a;
	color: var(--fmt-ink);
	font-size: 1rem;
	line-height: 1.5;
	max-width: 44rem;
}
.fmt-form [hidden], .fmt-form .js-only { display: none !important; }
.fmt-form.fmt-js .js-only:not([hidden]) { display: inline-flex !important; }
.fmt-form.fmt-js .fmt-nav.js-only:not([hidden]) { display: flex !important; }

.fmt-step { border: 0; margin: 0 0 2rem; padding: 0; min-width: 0; }
.fmt-step legend { font-size: 1.375rem; font-weight: 700; margin-bottom: 1rem; padding: 0; outline: none; }
.fmt-progress { font-weight: 600; color: var(--fmt-soft); margin: 0 0 .5rem; }

.fmt-field { margin-bottom: 1.125rem; position: relative; }
.fmt-field > label, .fmt-label { display: block; font-weight: 600; margin-bottom: .375rem; }
.fmt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 420px) { .fmt-row { grid-template-columns: 1fr; } }

.fmt-form input[type="text"], .fmt-form input[type="tel"], .fmt-form input[type="email"],
.fmt-form input[type="date"], .fmt-form input[type="time"], .fmt-form input[type="number"], .fmt-form textarea {
	width: 100%;
	box-sizing: border-box;
	min-height: 3rem;
	padding: .75rem .875rem;
	font: inherit;
	font-size: 1rem; /* 16px evita zoom no iOS */
	color: var(--fmt-ink);
	background: var(--fmt-field);
	border: 2px solid transparent;
	border-radius: 0;
	transition: border-color .15s ease, background-color .15s ease;
}
.fmt-form textarea { min-height: 5rem; resize: vertical; }
.fmt-form input:hover, .fmt-form textarea:hover { border-color: rgba(13, 27, 46, .25); }
.fmt-form input:focus, .fmt-form textarea:focus { outline: none; border-color: var(--fmt-ink); background: var(--fmt-ground); }
.fmt-form input[aria-invalid="true"], .fmt-form textarea[aria-invalid="true"] { border-color: var(--fmt-error); }

.fmt-choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.fmt-choice { position: relative; cursor: pointer; }
.fmt-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.fmt-choice span {
	display: inline-flex; align-items: center; min-height: 2.75rem; padding: .5rem .875rem;
	background: var(--fmt-field); font-weight: 500; transition: background-color .15s ease, color .15s ease;
}
.fmt-choice:hover span { background: #e6e1d6; }
.fmt-choice input:checked + span { background: var(--fmt-ink); color: var(--fmt-ground); }
.fmt-choice input:focus-visible + span { outline: 3px solid var(--fmt-accent); outline-offset: 2px; }

.fmt-check { display: flex; gap: .625rem; align-items: flex-start; cursor: pointer; font-weight: 400; }
.fmt-check input { width: 1.375rem; height: 1.375rem; margin: .125rem 0 0; flex: none; accent-color: var(--fmt-ink); }

.fmt-hint { color: var(--fmt-soft); font-size: .9375rem; margin: .375rem 0 0; }
.fmt-error { color: var(--fmt-error); font-weight: 600; font-size: .9375rem; margin: .375rem 0 0; }
.fmt-alert { padding: .875rem 1rem; margin: 0 0 1.25rem; font-weight: 600; }
.fmt-alert--error { background: #f9e3df; color: var(--fmt-error); }
.fmt-alert--ok { background: #e1f0e5; color: var(--fmt-ok); }
.fmt-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.fmt-nav { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.fmt-btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem;
	padding: .75rem 1.5rem; font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2;
	border: 0; border-radius: 0; cursor: pointer; text-decoration: none;
	transition: transform .12s ease, background-color .15s ease, color .15s ease;
}
.fmt-btn:active { transform: translateY(1px) scale(.99); }
.fmt-btn:focus-visible { outline: 3px solid var(--fmt-accent); outline-offset: 3px; }
.fmt-btn[disabled] { opacity: .6; cursor: progress; }
.fmt-btn--primary { background: var(--fmt-accent); color: var(--fmt-accent-ink); }
.fmt-btn--primary:hover { filter: brightness(1.08); }
.fmt-btn--ghost { background: transparent; color: var(--fmt-ink); box-shadow: inset 0 0 0 2px var(--fmt-ink); }
.fmt-btn--ghost:hover { background: var(--fmt-field); }

/* Autocomplete */
.fmt-ac__list {
	list-style: none; margin: 0; padding: .25rem 0; position: absolute; left: 0; right: 0; z-index: 30;
	background: var(--fmt-ground); box-shadow: 0 12px 32px rgba(13, 27, 46, .18); max-height: 18rem; overflow-y: auto;
}
.fmt-ac__list li { padding: .625rem .875rem; cursor: pointer; display: flex; flex-direction: column; gap: .125rem; }
.fmt-ac__list li span { color: var(--fmt-soft); font-size: .875rem; }
.fmt-ac__list li[aria-selected="true"], .fmt-ac__list li:hover { background: var(--fmt-field); }
.fmt-ac__status:empty { display: none; }

/* Estimativa */
.fmt-estimate { background: var(--fmt-ink); color: var(--fmt-ground); padding: 1.25rem 1.25rem 1rem; margin: 0 0 2rem; }
.fmt-estimate .fmt-hint { color: rgba(255, 255, 255, .78); }
.fmt-estimate__value { font-size: 1.125rem; margin: 0 0 .5rem; }
.fmt-estimate__value strong { font-size: 2rem; display: block; line-height: 1.1; }
.fmt-estimate__items { list-style: none; margin: 0 0 .5rem; padding: 0; }
.fmt-estimate__items li { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; font-variant-numeric: tabular-nums; }
.fmt-estimate__route { margin: 0 0 .75rem; }
.fmt-loading { margin: 0; }
.fmt-loading::after { content: ""; display: inline-block; width: .75rem; height: .75rem; margin-left: .5rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: fmt-rotate .8s linear infinite; vertical-align: -1px; }
@keyframes fmt-rotate { to { transform: rotate(360deg); } }

/* Sucesso e proposta */
.fmt-success { background: var(--fmt-field); padding: 1.5rem; outline: none; }
.fmt-success h2 { margin-top: 0; }
.fmt-success__code strong { font-size: 1.5rem; letter-spacing: .02em; }
.fmt-dl { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.25rem; margin: 1.5rem 0; }
.fmt-dl dt { font-weight: 600; color: var(--fmt-soft); }
.fmt-dl dd { margin: 0; }
.fmt-dl__price { font-size: 1.75rem; font-weight: 700; }
@media (max-width: 480px) { .fmt-dl { grid-template-columns: 1fr; gap: .125rem; } .fmt-dl dd { margin-bottom: .625rem; } }
.fmt-contact { list-style: none; padding: 0; }
.fmt-wa-button { display: inline-flex; min-height: 3rem; align-items: center; padding: .75rem 1.25rem; background: #1f6a3a; color: #fff; font-weight: 700; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
	.fmt-form *, .fmt-btn { transition: none !important; animation: none !important; }
}
/* Acompanhar pedido */
.fmt-steps { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .375rem; counter-reset: s; }
.fmt-steps li { counter-increment: s; display: flex; align-items: center; gap: .625rem; color: var(--fmt-soft); }
.fmt-steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; border: 2px solid currentColor; font-weight: 700; font-size: .8125rem; flex: none; }
.fmt-steps li.is-done { color: var(--fmt-ok); }
.fmt-steps li.is-done::before { content: "✓"; background: var(--fmt-ok); border-color: var(--fmt-ok); color: #fff; }
.fmt-steps li.is-current { color: var(--fmt-ink); font-weight: 700; }
.fmt-steps li.is-current::before { background: var(--fmt-accent); border-color: var(--fmt-accent); color: var(--fmt-accent-ink); }
