/* rechengitter: rules used only by the rechengitter pages (loaded after base.css). */
/* Math Cross (Rechenkreuz): a 7 x 7 grid - number squares, operators,
   "=" and results - and the number pad below. Given numbers are bold in
   a thick frame, entered ones normal; the selected square has a double
   frame. Used numbers on the pad are struck through (never grey alone). */
.mc-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 3rem)) minmax(0, 2rem) minmax(0, 4rem);
  grid-auto-rows: 3rem;
  justify-content: center;
  align-items: center;
  margin: 0.6rem 0;
}

.mc-grid .mc-item {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.mc-cell {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--square-light);
  color: var(--text);
  font-weight: 400;
}

.mc-cell.mc-given {
  border-width: 4px;
  font-weight: 700;
}

.mc-cell.mc-selected {
  border: 6px double var(--border);
}

.mc-op,
.mc-eq {
  font-weight: 700;
}

.mc-res {
  font-weight: 700;
  white-space: nowrap;
}

.mc-pad {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 22rem;
  margin: 0 auto 0.4rem;
}

.mc-num {
  min-width: 3rem;
  min-height: 3rem;
  margin: 0 0.25rem 0.4rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.mc-num-used {
  text-decoration: line-through;
  border-style: dashed;
}

.mc-num-current {
  border: 4px solid var(--border);
}

.mc-clear {
  font-size: 1rem;
}

@media (max-width: 400px) {
  .mc-grid {
      grid-template-columns: repeat(5, minmax(0, 2.6rem)) minmax(0, 1.6rem) minmax(0, 3.6rem);
      grid-auto-rows: 2.6rem;
    }
    .mc-num {
      min-width: 2.6rem;
    }
  }
