/* Built From The Ground Up: elements the quiz script creates at runtime.
   Kept in a global stylesheet because Etch only outputs class styles for classes on page blocks. */

.quiz-run__answers--scale {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .quiz-run__answers--scale {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
}

.quiz-run__ends {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8f8a83;
}

/* ACSS styles every <button> through these hooks */
.quiz-choice {
  --btn-font-family: inherit;
  --btn-font-weight: 600;
  --btn-letter-spacing: normal;
  --btn-text-transform: none;
  --btn-text-align: start;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  inline-size: 100%;
  min-block-size: 4rem;
  padding: 0.9rem 1.1rem;
  border: 2px solid #2a2a2a;
  border-radius: 0;
  background: #141414;
  color: #f4f2ee;
  font-size: var(--text-m);
  line-height: 1.3;
  text-align: start;
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease, transform 0.12s ease;
}

.quiz-choice:hover {
  border-color: #555;
  transform: translateX(3px);
}

.quiz-choice:focus-visible {
  outline: 3px solid var(--brand-red-hover);
  outline-offset: 2px;
}

.quiz-choice[aria-pressed='true'] {
  border-color: var(--brand-red);
  background: var(--brand-red);
  color: #fff;
}

.quiz-choice__key {
  display: grid;
  place-items: center;
  flex: none;
  inline-size: 2.1rem;
  block-size: 2.1rem;
  border: 2px solid #3a3a3a;
  font-size: 0.85rem;
  font-weight: 900;
  color: #a7a29b;
}

.quiz-choice[aria-pressed='true'] .quiz-choice__key {
  border-color: rgb(255 255 255 / 0.6);
  color: #fff;
}

.quiz-choice__label {
  flex: 1;
  min-inline-size: 0;
  text-align: start;
}

.quiz-choice--tick.quiz-choice[aria-pressed='true'] .quiz-choice__key {
  background: #fff;
  border-color: #fff;
  color: var(--brand-red);
}

.quiz-choice--none.quiz-choice {
  border-style: dashed;
}

.quiz-plate.quiz-choice {
  --btn-font-weight: 900;
  --btn-text-align: center;
  justify-content: center;
  min-block-size: 3.6rem;
  min-inline-size: 0;
  padding: 0;
  aspect-ratio: 1;
  border-radius: 999px;
  font-size: var(--text-l);
  font-variant-numeric: tabular-nums;
}

.quiz-plate.quiz-choice:hover {
  transform: translateY(-2px);
}

.quiz-plate .quiz-choice__label {
  flex: none;
  text-align: center;
}
