/*
 * CarFaultIQ — Instant Search & Vehicle Selectors v1 (UX corrections)
 * ------------------------------------------------------------------
 * Small separable companion to the client-side vehicle index. Contains only
 * interaction-affordance fixes found during QA of the faster panel.
 *
 * ROLLBACK: dequeue 'cfiq-search-perf' in functions.php, or delete this file.
 * Nothing else depends on it.
 * ------------------------------------------------------------------
 */

/* Suggestions now appear fast enough to be tapped immediately, so the option
   rows need a real touch target. Measured at 41px during 390px QA; 44px is the
   accepted minimum. Padding-based so the text stays vertically centred. */
.cfiq-search__option {
	min-height: 44px;
	display: flex;
	align-items: center;
}

/* Keep the panel inside the viewport on narrow screens and let a long list
   scroll rather than push the page. */
.cfiq-search__listbox,
[data-cfiq-search-listbox] {
	max-height: min(60vh, 420px);
	overflow-y: auto;
	overscroll-behavior: contain;
}

@media (max-width: 480px) {
	.cfiq-search__listbox,
	[data-cfiq-search-listbox] {
		max-height: 50vh;
	}
}

/* ---------- Dead-end / empty-state recovery actions (v1) ---------- */

.cfiq-evidence__empty-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0.75rem 0 0;
}

/* Recovery buttons are the whole point of an empty state, so they get a real
   touch target. Scoped to this context so the shared .cfiq-btn sizing used
   everywhere else is untouched. */
.cfiq-evidence__empty-actions .cfiq-btn {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}

/* The recovery row in the autocomplete panel reads as an action, not a result. */
.cfiq-search__option--recovery {
	font-weight: 600;
}

.cfiq-search__option--recovery::before {
	content: "→";
	margin-right: 0.45rem;
	opacity: 0.6;
}
