/* public/rec.css — ON-SITE RECORDINGS (v3.1193.0, 17 October 2026). public/rec.js draws it.
   Darren: "The customers are the ones who want the transcription and the summary of all the things that they have to do
   when we leave." The staff window opens near full screen (the premium standard, docs/QUALITY-STANDARD.md): transcript and
   player on the left, the customer's summary on the right, each scrolling on its own, Save and Send always at the foot.
   Under 900px the two halves stack, summary first (it is the point). Theme tokens only — no typed colours. */

/* ---- the board panel and lists ---- */
.rec-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--sp-4);flex-wrap:wrap}
.rec-head h2{margin:0 0 4px}
.rec-head .lead{margin:0}
.rec-tabs{margin:0}
.rec-panel .table-wrap,.rec-panel .empty-state,.rec-panel .skel{margin-top:var(--sp-4)}
.rec-table td{vertical-align:middle}
.rec-row{cursor:pointer}
.rec-row:focus-visible{outline:none;box-shadow:inset var(--s-focus)}
.rec-go{width:1%;white-space:nowrap;text-align:right}
.rec-badge{display:inline-flex;align-items:center;gap:6px}
.rec-badge svg,.rec-cico svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* ---- the states (loading is the house skeleton; empty is the house empty-state) ---- */
.rec-state{border:1px solid var(--line);border-radius:var(--rad);background:var(--panel-2);padding:var(--sp-5);margin:var(--sp-4) 0 0}
.rec-state>b{display:block;font-size:var(--fs-lg);color:var(--ink);margin-bottom:6px}
.rec-state p{margin:6px 0;color:var(--ink-2)}
.rec-state.rec-bad{border-color:var(--s-bad);background:var(--s-bad-soft)}
.rec-right>.rec-state{margin-top:0}
.rec-state-acts{display:flex;align-items:center;gap:var(--sp-3);flex-wrap:wrap;margin-top:var(--sp-3)}
.rec-bar{height:8px;border-radius:var(--rad-pill);background:var(--s-sunk);overflow:hidden;margin:var(--sp-3) 0}
.rec-bar>i{display:block;height:100%;background:var(--blue);border-radius:inherit;transition:none}
.save-status.bad{color:var(--s-bad)}

/* ---- the window: near full screen ---- */
.sheet-ov:has(> .sheet-card.rec-ws){padding:16px}
.sheet-card.rec-ws{max-width:none;width:min(calc(100vw - 32px),1600px);height:calc(100vh - 32px);display:flex;flex-direction:column;padding:14px 20px 0;box-sizing:border-box}
.sheet-card.rec-ws>.sheet-head{flex:0 0 auto;gap:var(--sp-3)}
.sheet-card.rec-ws>.sheet-body{flex:1 1 auto;min-height:0;margin-top:8px;overflow:hidden}
.rec-win{display:flex;flex-direction:column;height:100%;min-height:0}
.rec-grid{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(420px,46%);gap:var(--sp-5)}
.rec-left,.rec-right{min-height:0;overflow:auto;overscroll-behavior:contain;padding:2px 6px 16px 2px}
.rec-left{display:flex;flex-direction:column;gap:var(--sp-3)}
.rec-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--sp-3);padding:var(--sp-4);border:1px solid var(--line);border-radius:var(--rad);background:var(--panel-2)}
.rec-meta-i{display:grid;gap:2px;min-width:0;align-content:start}
.rec-meta-w{grid-column:span 2}
.rec-meta-i>span{font-size:var(--fs-xs);font-weight:600;color:var(--muted);text-transform:none}
.rec-meta-i>b{font-weight:600;color:var(--ink);overflow-wrap:anywhere}
.rec-audio{width:100%;min-height:40px}
.rec-noaudio{margin:0}
.rec-th{margin:var(--sp-2) 0 0;font-size:var(--fs-md)}
.rec-tx{border:1px solid var(--line);border-radius:var(--rad);background:var(--panel);padding:var(--sp-2) var(--sp-3)}
.rec-lines{list-style:none;margin:0;padding:0}
.rec-line{display:grid;grid-template-columns:64px minmax(0,1fr);gap:var(--sp-3);padding:10px 0;border-bottom:1px solid var(--s-line-2)}
.rec-line:last-child{border-bottom:0}
.rec-t{font:inherit;font-size:var(--fs-xs);font-variant-numeric:tabular-nums;color:var(--blue-ink);background:var(--s-accent-soft);border:0;border-radius:var(--rad-pill);padding:3px 8px;height:fit-content;cursor:pointer;justify-self:start}
.rec-t:hover{background:var(--b-100)}
.rec-t:focus-visible{outline:none;box-shadow:var(--s-focus)}
.rec-lbody{display:grid;gap:3px;min-width:0}
.rec-spk{font-size:var(--fs-xs);font-weight:700;letter-spacing:.01em}
.rec-spk0{color:var(--muted)}
.rec-spk1{color:var(--blue-ink)}
.rec-spk2{color:var(--orange-ink)}
.rec-spk3{color:var(--s-ok)}
.rec-spk4{color:var(--ink-2)}
.rec-words{line-height:1.55;color:var(--ink)}
.rec-plain{white-space:pre-wrap;font:inherit;margin:0}
.rec-nolabels{margin:var(--sp-2) 0}

