/* Parity 5 (2026-10-16) — the quote template chooser (finding
   #15, Billdr's "Choose a template to start your quote").
   Renders inside the project Quotes tab's form slot, where the
   old inline new-quote form stood. Gold discipline as everywhere
   in the money layer: gold is the primary button only (the
   portal's .btn-primary); the selected card wears the navy ink
   ring, like the template cards it replaces. Every rule hangs
   off a .qc-* / .quote-chooser class; tokens are quotes.css's
   --q-* set. */

.quote-chooser { background: var(--q-card); border: 1px solid var(--q-line); border-radius: var(--q-r); padding: 18px; margin: 0 0 16px; }
.quote-chooser > p.muted { font-size: var(--q-fs-sm); margin: 0 0 14px; }

.qc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 6px; }
.qc-head h3 { font-size: var(--q-fs-lg); font-weight: 600; margin: 0; color: var(--q-ink); }

.qc-layout { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: start; }
@media (max-width: 760px) { .qc-layout { grid-template-columns: 1fr; } }

.qc-nav { display: grid; gap: 6px; }
.qc-nav-btn { text-align: left; padding: 9px 12px; border: 1px solid transparent; border-radius: var(--q-r-sm); background: none; font: inherit; font-size: var(--q-fs-sm); font-weight: 500; color: var(--q-muted); cursor: pointer; }
.qc-nav-btn:hover { color: var(--q-ink); background: var(--q-tint); }
.qc-nav-btn.active { color: var(--q-ink); background: var(--q-tint); border-color: var(--q-line); }

.qc-doors { display: grid; gap: 6px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--q-hair); }
.qc-door { text-align: left; padding: 9px 12px; border: 1px dashed var(--q-line-strong); border-radius: var(--q-r-sm); background: none; font: inherit; font-size: var(--q-fs-sm); font-weight: 500; color: var(--q-ink); cursor: pointer; }
.qc-door:hover { border-color: var(--q-ink); }
.qc-door.sel { border-style: solid; border-color: var(--q-ink); box-shadow: 0 0 0 1px var(--q-ink); }

.qc-note { font-size: var(--q-fs-xs); margin: 12px 2px 0; }

.qc-main { min-width: 0; }
.qc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }

/* wave488: picture-card titles in the chooser read in full — the
 * shared .dw4-pc-title clamps at two lines, which clips exactly the
 * long template names the owner must tell apart ("…with Load-Bearing
 * Wall Removal"). Chooser scope only; products / to-dos / samples
 * keep the shared clamp. */
body.skin-billdr #app .quote-chooser .dw4-pc-title { display: block; -webkit-line-clamp: unset; -webkit-box-orient: initial; overflow: visible; }

.qc-card { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 14px; text-align: left; background: var(--q-card); border: 1px solid var(--q-line); border-radius: var(--q-r); font: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.qc-card:hover { border-color: var(--q-line-strong); }
.qc-card.sel { border-color: var(--q-ink); box-shadow: 0 0 0 1px var(--q-ink); }
.qc-card:focus-visible { box-shadow: 0 0 0 1px var(--q-ink), var(--q-focus); outline: none; }

.qc-cover { width: 64px; height: 64px; border-radius: var(--q-r-sm); background: var(--q-bg); border: 1px solid var(--q-hair); display: grid; place-items: center; font-size: var(--q-fs-xl); font-weight: 600; color: var(--q-faint); }
.qc-card-body { display: grid; gap: 3px; min-width: 0; }
.qc-card-name { font-size: var(--q-fs-md); font-weight: 600; color: var(--q-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qc-card-desc { font-size: var(--q-fs-xs); color: var(--q-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qc-card-meta { font-size: var(--q-fs-xs); color: var(--q-muted); }

.qc-pill { position: absolute; top: 10px; right: 12px; font-size: var(--q-fs-xs); font-weight: 600; color: var(--q-ink); background: var(--q-tint); border: 1px solid var(--q-line); border-radius: 999px; padding: 2px 8px; }

/* wave488: the bar carries a z-index — the shelf badges on the
 * picture cards (.rk-tpl-pcbadge, z-index 2 in templates-shelf.css)
 * otherwise paint OVER this sticky bar as the grid scrolls beneath
 * it, landing on the title field and the kind pick. */
.qc-bar { position: sticky; bottom: 0; z-index: 6; display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin: 16px -18px -18px; padding: 14px 18px; background: var(--q-card); border-top: 1px solid var(--q-line); border-radius: 0 0 var(--q-r) var(--q-r); box-shadow: 0 -8px 18px -14px rgba(15, 34, 51, .35); }
.qc-title { flex: 1 1 260px; margin: 0; }
.qc-pick-label { flex: 1 1 200px; font-size: var(--q-fs-sm); padding-bottom: 9px; }
.qc-bar .error { flex: 1 1 100%; margin: 0; }
.qc-bar .btn-primary { white-space: nowrap; }

/* wave291-blankquote (F5, 2026-10-30): the sticky action bar runs
 * the full width of the chooser at the viewport bottom, where the
 * floating Messages dock (.chat-dock — fixed, bottom right,
 * z-index 90) sat on its Confirm & create quote button. Two-part
 * clearance, in the chooser's own sheet: while a chooser is on
 * the page the dock lifts clear of the bar (the chat.css
 * body:has lift pattern), and the bar keeps a right-hand lane
 * free — wider than the dock pill — so the button is never
 * under the pill at any width, wrapped bar included. */
body:has(.quote-chooser) .chat-dock { bottom: 132px; }
.qc-bar { padding-right: 200px; }
@media (max-width: 760px) {
  body:has(.quote-chooser) .chat-dock { bottom: 168px; }
  .qc-bar { padding-right: 184px; }
}
