/* Thanksgiving food calculator (/tools/thanksgiving-food-calculator): guest steppers, dish chips,
   the grouped shopping table, and a print layout that prints only the list.
   Builds on the .nk-* tools block in site.css. */

/* Adults / kids / vegetarians: three columns on wide cards, one on phones. */
.tg-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 14px; }
.tg-stepper { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 4px; align-items: center; }
.tg-stepper .nk-input { text-align: center; font-variant-numeric: tabular-nums; padding: 0 6px; }
.tg-stepper .nk-icon-btn { background: #f2ebe0; color: #3b302b; }
.tg-stepper .nk-icon-btn:hover { background: #ede5d8; }
.tg-hint { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: #9a8570; }

/* Appetite and leftovers side by side when there is room. */
.tg-options { display: flex; flex-wrap: wrap; gap: 16px 28px; }

/* Segmented control that may wrap on narrow screens (four mains). */
.tg-seg-wrap { flex-wrap: wrap; border-radius: 22px; align-self: flex-start; }
.tg-seg-wrap span { padding: 0 14px; }

/* Dish toggles: pill checkboxes. */
.tg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tg-chip { position: relative; cursor: pointer; }
.tg-chip input { position: absolute; opacity: 0; pointer-events: none; }
.tg-chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid #ddd5c8; background: #fffdf9; font-size: 14px; font-weight: 500; color: #9a8570; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.tg-chip span::before { content: '+'; font-weight: 700; }
.tg-chip input:checked + span { background: #fbf3df; border-color: #ffb900; color: #2e2018; }
.tg-chip input:checked + span::before { content: '✓'; color: #8b5e3c; }
.tg-chip input:focus-visible + span { outline: 2px solid #8b5e3c; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .tg-chip span { transition: none; } }

/* Thaw / roast plan under the turkey size. */
.tg-plan { list-style: none; margin: 0; padding: 14px 18px; border-radius: 16px; background: #f7f1e8; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.5; color: #3b302b; }
.tg-plan strong { color: #2e2018; }

/* Shopping table: a small heading row per group; the amount column may wrap. */
.tg-table tr.tg-group th { padding-top: 18px; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #8b5e3c; }
.tg-table tbody tr.tg-group:first-child th { padding-top: 6px; }
.tg-table td:nth-child(2) { color: #7a6a5c; white-space: nowrap; }

/* Print: only the result card, on a white page. */
@media print {
  body > div > :not(main),
  main > section:not(#calculator),
  #calculator > [aria-hidden],
  .tg-noprint,
  noscript,
  #cookie-banner {
    display: none !important;
  }
  body,
  body > div,
  #calculator {
    background: #fff !important;
  }
  #calculator { padding: 0 !important; }
  #calculator form { display: block !important; }
  .tg-result { box-shadow: none !important; padding: 0 !important; }
  .tg-plan { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .nk-table-wrap { overflow: visible; }
  .tg-table tr { break-inside: avoid; }
  .tg-result { gap: 12px !important; }
  .tg-result [data-out="weight"] { font-size: 40pt !important; }
  .tg-table { font-size: 10.5pt; }
  .tg-table th, .tg-table td { padding-top: 4px !important; padding-bottom: 4px !important; }
  .tg-table tr.tg-group th { padding-top: 10px !important; }
}