/* the summary editor */
.rec-sum{display:flex;flex-direction:column;gap:var(--sp-4)}
.rec-ainote{margin:0;padding:10px 12px;border-radius:var(--rad-in);background:var(--s-accent-soft);color:var(--ink-2);font-size:var(--fs-sm)}
.rec-sent{padding:10px 12px;border-radius:var(--rad-in);background:var(--s-ok-soft);color:var(--ink);font-size:var(--fs-sm)}
.rec-sent b{color:var(--s-ok)}
.rec-sec{border:1px solid var(--line);border-radius:var(--rad);background:var(--panel);padding:var(--sp-4)}
.rec-sec>h4{margin:0 0 var(--sp-3);font-size:var(--fs-md);color:var(--ink)}
.rec-sec .fld textarea,.rec-act .fld input,.rec-act .fld select{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:var(--rad-in);font:inherit;background:var(--panel);color:var(--ink);box-sizing:border-box}
.rec-sec .fld textarea{resize:vertical;min-height:84px;line-height:1.5}
.rec-acts{display:flex;flex-direction:column;gap:var(--sp-3)}
.rec-act{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:var(--sp-2) var(--sp-3);align-items:end;padding-bottom:var(--sp-3);border-bottom:1px solid var(--s-line-2)}
.rec-act .fld{min-width:0}
.rec-act-text{grid-column:1/-1}
.rec-act-x{margin-bottom:4px}
.rec-act-done{grid-column:1/-1;margin-top:-6px}
.rec-none{margin:0}
.rec-add{align-self:flex-start}
.rec-to{margin:0}
.rec-to .fld input{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:var(--rad-in);font:inherit;background:var(--panel);color:var(--ink);box-sizing:border-box}
.rec-foot{flex:0 0 auto;display:flex;align-items:center;justify-content:flex-end;gap:var(--sp-3);flex-wrap:wrap;padding:12px 0 14px;border-top:1px solid var(--line);background:var(--panel)}
.rec-foot .save-status{margin:0 auto 0 0}

/* ---- the customer's visit summaries ---- */
.rec-cico{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;flex:none;background:var(--s-accent-soft);color:var(--blue-ink)}
.rec-cico svg{width:22px;height:22px}
.rec-cards{display:grid;gap:var(--sp-4);margin-top:var(--sp-4)}
.rec-card{border:1px solid var(--line);border-radius:var(--rad);background:var(--panel);padding:var(--sp-5);box-shadow:var(--sh-1)}
.rec-card.rec-flash{box-shadow:var(--s-focus)}
.rec-card-h{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--sp-3);flex-wrap:wrap;margin-bottom:var(--sp-2)}
.rec-card-h h3{margin:0 0 2px;font-size:var(--fs-lg)}
.rec-card-h .hint{margin:0}
.rec-csec{padding:var(--sp-3) 0;border-top:1px solid var(--s-line-2)}
.rec-csec h4{margin:0 0 var(--sp-2);font-size:var(--fs-md)}
.rec-csec p{margin:0;line-height:1.55}
.rec-todo{background:var(--s-accent-soft);border:0;border-radius:var(--rad-in);padding:var(--sp-4);margin:var(--sp-2) 0}
.rec-checks{list-style:none;margin:0;padding:0;display:grid;gap:var(--sp-2)}
.rec-check{display:grid;grid-template-columns:18px minmax(0,1fr) auto;align-items:start;gap:4px 10px;padding:8px 10px;border-radius:var(--rad-sm);background:var(--panel);cursor:pointer}
.rec-check input{margin-top:3px;width:18px;height:18px;accent-color:var(--blue);flex:none}
.rec-check-t{min-width:0;line-height:1.45}
.rec-check.is-done .rec-check-t{text-decoration:line-through;color:var(--muted)}
.rec-due{font-size:var(--fs-xs);font-weight:600;color:var(--orange-ink);background:var(--s-warn-soft);border-radius:var(--rad-pill);padding:2px 8px;white-space:nowrap}
.rec-ours{margin:0;padding-left:18px;display:grid;gap:6px}
.rec-ours li span{margin-right:8px}
.rec-cfoot{margin:var(--sp-3) 0 0}

