/* Deck builder: two-pane layout, deck entries. */

.deck-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .deck-layout { grid-template-columns: 1fr; }
  .deck-pane { order: -1; }
}

.deck-card-grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }

.deck-pane { position: sticky; top: 78px; }

.deck-count {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 4px 0 10px;
  color: var(--orange-hot);
}
.deck-count .color-dot { width: 12px; height: 12px; }

/* One colour per deck: the library keeps showing every card, and the ones this
   deck cannot take are dimmed rather than hidden. A card vanishing the moment a
   Leader is picked reads as a broken search; a dimmed card with a tooltip that
   names both colours teaches the rule instead. They stay clickable so the card
   can still be read. */
.card-tile.is-off-color { opacity: 0.28; filter: grayscale(0.85); }
.card-tile.is-off-color:hover {
  opacity: 0.6;
  filter: grayscale(0.4);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
}
.card-tile.is-off-color .tile-btn-add { display: none; }

.card-tile .card-tile-color {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 2;
  width: 11px;
  height: 11px;
}

.deck-color-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 12px;
  font-size: 0.82rem;
  color: var(--muted);
}
.deck-problems {
  border: 1px solid rgba(226, 59, 13, 0.6);
  background: rgba(226, 59, 13, 0.1);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.deck-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow: auto; }
.deck-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  /* The right padding is the remove button's lane. components.css reserves it
     with `padding-right: 34px`, but this file loads AFTER it and a `padding`
     SHORTHAND resets every side — so writing `7px 10px` here silently took the
     lane back and the button sat on top of the category text. Long-hand values,
     so the two rules cannot fight. */
  padding: 7px 34px 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  cursor: pointer;
  transition: border-color 0.14s ease, transform 0.14s ease;
  user-select: none;
}
.deck-entry:hover { border-color: var(--red); transform: translateX(-2px); }
.deck-entry .qty {
  min-width: 30px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--orange-hot);
}
.deck-entry .nm { flex: 1; font-weight: 600; font-size: 0.9rem; }
.deck-entry .tp { color: var(--muted); font-size: 0.74rem; }
