/* "You'll need": supplies on the game screen, the editor lines in Manage games,
   the shopping list, and its print view. */

/* ---------- Game screen ---------- */
.game-needs {
  margin-top: 3.2vh;
}

.needs-label {
  margin: 0 0 0.45em;
  font-family: var(--font-cond);
  font-weight: 800;
  font-size: var(--step-1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.needs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 0.5em;
}

.needs-list li {
  padding: 0.12em 0.65em 0.16em;
  border-radius: 0.35em;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: var(--step-2);
  line-height: 1.2;
}

/* ---------- Manage games: one line per item ---------- */
.supply-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  max-width: 560px;
}

.supply-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.supply-row input {
  min-width: 0;
}

.supply-add .supply-new {
  background: transparent;
  border-style: dashed;
}

/* ---------- Manage games: shopping list ---------- */
.shop {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1100px;
}

.shop-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.shop-title {
  margin: 0;
  font-family: var(--font-cond);
  font-weight: 800;
  font-size: 26px;
  color: #fff;
}

.shop-lead,
.shop-empty,
.shop-none {
  margin: 4px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 15px;
}

.shop-none .link-btn {
  font-size: inherit;
}

.shop .shop-groups {
  columns: 3 240px;
  column-gap: 20px;
}

.shop .shop-group {
  break-inside: avoid;
  margin: 0 0 16px;
  padding: 12px 16px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--surface-line);
}

.shop .shop-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.shop .shop-game {
  margin: 0;
  font-family: var(--font-cond);
  font-weight: 800;
  font-size: 20px;
  color: var(--gold);
}

.shop .shop-items {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.shop-items li {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
}

/* The amount for everyone playing, in front of each item */
.shop-qty {
  flex: none;
  min-width: 2ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.shop .shop-qty {
  color: #fff;
}

/* Players per game */
.shop-count {
  align-self: flex-start;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(31, 139, 255, 0.1);
  border: 1px solid rgba(31, 139, 255, 0.35);
}

.shop-count-label {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
}

.shop-stepper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.shop-stepper .score-btn {
  font-size: 18px;
}

.shop-stepper .score-btn:disabled {
  opacity: 0.35;
  cursor: default;
  filter: none;
}

.shop-count-num {
  min-width: 2ch;
  text-align: center;
  font-family: var(--font-cond);
  font-weight: 800;
  font-size: 28px;
  line-height: 1;
  color: #fff;
}

.shop-count-help {
  flex-basis: 100%;
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 14px;
}

.shop-count-help b {
  color: var(--ice);
}

/* Only printing shows it. */
.print-sheet {
  display: none;
}

@media (max-width: 640px) {
  .tabs {
    flex-wrap: wrap;
    border-radius: 20px;
  }

  .settings-panel {
    padding: 20px 16px;
  }
}

/* ---------- Print: just the shopping list ---------- */
@media print {
  @page {
    margin: 14mm;
  }

  html.is-printing-list,
  html.is-printing-list body {
    height: auto;
    overflow: visible;
    background: #fff;
    color: #000;
    color-scheme: light;
  }

  html.is-printing-list body > :not(.print-sheet),
  html.is-printing-list dialog::backdrop {
    display: none !important;
  }

  html.is-printing-list .print-sheet {
    display: block;
    font-family: var(--font-body);
    font-size: 12pt;
    line-height: 1.3;
  }

  .print-title {
    margin: 0;
    font-family: var(--font-cond);
    font-weight: 800;
    font-size: 28pt;
    line-height: 1;
  }

  .print-sub {
    margin: 6pt 0 18pt;
    color: #444;
    font-size: 10.5pt;
  }

  .print-groups {
    columns: 2;
    column-gap: 30pt;
  }

  .print-sheet .shop-group {
    break-inside: avoid;
    margin: 0 0 16pt;
  }

  .print-sheet .shop-game {
    margin: 0 0 4pt;
    padding-bottom: 3pt;
    border-bottom: 1.5pt solid #000;
    font-family: var(--font-cond);
    font-weight: 800;
    font-size: 14pt;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .print-sheet .shop-items {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .print-sheet .shop-items li {
    display: flex;
    align-items: baseline;
    gap: 8pt;
    padding: 3pt 0;
  }

  /* A box to tick off */
  .print-sheet .shop-items li::before {
    content: '';
    flex: none;
    width: 10pt;
    height: 10pt;
    border: 1.2pt solid #000;
    border-radius: 2pt;
    transform: translateY(1.5pt);
  }
}
