/* bingo: rules used only by the bingo pages (loaded after base.css). */
/* Bingo */
.bingo-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.bingo-controls label {
  display: block;
  min-width: 0;
  font-weight: 700;
  font-size: 0.85rem;
}

.bingo-controls select {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 0.2rem;
}

.bingo-current {
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 3rem;
  font-weight: 700;
  border: 2px solid #141413;
  background: #fff;
  margin-bottom: 0.5rem;
}

.bingo-current svg {
  width: 4rem;
  height: 4rem;
  margin: 0 0.5rem;
}

.bingo-current span {
  font-size: 1.6rem;
}

.bingo-actions button {
  min-height: 44px;
}

.bingo-cards {
  max-width: 24rem;
  margin: 0 auto 0.5rem;
}

.bingo-card {
  border: 2px solid #141413;
  background: #fff;
  padding: 0.5rem;
  min-width: 0;
}

.bingo-card-title {
  text-align: center;
  margin: 0.1rem 0 0.4rem;
  font-size: 1rem;
}

.bingo-grid {
  display: grid;
  grid-template-columns: repeat(var(--bingo-n), minmax(0, 1fr));
}

.bingo-cell {
  position: relative;
  display: block;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid #141413;
  border-radius: 0;
  background: #fff;
  color: #141413;
  font-size: 1.3rem;
  font-weight: 700;
}

.bingo-cell::before {
  content: "";
  display: block;
  padding-top: 100%;
}

.bingo-in {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bingo-cell svg {
  width: 80%;
  height: 80%;
}

.bingo-cell.marked::after {
  content: "";
  position: absolute;
  top: 8%;
  right: 8%;
  bottom: 8%;
  left: 8%;
  border: 4px solid #141413;
  border-radius: 50%;
}

.bingo-cell.wrong {
  outline: 4px dashed #141413;
  outline-offset: -6px;
}

/* The computers' cards (task 168): small, only to look at. Two side by
   side, numbers 0.8rem (about 13 px) on 3 x 3 and 5 x 5. */
.bingo-cpu-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr));
  gap: 0.5rem;
  max-width: 24rem;
  margin: 0 auto 0.5rem;
}

.bingo-mini {
  padding: 0.3rem;
}

.bingo-mini .bingo-card-title {
  font-size: 0.85rem;
  margin: 0 0 0.25rem;
}

.bingo-mini-cell {
  position: relative;
  display: block;
  min-width: 0;
  border: 1px solid #141413;
  background: #fff;
  color: #141413;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
}

.bingo-mini-cell::before {
  content: "";
  display: block;
  padding-top: 100%;
}

.bingo-mini-cell svg {
  width: 80%;
  height: 80%;
}

.bingo-mini-cell.marked::after {
  content: "";
  position: absolute;
  top: 6%;
  right: 6%;
  bottom: 6%;
  left: 6%;
  border: 2px solid #141413;
  border-radius: 50%;
}

/* The item just called: a dashed frame inside the cell. */
.bingo-mini-cell.bingo-just {
  outline: 2px dashed #141413;
  outline-offset: -3px;
}

/* A computer's bingo: the winning cells in black. */
.bingo-mini-cell.bingo-win {
  background: #141413;
  color: #fff;
}

.bingo-mini-cell.bingo-win.marked::after {
  border-color: #fff;
}

.bingo-mini-cell.bingo-win svg g {
  stroke: #fff;
}

.bingo-called-title {
  font-size: 1rem;
  margin: 0.5rem 0 0.3rem;
}

.bingo-called {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}

.bingo-called li {
  min-width: 2.2rem;
  margin: 0 0.3rem 0.3rem 0;
  padding: 0.15rem 0.3rem;
  border: 1px solid #141413;
  text-align: center;
  font-weight: 700;
}

.bingo-called li.bingo-called-pic {
  padding: 0.1rem;
}

.bingo-called-pic svg {
  display: block;
  width: 2.2rem;
  height: 2.2rem;
}

.bingo-print {
  display: none;
}

@media print {
  body.page-bingo #app > header,
    body.page-bingo #app > nav,
    body.page-bingo #app > footer,
    body.page-bingo #settings-panel,
    body.page-bingo #board-section,
    body.page-bingo > :not(#app) {
      display: none !important;
    }
    body.page-bingo .bingo-print {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8mm;
      padding: 6mm;
    }
    body.page-bingo .print-card {
      break-inside: avoid;
      border: 1.5pt solid #000;
      padding: 3mm;
    }
    body.page-bingo .print-card .bingo-cell {
      background: #fff;
      border: 1pt solid #000;
    }
    body.page-bingo .print-card .bingo-cell::after {
      display: none;
    }
  }
