/*
 * CARFAX Canada badge display.
 *
 * `badges_image_url` is a single combined strip (logo + View Report + badges)
 * that CARFAX renders responsively to the width it is given, so we mostly just
 * constrain the box and let the image scale. Cards get a compact, height-capped
 * strip; the detail page gets the full-width strip.
 */
.carfax-badge {
    line-height: 0;
}

.carfax-badge a {
    display: inline-block;
}

.carfax-badge img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

/* Compact indicator on listing cards (CARFAX "Small" size ≈ 30px tall). */
.carfax-badge--card img {
    max-height: 30px;
}

/*
 * Reserve a fixed-height slot so a card without a badge lines up with a badged
 * card beside it. The placeholder occupies the same height as the badge strip;
 * it is only emitted once a vehicle has been synced, so listings on sites that
 * don't use CARFAX keep their original spacing.
 */
.carfax-badge--card,
.carfax-badge-placeholder {
    min-height: 30px;
}

/* Full strip on the vehicle detail page. */
.carfax-badge--detail img {
    max-width: 100%;
}
