/* Push: the warehouse board. Holes and everything outside the walls are hidden boxes (visibility, never
   opacity), and your box gets a ring while you stand on a spot, a switch or an open gate. */

/* the board is rebuilt to each level's size; the wrapper takes the swipes and taps */
.toy.push .push-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.toy.push .push-board input[data-void] {
  visibility: hidden;
}

.toy.push .push-board input[data-under] {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

.toy.push .push-board input[data-under="purple"] {
  outline-color: var(--purple);
}

/* level strip: one checkbox per level in two even rows */
.toy.push .push-levels {
  display: grid;
  grid-template-columns: repeat(var(--cols, 15), 18px);
  gap: 6px;
  justify-content: center;
  max-width: 100%;
  padding: 2px 0;
}

.toy.push .push-levels input {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.toy.push .push-levels input.push-gold {
  accent-color: var(--gold);
}

.toy.push .push-levels input[data-on] {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.toy.push .push-levels input:disabled {
  cursor: default;
}

/* touch pad: the undo box matches the arrows and sits level with left / right, its label hanging below */
.toy.push .pad-act {
  padding-top: 21px;
}

.toy.push .pad-action {
  width: 54px;
  height: 54px;
}

@media (pointer: coarse) {
  .toy.push .push-levels {
    grid-template-columns: repeat(var(--cols, 15), 19px);
    gap: 4px 1px;
    justify-content: space-between;
    width: min(100%, 341px); /* 15 boxes, 4px apart; narrower phones squeeze the gaps, not the boxes */
  }
  .toy.push .push-levels input {
    width: 19px;
    height: 19px;
  }
}

/* the narrowest phones (320px): smaller level boxes so the two rows still fit */
@media (max-width: 359px) {
  .toy.push .push-levels {
    grid-template-columns: repeat(var(--cols, 15), 17px);
  }
  .toy.push .push-levels input {
    width: 17px;
    height: 17px;
  }
}