/* ---- v3.1194.0 (17 October 2026): the PCA Meeting Summary editor and the customer's card ----
   Darren, 18 Oct 2026: "See this attached project zip that was specifically designed to create summaries from Zoom
   transcripts." Meeting details · Executive summary · Chapters · Decisions made · Action items · Open questions. */
.rec-act{grid-template-columns:28px minmax(0,1fr) minmax(0,1fr) auto}
.rec-act-owner{grid-column:2}.rec-act-who{grid-column:3/-1}.rec-act-due{grid-column:2}.rec-act-pri{grid-column:3}
.rec-act-n{grid-row:1/span 3;align-self:start;margin-top:30px;width:24px;height:24px;border-radius:var(--rad-pill);display:grid;place-items:center;font-size:var(--fs-xs);font-weight:700;background:var(--s-accent-soft);color:var(--blue-ink)}
.rec-act-text{grid-column:2/-1}
.rec-act-x{align-self:end;grid-column:4}
.rec-act-done{grid-column:2/-1}
.rec-sec>h4 .hint{font-weight:500;font-size:var(--fs-sm)}
.rec-sec-h{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-3);margin:0 0 var(--sp-2)}
.rec-sec-h h4{margin:0;font-size:var(--fs-md)}
.rec-sec .fld input[type=text],.rec-sec .fld select{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:var(--rad-in);font:inherit;background:var(--panel);color:var(--ink);box-sizing:border-box}
.rec-sec .fld + .fld{margin-top:var(--sp-3)}
.rec-dgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--sp-3);margin-top:var(--sp-3)}
.rec-dgrid .fld + .fld{margin-top:0}
.rec-span2{grid-column:1/-1}
.rec-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--sp-3);margin:0;padding:var(--sp-3);border-radius:var(--rad-in);background:var(--panel-2)}
.rec-facts div{min-width:0}
.rec-facts dt{font-size:var(--fs-xs);font-weight:600;color:var(--muted)}
.rec-facts dd{margin:2px 0 0;font-weight:600;color:var(--ink);overflow-wrap:anywhere}
.rec-ask{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-4);flex-wrap:wrap;padding:var(--sp-4);border-radius:var(--rad);border:1px solid var(--blue);background:var(--s-accent-soft)}
.rec-ask b{color:var(--ink)}
.rec-ask p{margin:4px 0 0}
.rec-ask-b{display:flex;gap:var(--sp-2)}
.rec-chaps{display:grid;gap:var(--sp-3)}
.rec-chap{border:1px solid var(--s-line-2);border-radius:var(--rad-in);padding:var(--sp-3);background:var(--panel-2)}
.rec-chap-h{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--sp-2)}
.rec-chap-n{font-size:var(--fs-xs);font-weight:700;letter-spacing:.02em;color:var(--blue-ink)}
.rec-sec .rec-add{margin-top:var(--sp-3)}
.rec-qa{border-color:var(--orange);background:var(--panel)}
.rec-qa-note{margin:0 0 var(--sp-3)}
.rec-qs{list-style:none;margin:0;padding:0;display:grid;gap:var(--sp-3)}
.rec-q{border-left:3px solid var(--s-ok);padding:4px 0 4px var(--sp-3)}
.rec-q.is-bad{border-left-color:var(--s-bad)}
.rec-q-h{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--sp-2)}
.rec-q-h b{font-weight:600;color:var(--ink)}
.rec-q blockquote{margin:6px 0;color:var(--ink-2);font-style:italic;line-height:1.5}
.rec-q .hint{margin:0;display:flex;align-items:center;gap:8px}
.rec-qa-i{margin-top:var(--sp-3);padding-top:var(--sp-3);border-top:1px solid var(--s-line-2)}
.rec-qa-i ul{margin:6px 0 0;padding-left:18px;display:grid;gap:4px}
.rec-qa-i p{margin:6px 0 0}
.rec-card-acts{display:flex;align-items:center;gap:var(--sp-2);flex-wrap:wrap}
.rec-cchaps{display:grid;gap:var(--sp-3)}
.rec-cchap h5{display:flex;align-items:center;gap:8px;margin:0 0 4px;font-size:var(--fs-md);color:var(--ink)}
.rec-cn{width:22px;height:22px;flex:none;border-radius:var(--rad-pill);display:grid;place-items:center;font-size:var(--fs-xs);font-weight:700;background:var(--s-accent-soft);color:var(--blue-ink)}
.rec-cframe{margin:0 0 6px !important;color:var(--ink-2);font-style:italic}
.rec-owner{display:inline-block;margin-left:8px;font-size:var(--fs-xs);font-weight:600;color:var(--muted)}
.rec-due.rec-tbc{color:var(--muted);background:var(--s-sunk)}

