/* ========================================
   CARD ART LIST (.cs-missing)
   A grid of 150px cards, each its art (5:7, the card number on a dark chip
   at the foot), its name and a muted line or two under it; under 600px a
   list with a 48px thumbnail beside the text. Moved out of
   collection-stats.css on 2026-11-12 so the Wishlist page (/wishlist) uses
   the same cards as the stats page's missing cards, For Trade, Stats per
   Collection and Compare. The class names stay cs- so none of those
   templates changed. Self-contained: it sets every margin it needs, because
   only the stats pages reset <p> margins (:where(.cs-page) p).
   Needs style.css's --bar-track and --shadow-resting.
   ======================================== */

.cs-missing {
  display: grid;
  grid-template-columns: repeat(auto-fill, 150px);
  gap: 24px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cs-missing__card {
  min-width: 0;
}

.cs-missing__art {
  display: block;
  position: relative;
  aspect-ratio: 5 / 7;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bar-track);
  box-shadow: var(--shadow-resting);
}

.cs-missing__art picture,
.cs-missing__art img {
  display: block;
  width: 100%;
  height: 100%;
}

.cs-missing__art img {
  object-fit: cover;
}

/* The card number on the art: white on a dark chip, 5.7:1 or better over
   any artwork. */
.cs-missing__num {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.6);
  font-family: var(--font-header);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  color: #FFFFFF;
}

.cs-missing__name {
  margin: 8px 0 0;
  font-family: var(--font-header);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--colour-text);
  overflow-wrap: anywhere;
}

.cs-missing__variant {
  margin: 2px 0 0;
  font-family: var(--font-paragraph);
  font-size: 13px;
  line-height: 1.35;
  color: var(--colour-text-muted);
}

.cs-missing__price {
  margin: 4px 0 0;
  font-family: var(--font-header);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--colour-text);
}

@media (max-width: 599px) {
  /* The missing cards as a list: a 48px thumbnail beside the name, the
     variant and the price. */
  .cs-missing {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .cs-missing__card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr;
    column-gap: 14px;
    align-items: start;
  }

  .cs-missing__art {
    grid-row: 1 / -1;
    width: 48px;
    border-radius: 6px;
  }

  .cs-missing__num {
    left: 3px;
    bottom: 3px;
    padding: 1px 3px;
    font-size: 9px;
  }

  .cs-missing__name {
    margin-top: 0;
  }
}
