/* Content-based columns (Rule 7): cards reflow 3→2→1 on container width. */
.bido-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 14px;
}

/* Traveler listing card — one component for the catalog, builder and wheels
   grids. Structure: .bido-traveler-card-media (photo or glyph) → -body (title,
   meta) → optional -note → -foot (price + .bido-card-actions). Replaces the
   former .bido-listing-card / .bido-catalog-card-* / .bido-wheels-catalog-* . */
.bido-traveler-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* The catalog/builder shelves render the full inventory on one page —
     skip rendering off-screen cards so the long mobile pages stay cheap. */
  content-visibility: auto;
  contain-intrinsic-size: auto 20rem;
}

.bido-traveler-card.selected,
.bido-catalog-grid > .card.selected {
  outline: 2px solid var(--bx-accent);
  outline-offset: -1px;
}

.bido-traveler-card-media {
  position: relative;
}

.bido-traveler-card-body {
  display: grid;
  gap: 2px;
  align-content: start;
  padding: 14px 14px 0;
}

.bido-traveler-card-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--bx-text);
  color: var(--bx-ink);
}

.bido-traveler-card-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--bx-text-sm);
}

.bido-traveler-card-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  padding: 6px 14px 0;
  font-size: var(--bx-text-sm);
  line-height: 1.45;
}

.bido-traveler-card-note svg {
  flex: 0 0 auto;
  margin-top: 2px;
}

.bido-traveler-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: auto;
  padding: 12px 14px 14px;
}

.bido-traveler-card-price {
  font-size: var(--bx-text);
  font-weight: 600;
  color: var(--bx-ink);
}

.bido-traveler-card-price .bido-card-unit,
.bido-traveler-card-price small {
  font-size: var(--bx-text-xs);
  font-weight: 400;
}

/* Wheels variant — transport context: a glyph + seat badge replaces the photo
   so a ride never reads like a property listing. The titles also share a
   long marketing prefix ("Private Airport Transfer — …" / "Private Chauffeur
   — …"), so the single-line ellipsis from the base card class hides the
   exactly-distinguishing tail. Allow up to two lines on wheels cards only;
   the other pillars keep the tighter single-line title. */
.bido-traveler-card--wheels .bido-traveler-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  overflow: hidden;
  line-height: 1.3;
}

.bido-traveler-card--wheels .bido-traveler-card-media {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--bx-line);
  background:
    radial-gradient(130% 170% at 100% 0%, var(--bx-accent-soft), transparent 65%),
    var(--bx-paper-2);
}

.bido-traveler-card-glyph {
  display: flex;
}

.bido-traveler-card-seats {
  font-size: var(--bx-text-sm);
  color: var(--bx-ink-2);
}

.bido-traveler-card-seats strong {
  font-family: var(--bx-font-display);
  font-size: var(--bx-text-xl);
  color: var(--bx-ink);
}

/* Wheels card with real vehicle photos — the glyph/gradient media is swapped
   for the cover (or the carousel when a class has several shots), so drop the
   flex/padding/gradient and let the photo fill the media box like the other
   pillars. The seat badge moves to an overlay so nothing crops the image. */
.bido-traveler-card--wheels .bido-traveler-card-media--photo {
  display: block;
  padding: 0;
  background: none;
}

.bido-traveler-card-seats--overlay {
  position: absolute;
  inset-block-end: 8px;
  inset-inline-end: 8px;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--bx-r-pill);
  background: rgba(var(--bx-navy-rgb), 0.6);
  color: rgba(var(--bx-white-rgb), 0.92);
  /* Decorative badge over the stretched card link — clicks open the card. */
  pointer-events: none;
}

.bido-traveler-card-seats--overlay strong {
  font-family: var(--bx-font-display);
  font-size: var(--bx-text-md);
  color: rgba(var(--bx-white-rgb), 1);
}

.bido-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bido-card-actions .button_to,
.bido-wallet-row .button_to {
  display: flex;
}

.bido-card-actions .btn {
  justify-content: center;
}

.bido-clickable-card {
  position: relative;
}

.bido-clickable-card:hover {
  border-color: var(--bx-ink-3);
}

.bido-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

/* Keyboard parity: the stretched anchor covering each card is invisible to
   sighted mouse users but reachable via Tab. A 2px accent outline makes the
   focus state legible on both light and dark surfaces without leaking into
   non-focus states. */
.bido-card-link:focus-visible {
  outline: 2px solid var(--bx-accent);
  outline-offset: -2px;
}

.bido-clickable-card .bido-card-actions {
  position: relative;
  z-index: 2;
}