@media (max-width:900px){
  .rec-grid{grid-template-columns:minmax(0,1fr);overflow:auto;display:flex;flex-direction:column}
  .rec-left,.rec-right{overflow:visible;padding-right:0;flex:0 0 auto;min-height:auto}
  .rec-right{order:-1}
}
@media (max-width:640px){
  .sheet-ov:has(> .sheet-card.rec-ws){padding:0}
  .sheet-card.rec-ws{width:100vw;height:100vh;border-radius:0;padding:10px 14px 0}
  .rec-foot{justify-content:stretch}
  .rec-foot .btn{flex:1 1 auto}
  .rec-foot .save-status{flex-basis:100%}
  .rec-card{padding:var(--sp-4)}
  .rec-cico{display:none}
  .rec-check{grid-template-columns:18px minmax(0,1fr)}
  .rec-check .rec-due{grid-column:2;justify-self:start}
  .rec-grid{gap:var(--sp-3)}
  /* the lists become one card per recording on a phone — nothing scrolls sideways */
  .rec-table,.rec-table tbody,.rec-table tr,.rec-table td{display:block;width:auto}
  .rec-table thead{display:none}
  .rec-table tr.rec-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px var(--sp-3);padding:12px 14px;border-bottom:1px solid var(--s-line-2)}
  .rec-table tr.rec-row td{padding:0;border:0;background:none}
  .rec-table tr.rec-row td:first-child{grid-column:1}
  .rec-table tr.rec-row td.rec-go{grid-column:2;grid-row:1 / span 2;align-self:center}
  .rec-table tr.rec-row td:not(:first-child):not(.rec-go){grid-column:1}
  .rec-meta{grid-template-columns:repeat(2,minmax(0,1fr))}
  .rec-act{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .rec-act-n{display:none}
  .rec-act-text,.rec-act-done{grid-column:1/-1}
  .rec-act-owner,.rec-act-who,.rec-act-due,.rec-act-pri{grid-column:auto}
  .rec-act-x{grid-column:1/-1;justify-self:start}
  .rec-dgrid,.rec-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
  .rec-ask-b{width:100%}
  .rec-ask-b .btn{flex:1 1 0}
}
.rec-to.fldgrid{align-items:start}
.rec-dgrid{align-items:end}
.rec-card-acts .btn,.rec-foot a.btn{display:inline-flex;align-items:center;justify-content:center}

/* ---- v3.1197.0 (19 October 2026) — RECORDINGS WHERE PEOPLE LOOK FOR THEM -----------------------------------------------
   Darren: "There's nothing that says visit recordings anywhere on the booking or the inquiry." The Recordings section
   (rec.js sectionHtml) on a booking's own window (Office → Bookings) and on the customer's record: one row per recording,
   the whole row opens it. The recording window's Customer / Booking / Enquiry tiles are buttons back to those records.
   The booking's window itself is styled in styles.css (.bkg-detail, v3.1197.0 numbers); its section is these. Theme tokens only. Wraps at phone width. */
.recsec-h{display:flex;align-items:center;gap:var(--sp-2);margin:0 0 var(--sp-2)}
.recsec-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.recsec-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 10px;border-radius:var(--r);
  background:var(--panel);border:1px solid var(--line);cursor:pointer}
.recsec-row:hover,.recsec-row:focus-visible{border-color:var(--blue);outline:none}
.recsec-row:focus-visible{box-shadow:var(--s-focus)}
.recsec-ico svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;
  vertical-align:middle;color:var(--blue-ink,var(--blue))}
.recsec-main{display:flex;flex-direction:column;flex:1 1 200px;min-width:0}
.recsec-main .hint{overflow-wrap:anywhere}
.recsec-go{margin-left:auto}
.recsec-none{margin:0}
.enq-vrec-via{font-weight:600}
button.rec-meta-go{font:inherit;text-align:left;background:none;border:0;padding:0;margin:0;cursor:pointer;color:inherit;border-radius:var(--r)}
button.rec-meta-go>b{color:var(--blue-ink,var(--blue));text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}
button.rec-meta-go:hover>b{text-decoration-thickness:2px}
button.rec-meta-go:focus-visible{outline:none;box-shadow:var(--s-focus)}
.recsec-n{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;
  font-size:var(--fs-xs);font-weight:700;background:var(--panel-2);border:1px solid var(--line);color:var(--muted)}
.recsec-go{align-self:center}
.dir-recs .recsec-h{font-size:var(--fs-md,1rem)}
/* ---- v3.1197.0 (19 October 2026) — a held summary: amber edge, the transcript beside it, one press ---- */
.rec-state.rec-held{border-color:var(--s-warn);background:var(--s-warn-soft)}
.rec-held-why{font-style:italic}
.rec-held-note{margin-top:var(--sp-3)}
