/* Answers counted by hand (docs/decisions/31, PR 6a): one counter per
   answer choice, on the Data Entry View and the facilitator view's Count by
   hand strip. Phone first (decision 30): one counter per row on a phone,
   side by side on a laptop; the buttons are at least 44px for a thumb. */
.tallies__question {
  font-size: 1.15rem;
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--spacing-base);
  overflow-wrap: anywhere;
}

.tallies__choices {
  display: grid;
  gap: var(--spacing-base);
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.tallies__none {
  font-style: italic;
  margin: var(--spacing-base) 0;
}

.tally__form {
  align-items: center;
  background-color: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--border-radius-sm);
  box-sizing: border-box;
  color: var(--black);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-small);
  height: 100%;
  padding: var(--spacing-base);
}

.tally__choice {
  font-weight: var(--font-weight-bold);
  margin: 0;
  overflow-wrap: anywhere;
  text-align: center;
}

.tally__controls {
  align-items: center;
  display: flex;
  gap: var(--spacing-base);
}

.tally__count {
  font-size: 3rem;
  font-variant-numeric: tabular-nums;
  font-weight: var(--font-weight-bold);
  line-height: 1;
  min-width: 2ch;
  text-align: center;
}

.tally__step {
  background-color: var(--dark-teal);
  border: none;
  border-radius: 50%;
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 1.75rem;
  font-weight: var(--font-weight-bold);
  height: 3.25rem;
  line-height: 1;
  touch-action: manipulation;
  width: 3.25rem;
}

.tally__step:hover,
.tally__step:focus-visible {
  background-color: var(--slate-700);
}

.tally__total {
  align-items: center;
  display: flex;
  gap: var(--spacing-small);
}

.tally__input {
  box-sizing: border-box;
  font: inherit;
  font-size: 1.15rem;
  min-height: 44px;
  text-align: center;
  width: 5rem;
}

.tally__status {
  color: var(--color-danger-dark);
  font-size: var(--font-size-small);
  min-height: 1em;
  text-align: center;
}

/* Once the classroom has finished, the counts are read-only (decision 31
   §7): the numbers only, with the reason above them. */
.tallies__closed {
  background-color: var(--color-warning-light);
  border-radius: var(--border-radius-sm);
  color: var(--black);
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--spacing-base);
  padding: var(--spacing-small) var(--spacing-base);
}

/* Add counts by hand (PR 6b): every question's counters, one after another. */
.hand-counts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hand-counts__question {
  border-top: 1px solid var(--slate-200);
  padding: var(--spacing-base) 0;
}

.hand-counts__label {
  font-size: var(--font-size-body);
  margin: 0 0 var(--spacing-small);
}

/* The Data Entry View page. */
.data-entry {
  background-color: var(--slate-100);
  min-height: 100vh;
}

.data-entry__header {
  align-items: center;
  background-color: var(--dark-teal);
  color: var(--white);
  display: flex;
  gap: var(--spacing-base);
  justify-content: space-between;
  padding: var(--spacing-small) var(--spacing-base);
}

.data-entry__title {
  font-size: 1.25rem;
  margin: 0;
}

.data-entry__activation {
  margin: 0;
  overflow-wrap: anywhere;
}

.data-entry__body {
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 60rem;
  padding: var(--spacing-base);
}

.data-entry__position {
  font-size: 1.1rem;
  margin: 0 0 var(--spacing-small);
}

.data-entry__hint {
  color: var(--slate-600);
  margin: 0 0 var(--spacing-base);
}

/* The facilitator view's Count by hand strip, under the slide. */
.facilitator-tally {
  margin-top: var(--spacing-base);
}

.facilitator-tally__toggle[aria-pressed="true"] {
  background-color: var(--dark-teal);
  color: var(--white);
}

.facilitator-tally .tallies,
.facilitator-tally .tallies__none {
  margin-top: var(--spacing-base);
}

/* On a phone, beside My notes at the top of the teacher's tools. */
@media (max-width: 600px) {
  .facilitator-tally {
    border-bottom: 1px solid currentcolor;
    margin-top: 0;
    order: -2;
    padding-bottom: var(--spacing-base);
  }
}
