/* Vehicle photographs show the whole source frame. Avatars, logos, document
   previews, store products and camera viewfinders retain their own framing.
   Important layer declarations outrank inherited unlayered legacy !important
   crop rules without changing image sources, dimensions or permission state. */
@layer bleuVehiclePhotoFit {
  :where(
    [data-cphoto] img,
    .ask-experience .ask-ws-record-photo img,
    .iv-thumb img, img.iv-thumb-photo,
    .ivx-card-photo img, .ivx-thumb img, img.ivx-photo,
    .ivp-frame > img.ivp-img, img.ivp-timg,
    .ivl-photo img, img.ivl-website-photo,
    [data-bt-root="assets"] .bt-thumb img,
    .carsh .cshero img,
    #drawer[data-brs="asset"] .brs-thumb img,
    #drawer.car-detail-v2 .brs-thumb img,
    #drawer .cr-image img,
    .bww-workspace .bwp-photo-shell img,
    .mv-photo img, .tap-vehicle-photo img,
    .tdv-car > img, .tdv-car .tv6-photo img,
    .tvc-vehicle-context .bleu-car-choice-photo img,
    .tm-item > img, .tm-selection-heading > img,
    .lsgrid3 .lsph img, .lsthumb img, .lsstrip img, .lstile > img,
    .bleu-deal-photo img,
    .nyh-car .nyh-ph img, .nx-ph img,
    img.sophoto,
    .wq-photo img, .wi-asset .cph img,
    .wv2-car .cph img, .wvt-photo img,
    .acq-cover img, .acq-photo-dialog img,
    .auto-inventory .oi-list img, img.auto-car-photo,
    .kit-cars img, img.kit-cover,
    .cj .cj-hero img, .cj-vehicle img,
    img.vqa-photo, img.vqb-photo,
    #kiosk .ki-result-photo img,
    #kiosk .k6-shot img, #kiosk .k6-support .kphk img,
    #kiosk .ci-wheel-fields img.kp-thumb,
    #kiosk .kcr-photo img,
    #ipview .ipphotos img
  ) {
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
    background-color: var(--well, var(--inset, #f3f4f6)) !important;
  }
}
/* Vehicle facts need enough width for a complete VIN. The existing phone card
   already places its facts below the photo/title; let those facts use one full
   column instead of forcing two narrow cells. Wider cards add columns only when
   each cell can keep normal-size identifiers readable. */
@layer bleuVehiclePhotoFit {
  :where(.ask-experience .ask-ws-vehicle-record .ask-ws-record-facts) {
    grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)) !important;
    justify-self:stretch !important;
    width:100% !important;
  }
}
@layer bleuVehiclePhotoFit {
  @media(max-width:640px) {
    /* A later generic Ask-record rule forces one column. Vehicle cards retain
       their native explicit photo/title tracks, so full-width facts span both
       tracks instead of collapsing into a zero-width implicit column. */
    :where(.ask-experience .ask-ws-vehicle-record) {
      grid-template-columns:92px minmax(0,1fr) !important;
    }
  }
}
@layer bleuVehiclePhotoFit {
  :where(.ask-experience .ask-ws-vehicle-record .ask-ws-record-facts > div) {
    display:block !important;
  }
}
