/* Printquote detail pages: a two-column frame (main + side), the quote rows of the
   request page, and the Accept confirmation (works without JS, via CSS :has).
   The side column's width is the --detail-side custom property, so a modifier
   (for example .detail-frame--maker) can swap widths without restating the grid. */

/* ---------- frame: one column on phones (main first), two from 60rem ---------- */
.detail-frame { --detail-side: var(--w-aside); display: grid; gap: var(--s-6); }
.detail-main, .detail-side { min-width: 0; }
.detail-main > h2:first-child { margin-top: 0; }
.detail-side { padding-top: var(--s-5); border-top: var(--hairline) solid var(--rule); }
@media (min-width: 60rem) {
  .detail-frame { grid-template-columns: minmax(0, 1fr) var(--detail-side); gap: var(--s-7); align-items: start; }
  .detail-side { padding: 0 0 0 var(--s-5); border-top: 0; border-left: var(--hairline) solid var(--rule); }
}

/* side facts: small muted labels over their values, nothing collapsed */
.side-facts { margin: 0; }
.side-facts dt { color: var(--muted); font-size: var(--step--1); font-weight: 400; }
.side-facts dd + dt { margin-top: var(--s-4); }
.side-facts dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.side-facts .files { margin: var(--s-1) 0 0; }

.contact { margin-top: var(--s-5); }

/* ---------- quote rows: price | who | go ---------- */
.quote-caption { color: var(--muted); font-size: var(--step--1); margin-bottom: var(--s-3); }
.quote-list { list-style: none; padding: 0; margin: 0 0 var(--s-5); font-variant-numeric: tabular-nums; }
.quote-item {
  display: grid; grid-template-columns: var(--w-price) minmax(0, 1fr) auto; column-gap: var(--s-5);
  align-items: baseline; padding: var(--s-4) 0; border-top: var(--hairline) solid var(--rule);
}
.quote-item:last-child { border-bottom: var(--hairline) solid var(--rule); }
/* one shared price column across all rows where subgrid exists, so prices line up */
@supports (grid-template-columns: subgrid) {
  .quote-list { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; column-gap: var(--s-5); }
  .quote-item { grid-column: 1 / -1; grid-template-columns: subgrid; }
}
.qi-price { margin: 0; text-align: right; }
.qi-who { min-width: 0; overflow-wrap: anywhere; }
.qi-maker { margin: 0; font-weight: 600; }
.qi-meta { margin: var(--s-1) 0 0; color: var(--muted); font-size: var(--step--1); }
.qi-frag { white-space: nowrap; }
.qi-pickup-note { white-space: normal; overflow-wrap: anywhere; }
.qi-note { margin: var(--s-2) 0 0; max-width: var(--measure); overflow-wrap: anywhere; }
.qi-go { justify-self: end; }

/* ---------- accept: a confirmation step that works without JS ---------- */
.confirm { text-align: left; }
.confirm > summary { list-style: none; }
.confirm > summary::-webkit-details-marker { display: none; }
.confirm[open] > summary { background: var(--ground); color: var(--ink); border-color: var(--rule-strong); }
.confirm[open] > summary:hover { background: var(--surface); }
.confirm-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-5);
  padding: var(--s-4); border: 2px solid var(--ink); border-radius: var(--radius); background: var(--ground);
}
.confirm-box p { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.confirm-box .note { flex: 1 1 var(--w-field); }
.confirm-box form { margin: 0 0 0 auto; }
/* the box spans the whole row, in flow under the quote whose Accept is open */
.quote-item .confirm-box { grid-column: 1 / -1; margin-top: var(--s-3); display: none; }
.quote-item:has(details[open]) .confirm-box { display: flex; }
@supports not selector(:has(*)) { .quote-item .confirm-box { display: flex; } }

/* ---------- phones: each quote becomes a stacked card, price first and largest ---------- */
@media (max-width: 47.99rem) {
  .quote-list, .quote-item { display: block; }
  .quote-item .qi-price { text-align: left; font-size: var(--step-3); }
  .qi-who { margin-top: var(--s-1); }
  .qi-go { margin-top: var(--s-3); justify-self: stretch; }
  .confirm > summary { width: 100%; }
  .confirm-box form, .confirm-box button { width: 100%; margin: 0; }
}

/* ---------- board detail (maker): facts wide on the left, the quote form on the right ---------- */
.detail-frame--maker { --detail-side: calc(var(--w-aside) + var(--s-7)); }
.detail-frame--maker .side-facts { max-width: var(--w-list); }
.detail-frame--maker .quote-title { margin-top: 0; }
.detail-frame--maker .form { max-width: none; }
