/* goldstraw.app Christmas amounts: the turkey size calculator's choices, its
   answer and the table of every size, and the buffet list's three sizes. Loads after guides-v1.css and
   guide-tools-v1.css, which stay as released: browsers and Cloudflare keep a
   stylesheet by its name for hours, so new looks get a file of their own. */

/* The choices appear once the page's script can use them; without it the
   answer for six and the table below still say everything. */
.turkey-picker { display: grid; gap: 16px; margin-top: 12px; }
.turkey-picker[hidden] { display: none; }
.turkey-picker .guide-picker { margin-top: 0; }
.turkey-choice { min-width: 0; margin: 0; padding: 0; border: 0; }
.turkey-choice legend { margin-bottom: 8px; padding: 0; color: var(--customer-green-deep); font-weight: 700; }
.turkey-options { display: flex; flex-wrap: wrap; gap: 10px; }
.turkey-option { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px 0 14px; border: 2px solid color-mix(in srgb, var(--customer-muted) 55%, transparent); border-radius: 12px; background: var(--customer-card); color: var(--customer-ink); font-weight: 600; line-height: 1.3; cursor: pointer; }
.turkey-option input { width: 20px; height: 20px; margin: 0; accent-color: var(--customer-green); cursor: pointer; }
.turkey-option:has(input:checked) { border-color: var(--customer-green); background: var(--customer-soft-green); color: var(--customer-green-deep); }
.turkey-option:has(input:focus-visible) { outline: 3px solid var(--customer-green-deep); outline-offset: 2px; }
.turkey-leftovers { justify-self: start; }
/* The buffet list's 8, 12 or 20: one row of three on a phone, fewer to a row with large text. */
.buffet-sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(4.5rem, 1fr)); gap: 10px; }
.buffet-sizes .turkey-option { justify-content: center; padding: 0 12px; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }

/* The answer: the size in big type, then the one line that says what to ask for. */
.guide .guide-list .turkey-answer { margin-top: 20px; padding: 18px 20px 20px; border-radius: 14px; background: var(--site-panel); }
.guide .turkey-answer .turkey-figure { margin: 0; color: var(--customer-green-deep); font-size: clamp(2.25rem, 1.8rem + 2vw, 3rem); font-weight: 700; line-height: 1.05; letter-spacing: -.02em; }
.turkey-figure .turkey-pounds { color: var(--customer-ink); font-size: 1.25rem; font-weight: 600; letter-spacing: 0; white-space: nowrap; }
.guide .turkey-answer .turkey-line { margin-top: 10px; color: var(--customer-ink); font-weight: 600; }
.guide .guide-list .turkey-list-heading { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--site-line); }

/* Every size from 2 to 20: a real table. On a small phone with large text
   it scrolls inside its own frame, never the page. The box round the frame
   measures the room the table has (see "column names" below). */
.guide > .size-table-box { max-width: 40rem; container: size-table / inline-size; }
.guide .size-table-wrap { max-width: 40rem; overflow-x: auto; border: 1px solid var(--site-line); border-radius: 14px; background: var(--customer-card); }
.size-table-wrap:focus-visible { outline: 3px solid var(--customer-green-deep); outline-offset: 2px; }
.size-table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.35; font-variant-numeric: tabular-nums; }
.size-table th, .size-table td { padding: 10px 8px; border-bottom: 1px solid var(--site-line); text-align: left; vertical-align: top; }
.size-table tr > :first-child { padding-left: 14px; }
.size-table tr > :last-child { padding-right: 14px; }
.size-table thead th { color: var(--customer-green-deep); font-weight: 700; vertical-align: bottom; }
.size-table tbody th { color: var(--customer-green-deep); font-weight: 700; }
.size-table tbody tr:last-child > * { border-bottom: 0; }
.size-table td { font-weight: 600; }
.size-table .lb { display: block; color: var(--customer-muted); font-weight: 400; }
/* On a phone all five columns fit without scrolling, down to 320px wide:
   tighter cell padding, and below 380px the frame runs to the screen's edges.
   (Measured 11 Nov 2026: at the old padding the last column was cut at 390.) */
