/* home-answer.1.css - the home page's "Can I make it?" block (Snapblocks idea A2, mockup approved by the partner 2026-11-13).
   Loaded by index.html only, after home.8.css, whose .answer, .answer-route, .answer-show, .answer-total, .answer-tag and .receipt
   rules it builds on. scripts/build-home-answer.mjs writes the block; assets/home-answer.1.js picks the receipt and runs the chips.
   Colours are the site's tokens only. The one motion: when the visitor picks another city, the receipt's rows arrive once, top to
   bottom, opacity and a 6 px rise, 120 ms each, 40 ms apart (the total last, at 140 ms), 260 ms in all; the script never starts it
   under reduced motion, and the rule at the end (with the global one in styles.css) removes it as well. Versioned name. */

/* "From" and the city chips: the app's genre-chip look, a check mark beside the picked one, so the choice is not colour alone. */
.answer-from { margin-top: 16px; display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.answer-from[hidden] { display: none; }
.answer-from-label { font-size: 13px; color: var(--text-secondary); margin-right: 2px; }
.answer .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-input);
  background: var(--background-cardElevated);
  color: var(--text-secondary);
  font: 600 13px/1 var(--font-family);
  white-space: nowrap;
  cursor: pointer;
}
.answer .chip[aria-checked="true"] { background: var(--accent-primary); border-color: var(--accent-primary); color: var(--text-inverse); }
.answer .chip .ck { display: none; width: 12px; height: 12px; }
.answer .chip[aria-checked="true"] .ck { display: inline-block; }
.answer .chip:focus-visible { outline: 2px solid var(--border-focused); outline-offset: 2px; }
/* A phone fits two chips a row (four cities do not fit one row at 390 px): "From" on its own line, the chips two by two, and an odd
   last chip takes the whole row, so no city is left alone at the edge. The label is the group's first child, so the chips are 2..n+1. */
@media (max-width: 479px) {
  .answer-from { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .answer-from-label { grid-column: 1 / -1; margin-right: 0; }
  .answer .chip { justify-content: center; }
  .answer .chip:last-child:nth-child(even) { grid-column: 1 / -1; }
}

/* One receipt. The show's date never breaks across two lines; on a phone the venue starts its own line, so a venue's name is not
   split after the artist; the no-total line wraps into balanced lines (balancing the route split "Los / Angeles": measured, so not). */
.answer-receipt[hidden] { display: none; }
.answer-date { white-space: nowrap; }
.answer-nototal { text-wrap: balance; }
@media (max-width: 479px) {
  .answer-at { display: block; }
}
.answer-nototal { margin-top: 28px; font-size: 18px; font-weight: 600; color: var(--text-primary); }
.answer-tags { margin-top: 12px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.answer-tags .answer-tag { margin-top: 0; }
.answer-tags .answer-example { border-style: dashed; color: var(--text-primary); }
.receipt .answer-none { color: var(--text-secondary); font-size: 15px; text-align: right; }
.answer-until { margin-top: 14px; font-size: 13px; color: var(--text-secondary); }
.answer-more { margin-top: 8px; }

/* The print, on a city change only. */
@keyframes answer-print {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.answer-receipt.is-printing .receipt li { animation: answer-print 120ms cubic-bezier(0.23, 1, 0.32, 1) both; }
.answer-receipt.is-printing .receipt li:nth-child(2) { animation-delay: 40ms; }
.answer-receipt.is-printing .receipt li:nth-child(3) { animation-delay: 80ms; }
.answer-receipt.is-printing .receipt li:nth-child(n+4) { animation-delay: 120ms; }
.answer-receipt.is-printing .answer-total { animation: answer-print 120ms cubic-bezier(0.23, 1, 0.32, 1) 140ms both; }
@media (prefers-reduced-motion: reduce) {
  .answer-receipt.is-printing .receipt li,
  .answer-receipt.is-printing .answer-total { animation: none; }
}
