/* The card browser (js/browser.js): filter rows and a grid of cards. Used by the game's deck builder and the website's
   card library, which each set --gallery-card (the width of one card) and where the grid scrolls.
   Colours (--ink, --paper, --select, --dim) come from the page's own stylesheet. */
.browser-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.filter-row button,
.filter-row select,
.filter-row input {
  font-size: 10px;
  padding: 5px 8px;
}
.filter-row input {
  width: 140px;
}
.filter-row label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--dim);
}
.browser-count {
  font-size: 10px;
  color: var(--dim);
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--gallery-card, 200px));
  gap: 10px;
  padding: 10px;
  justify-content: center;
  align-content: start;
}
.gallery .card {
  position: relative;
  width: var(--gallery-card, 200px);
  aspect-ratio: 5 / 7;
  cursor: pointer;
}
.gallery .card img {
  width: 100%;
  height: 100%;
}
.gallery .card:hover {
  outline: 3px solid var(--select);
}
/* A note on a card, such as how many copies are in the deck. Hidden when empty. */
.badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--select);
  color: var(--ink);
  padding: 3px 5px;
  font-size: 20px;
  line-height: 1;
}
.badge:empty {
  display: none;
}