@media (max-width: 479.98px) {
  .size-table th, .size-table td { padding: 9px 4px; }
  .size-table tr > :first-child { padding-left: 10px; }
  .size-table tr > :last-child { padding-right: 10px; }
}
@media (max-width: 379.98px) {
  .guide > .size-table-box { margin-inline: -20px; }
  .guide .size-table-wrap { border-inline: 0; border-radius: 0; }
  .size-table tr > :first-child { padding-left: 12px; }
  .size-table tr > :last-child { padding-right: 12px; }
}
/* From 360px up, a size stays on one line ("2 × 3.5kg", never "2 ×" then
   "3.5kg"), and so do the pounds under it ("2 × 7.5lb"): every cell is two
   lines, never three. (12 Nov 2026: the pounds read "7.5lb each" and wrapped
   in some cells and not others.) */
@media (min-width: 360px) {
  .size-table td { white-space: nowrap; }
}
/* Below 360px five columns can't fit at the Brand Book's 15px type floor
   (a one-line "2 × 6.5kg" in each of four needs a 341px table), so each
   number of people becomes a card of its own: "6 people", then the four
   sizes two by two (one by one with large text), each under its name. The table stays a table for screen
   readers; only its look changes. (12 Nov 2026.) */
@media (max-width: 359.98px) {
  .guide > .size-table-box { margin-inline: 0; }
  .guide .size-table-wrap { overflow-x: auto; border: 0; border-radius: 0; background: none; }
  .size-table, .size-table tbody { display: block; }
  .size-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  /* Two sizes to a row; with large text, one. */
  .size-table tbody tr { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr)); gap: 12px 14px; margin-bottom: 10px; padding: 12px 14px 14px; border: 1px solid var(--site-line); border-radius: 14px; background: var(--customer-card); }
  .size-table tbody tr:last-child { margin-bottom: 0; }
  .size-table tbody th, .size-table td, .size-table tr > :first-child, .size-table tr > :last-child { padding: 0; border: 0; white-space: nowrap; }
  .size-table tbody th { grid-column: 1 / -1; padding-bottom: 8px; border-bottom: 1px solid var(--site-line); font-size: 1.0625rem; }
  .size-table tbody th::after { content: " people"; }
  .size-table td::before { display: block; margin-bottom: 2px; color: var(--customer-muted); font-size: .9375rem; font-weight: 400; white-space: normal; }
  .size-table td:nth-of-type(1)::before { content: "Whole bird"; }
  .size-table td:nth-of-type(2)::before { content: "Crown"; }
  .size-table td:nth-of-type(3)::before { content: "Whole, with leftovers"; }
  .size-table td:nth-of-type(4)::before { content: "Crown, with leftovers"; }
}
@media (min-width: 640px) {
  .size-table th, .size-table td { padding: 11px 12px; }
}
/* The column names stay in view while the 19 rows pass under them, wherever
   the table is a table (360px and up) and has room: a solid heading row in
   the table's own colour, with a hairline under it. The frame then clips
   instead of scrolling, so the names stick to the screen, not to the frame.
   The table's narrowest width at 16px text is 344px with a phone's tight
   cells and 412px with the wider ones from 640px (measured 12 Nov 2026):
   21.5rem and 26rem. In rem, so with large text, where the table could be
   wider than the screen, this stays off and the frame scrolls sideways as
   before. (12 Nov 2026.) */
@media (min-width: 360px) and (max-width: 639.98px) {
  @container size-table (min-width: 21.5rem) {
    .guide .size-table-wrap { overflow: clip; }
    .size-table thead th { position: sticky; top: 0; border-bottom: 0; background: var(--customer-card); box-shadow: inset 0 -1px 0 var(--site-line); }
  }
}
@media (min-width: 640px) {
  @container size-table (min-width: 26rem) {
    .guide .size-table-wrap { overflow: clip; }
    .size-table thead th { position: sticky; top: 0; border-bottom: 0; background: var(--customer-card); box-shadow: inset 0 -1px 0 var(--site-line); }
  }
}

@media print {
  .turkey-picker { display: none; }
  .guide .guide-list .turkey-answer { padding: 0; background: none; }
  .guide .turkey-answer .turkey-figure, .turkey-figure .turkey-pounds { color: #000; }
}
