/* Source-photo Fleet Rail
   A small, locally hosted image keeps selection responsive and avoids runtime
   requests to OEM sites. See js/fleet-media.js for attribution and match type. */

#fleet-rail .fleet-item {
  grid-template-columns: 64px minmax(0, 1fr) !important;
  min-height: 110px !important;
}

#fleet-rail .fi-visual {
  width: 64px;
  height: 54px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(145deg, #12232b, #071014);
}

#fleet-rail .fi-visual.has-photo svg {
  display: none;
}

#fleet-rail .fi-photo {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.05) contrast(1.04);
  transform: scale(1.015);
}

#fleet-rail .fi-visual > i {
  z-index: 2;
  left: 7px;
  right: 7px;
  bottom: 4px;
}

#fleet-rail .fi-photo-badge {
  position: absolute;
  z-index: 3;
  top: 4px;
  left: 4px;
  padding: 2px 3px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 3px;
  background: rgba(2,8,12,.72);
  color: #eafff1;
  font: 800 7px/1 'SF Mono', monospace !important;
  letter-spacing: .06em;
  text-shadow: 0 1px 2px #000;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
#fleet-rail .fleet-item:hover .fi-photo-badge,
#fleet-rail .fleet-item:focus-visible .fi-photo-badge {
  opacity: 1;
}

#fleet-rail .fleet-item[data-photo-kind="model-family"] .fi-photo-badge,
#fleet-rail .fleet-item[data-photo-kind="powertrain-reference"] .fi-photo-badge {
  color: #ffe1a1;
  border-color: rgba(245,198,108,.42);
}

/* The photo is a reference presentation layer, not evidence that the GLB is
   the same vehicle. Existing stand-in/concept disclosure remains in the item. */
#fleet-rail .fleet-item[data-photo-kind="powertrain-reference"] .fi-photo {
  object-position: 50% 40%;
}

@media (max-width: 720px) {
  #fleet-rail .fleet-item { grid-template-columns: 56px minmax(0, 1fr) !important; min-height: 88px !important; }
  #fleet-rail .fi-visual { width: 56px; height: 48px; }
}

/* Generated GLB thumbnails render inside the same visual well. */
#fleet-rail .fi-visual img.fi-img {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
#fleet-rail .fi-visual.has-photo img.fi-img { display: none; }
