// LinkCard — preview card for a pasted Avito URL.
// Replaces the plain text list (AddedLinksList) used previously in OrderForm.
//
// Props:
// url — the Avito URL (canonical, already trimmed by parseAvitoUrls)
// meta — { status: 'loading'|'ok'|'not_found'|'fetch_failed', image_url?, title? }
// onRemove — callback when user clicks "×"
//
// States rendered:
// loading → neutral-gray thumb + CSS spinner, skeleton bar for title
// ok → from image_url, title shown
// not_found / fetch_failed → green "A" placeholder, fallback title = url path
function LinkCard({ url, meta, onRemove }) {
const status = (meta && meta.status) || 'loading';
const isLoading = status === 'loading';
const hasImage = status === 'ok' && meta && meta.image_url;
// Show green "A" tile only when we know there's no preview to load.
// (Without this gate the green flashes between loading and the
// actually rendering its pixels.)
const showFallback = !isLoading && !hasImage;
const titleText = (meta && meta.title) || _urlShortPath(url);
return (