/* delivery status and media in the thread (live data the prototype had no styles for) */
.w-ack{margin-left:6px;font-size:.75rem;color:var(--muted);letter-spacing:-.08em}
.w-ack.read{color:var(--act,#5b3fa0)}
.w-media{display:block;margin:4px 0;max-width:min(320px,100%)}
.w-media img{display:block;max-width:100%;border-radius:10px;border:1px solid var(--line)}
/* a photo on its way, or one that did not come (loop 5, L5-B-008): a place the size of a small photo, in words */
.w-pic.ld,.w-pic.bad{position:relative;display:flex;align-items:center;justify-content:center;width:min(220px,100%);min-height:120px;padding:12px;box-sizing:border-box;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--muted);font-size:.8125rem;text-align:center;text-decoration:none}
.w-pic.ld img,.w-pic.bad img{position:absolute;left:0;top:0;width:1px;height:1px;opacity:0;border:0}
.w-pic.ld::after{content:"Loading the " attr(data-what) "…"}
.w-pic.bad::after{content:"The " attr(data-what) " did not load. Open it to try again."}
/* A-041: a fixed width, so a voice note under a short name line is not a 110 px player */
audio.w-media{width:320px;max-width:100%}
video.w-media{width:min(320px,100%);border-radius:10px;border:1px solid var(--line);background:#000}
.w-deleted{font-style:italic}
a.w-media.lnk{display:inline-flex;align-items:center;gap:6px}
/* social loop 16 (decision 25): a file, story reply, shared post or reel is a link a buyer's chat is read through on a
   phone: a long file name (Messenger's "Acme_Dreams_..._v3.pdf") wraps inside the bubble instead of running off the
   screen, and on a phone the row is a 44px tap target, not a 20px line of text */
a.w-media.lnk{overflow-wrap:anywhere;min-width:0}
a.w-media.lnk>svg,a.w-media.lnk>.small{flex:none;white-space:nowrap}
@media (max-width:760px){a.w-media.lnk{min-height:44px}}
.w-msg.st .w-media,.w-msg.ai .w-media{margin-left:auto}
/* failed sends: one quiet, expandable row per turn instead of a red label on every bubble */
.w-fail{align-self:center;max-width:min(520px,92%);margin:4px auto;font-size:.8125rem;color:var(--muted)}
.w-fail-h{display:flex;align-items:center;gap:6px;background:none;border:1px dashed var(--line);border-radius:999px;padding:3px 12px;color:inherit;font:inherit;cursor:pointer;max-width:100%}
.w-fail-h>span:first-child{text-align:left;overflow-wrap:anywhere}
.w-sfail{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin-top:4px;padding:6px 10px;border-radius:8px;background:var(--bad-bg);color:var(--bad);font-size:.8125rem}
.w-was{margin-top:4px;padding:4px 10px;border-left:2px solid var(--line);max-width:100%;overflow-wrap:anywhere}
.w-sfail>span{flex:1 1 200px;overflow-wrap:anywhere}
.w-sfail .w-tech{flex-basis:100%;color:var(--muted)}
/* the reason is a whole sentence ("The buyer's 24-hour window has closed: send an approved template"): it wraps, never
   cut off; on a phone the row is a rounded box, not a pill */
@media (max-width:560px){.w-fail{max-width:100%}.w-fail-h{border-radius:12px;padding:6px 12px;min-height:40px;width:100%;justify-content:space-between}}
.w-ack.w-wait{display:block;margin:2px 0 0;letter-spacing:0;white-space:normal;overflow-wrap:anywhere}
.w-fail-h[aria-expanded="true"] .w-chev{transform:rotate(180deg)}
.w-fail-b{display:grid;gap:6px;margin-top:6px;padding:8px 12px;border-left:2px solid var(--line)}
.w-fail-m>div{color:var(--ink,inherit);white-space:pre-wrap}
/* a file message's words ("Photo: tower elevation") as the caption under its media */
.w-media-cap{margin-top:4px;overflow-wrap:anywhere}
/* v4 v4-ai-reads: the AI's reading under a buyer's file or link, told apart from the buyer's own caption */
.w-read{font-style:italic;border-left:2px solid var(--ai);padding-left:6px}
/* round 6: quoted replies and the source chip */
.w-quote{display:flex;flex-direction:column;gap:2px;border-left:3px solid var(--line,#ccd);padding:4px 8px;margin:2px 0 4px;max-width:100%}
.w-quote-t{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.w-quote-pic{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:8px;align-items:center}
.w-quote-img{grid-row:1/3;width:44px;height:44px;object-fit:cover;border-radius:4px}
.w-quoting{display:flex;align-items:center;gap:8px;border-left:3px solid var(--st,#2a6);padding:4px 8px;margin:0 0 6px;min-width:0}
.w-quoting .w-quote-t{flex:1}
.w-qbtn{margin-left:6px}
/* round H8: someone else has taken the chat over (D10); the line a message came on and the line a reply goes from (F1) */
.w-taken{display:flex;gap:6px;align-items:flex-start;margin:0 0 6px;padding:6px 10px;border-radius:8px;background:var(--warn-bg,#fff6e0);overflow-wrap:anywhere}
.w-line{margin-left:6px;color:var(--muted)}
.w-from{display:block;margin:0 0 4px;color:var(--muted);overflow-wrap:anywhere}
.w-nofile{color:var(--muted)}
#composer{resize:none;min-height:38px;max-height:calc(1.4em * 5 + 16px);font:inherit;line-height:1.4;overflow-y:auto;field-sizing:content}
/* the composer became a textarea; work.css styles ".w-compose input" only, so the global control border drew a hard
   box inside the composer bar (click round, 17 Nov): the bar is the field, as it was for the input */
.w-compose textarea#composer{flex:1;min-width:0;border:0;background:transparent;color:var(--ink);font-size:14px;outline:none;box-shadow:none;padding:8px 4px}
/* a phone: Reply/Note, the tools and Send left the reply box 8 px wide at 320 px and 74 at 390 (wa-official loop 5):
   the box takes its own row above them */
@media (max-width:480px){.w-compose{flex-wrap:wrap}.w-compose textarea#composer{flex:1 1 100%;order:-1}}
.w-bubble{white-space:pre-wrap}
.w-from.w-warn{color:var(--warn)}
.w-ansq-box{display:inline-block;width:12px;height:12px;border:1.5px solid currentColor;border-radius:3px;flex:none}
/* A-020: with a composer on screen the toast ("Sent.", "Note added.") sat on the field and on the words under it
   ("Replace {project} before sending", the length limit) for three seconds after every send: it shows at the top */
body:has(.w-chat .w-foot) .toast{bottom:auto;top:calc(60px + env(safe-area-inset-top,0px))}
/* the status bars sit under the top bar too (shell brand.css): the notice goes under whichever of them shows */
body:has(.w-chat .w-foot):has(#offline-bar:not([hidden])) .toast{bottom:auto;top:calc(108px + env(safe-area-inset-top,0px))}
body:has(.w-chat .w-foot):has(#newer-bar:not([hidden])) .toast{bottom:auto;top:calc(156px + env(safe-area-inset-top,0px))}
/* bottom:auto: a toast with both a top and a bottom stretched over the thread on a phone (wa-official loop 2) */
.w-tpf{border:0;padding:0;margin:12px 0 0;min-width:0}.w-tpf legend{padding:0;margin-bottom:6px;font-weight:600}
/* A-032: on a phone the reply-only and unofficial-line words were hidden (the info button that was to show them is gone): they are one short sentence now, so they show */
@media (max-width:640px){.w-cwrap .w-replyonly .w-ro-more{display:inline}}
/* "1 new message": the thread kept its place while the person read higher up (live refresh, round B); it sits at
   the bottom of the thread's own scroll area, above the composer */
.w-newcue-w{position:sticky;bottom:12px;display:flex;justify-content:center;pointer-events:none;height:0;overflow:visible}
.w-newcue{pointer-events:auto;transform:translateY(-100%);display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:6px 14px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font:inherit;font-size:.8125rem;font-weight:600;box-shadow:0 2px 8px rgba(0,0,0,.12);cursor:pointer}
.w-newcue .w-down{display:inline-flex}
.w-newcue svg{width:14px;height:14px}
/* the voice note (inbox-voice.js): its bar takes the composer's place while recording and before it is sent */
.w-compose[hidden]{display:none}
.w-vbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 10px;border:1px solid var(--line);border-radius:12px;background:var(--surface,var(--bg))}
.w-vbar.rec{border-color:var(--bad)}
.w-vbar .w-vtext{flex:1;min-width:0}
.w-vdot{width:10px;height:10px;border-radius:50%;background:var(--bad);flex:none;animation:vpulse 1.2s ease-in-out infinite}
@keyframes vpulse{50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){.w-vdot{animation:none}}
.w-vplay{flex:1;min-width:180px;height:36px}
.w-vbar .btn svg{margin-right:4px;vertical-align:-3px}
.w-mic[aria-disabled="true"]{opacity:.45}
/* A-028: on a phone "Attach a file" was hidden (work.css), so a photo or a brochure could only be sent from Lead details, Files; the composer shows it */
@media (max-width:760px){.w-compose .w-ib.w-attach{display:inline-grid}}
.w-vars.w-vars-ok{color:var(--muted)}
/* round C (scale): a long chat draws its newest messages; older ones on request */
.w-earlier{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px 10px;margin:4px 0 12px}
/* the on-screen keyboard is up on a phone (the page is short and the composer has the focus): the tab bar steps aside
   so the composer and the newest messages keep the room (round C) */
/* loop 3 (L3-B-015): held by the open chat, not by the reply box's focus: a tap on Send (or "My reply answers", Note,
   Quote) took the focus from the box, the tab bar came back in that instant and pushed the chat up 58 px between the
   finger going down and up, so the tap landed on the tab bar's place and nothing was sent */
/* loop 5 (L5-B-020): a phone on its side with the keyboard up (150-200 px tall) in the rail layout: the column scrolls
   instead of squeezing the thread to nothing and pushing the reply box under the screen */
@media (min-width:761px) and (max-height:500px){.w-chat{overflow-y:auto}.w-chat>*{flex-shrink:0}.w-chat .w-msgs{flex:1 0 96px}}
@media (max-width:760px) and (max-height:520px){.app:has(#composer:focus) .tabbar,.app:has(.w-inbox.open #composer) .tabbar{display:none}}
/* long names (round C): the chat header's name is one line at every width (at 768 px it wrapped to three lines and was
   cut by the 56 px header); a message's sender line wraps between its parts, a long name ends in "…" */
.w-ch-who>*{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;min-width:0}
.w-msg-who{flex-wrap:wrap;row-gap:0;min-width:0}
.w-msg-who .who{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:min(60%,260px);min-width:0}
/* a line's name beside a message wraps (wa-official loop 5: a 60-character line name ran off a 320 px screen) */
.w-line{white-space:normal;overflow-wrap:anywhere;max-width:100%;min-width:0}
/* a tablet's chat column is narrow: the AI state chip goes, as on a phone (the Pause AI / Hand back button says it), so
   the buyer's name is readable in the header (round C: at 768 px it read "Buyer ...") */
@media (max-width:1024px){.w-ch-state .aistate{display:none}}
/* the state chip names who took the chat over: a long name ("With Margaret Wanjiru Njoroge-Kamau Ochieng · AI off")
   pushed the buyer's own name out of the header at 1440 (loop 8, L8-A-013); the chip ends in "…" (its title has it
   whole) and the name keeps room for itself */
@media (min-width:1025px){.w-chathead .w-ch-state{flex:0 1 auto;min-width:0}.w-chathead .w-ch-who{flex:1 1 140px;min-width:96px}
.w-chathead .w-ch-state>*{flex-shrink:0}
.w-chathead .w-ch-state .aistate{flex:0 1 auto;min-width:48px;max-width:240px;overflow:hidden;text-overflow:ellipsis;display:block;line-height:28px}
.w-chathead .w-ch-state .aistate i{display:inline-block;vertical-align:middle;margin:-2px 6px 0 0}}
/* phone: the open chat's name in the top bar is one line (round C: a long name took five lines of the bar) */
@media (max-width:760px){#title.w-has-sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;max-width:100%;display:block}}
/* loop 2, L2-A-008: a short name beside a long state ("With Salesperson A · AI off") was cut to "Luc…": the name keeps
   its room (up to 60% of the bar) and the state gives way, ending in "…" */
@media (max-width:760px){#title.w-has-sub{flex:0 0 auto;max-width:60%}
 #w-titlesub.w-titlesub{display:block;flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
 #w-titlesub.w-titlesub i{display:inline-block;vertical-align:middle;margin:0 5px 1px 0}}
.w-closed .w-kept{margin-top:4px;color:var(--ink-2)}

/* with the in-thread search open the notice sits under the search bar (inbox.js toastUnderSearch measures it) */
body.w-cs-on:has(#w-msgs):has(#w-csq) .toast{top:var(--w-toast-top,60px)}
#atshrink{align-self:flex-start;width:auto;margin-top:6px}#atshrink[hidden]{display:none}
/* loop 3 (L3-B-023): with many templates (the find box shows from 9) "Send template" sat after every one of them,
   4,300 px down the dialog at 390 and 1440: Cancel and Send stay in view at the bottom of the dialog */
form.modal[data-modalform="tpl"]>div:last-child{position:sticky;bottom:calc(-1*var(--s5));margin:0 calc(-1*var(--s5)) calc(-1*var(--s5));padding:var(--s3) var(--s5);background:var(--surface);border-top:1px solid var(--line);z-index:1}
@media (max-width:760px){form.modal[data-modalform="tpl"]>div:last-child{bottom:calc(-1*(var(--s4) + env(safe-area-inset-bottom,0px)));margin:0 calc(-1*var(--s4)) calc(-1*(var(--s4) + env(safe-area-inset-bottom,0px)));padding:var(--s3) var(--s4) calc(var(--s3) + env(safe-area-inset-bottom,0px))}}
/* a chat whose last reply did not reach the buyer: "Not sent" leads its row in the list */
.w-nsent{color:var(--bad);font-weight:600}
.w-rdraft{color:var(--staff);font-weight:600}
/* loop 4 (L4-B-008): with three-digit counts (a sales head's 305 chats) the tabs needed 284 px in a list 255 to 275 px wide
   (761 to 1400 px screens): "All 307", the tab most often chosen, was cut off with nothing showing more was there. The
   tabs sit closer, and a strip that still does not fit fades at the side with more, as on a phone */
@media (min-width:761px){
 .w-inbox .w-tabs{gap:12px}.w-inbox .w-tabs button{gap:4px}.w-inbox .w-tabs .w-tc{padding:0 5px}
 .w-inbox .w-tabs[data-edge="r"]{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent)}
 .w-inbox .w-tabs[data-edge="l"]{-webkit-mask-image:linear-gradient(90deg,transparent,#000 24px);mask-image:linear-gradient(90deg,transparent,#000 24px)}
 .w-inbox .w-tabs[data-edge="lr"]{-webkit-mask-image:linear-gradient(90deg,transparent,#000 24px,#000 calc(100% - 24px),transparent);mask-image:linear-gradient(90deg,transparent,#000 24px,#000 calc(100% - 24px),transparent)}
}
@media (min-width:761px) and (max-width:1024px){.w-inbox .w-tabs{gap:8px}.w-inbox .w-tabs .w-tc{padding:0 4px}}
/* loop 5 (L5-B-021): Windows contrast themes (forced colours) drop background colours, and with them the open chat's
   row, Reply or Note (which one is chosen), the chosen tab's line and the unread dot: each is drawn with an outline or
   a system colour instead */
@media (forced-colors:active){
 .w-row[aria-current="true"]{outline:2px solid CanvasText;outline-offset:-2px}
 .w-mode button[aria-pressed="true"]{outline:2px solid CanvasText;outline-offset:-2px;font-weight:700}
 .w-tabs button[aria-selected="true"]{text-decoration:underline 3px;text-underline-offset:6px}
 .w-dot.unread,.w-dot.needs{forced-color-adjust:none;background:CanvasText}
}
/* a place's "Open in Maps" is a line of its own: a place with a name and no address read "Location: OfficeOpen in Maps"
   (loop 8, L8-A-003) */
.w-filew>a.lnk{display:block;width:max-content;max-width:100%}
/* a quick reply with a long link or word ran past the dialog and hid its Remove button at 390 (loop 8, L8-A-021) */
.w-qr-list li>span{min-width:0;overflow-wrap:anywhere}.w-qr-list li>button{flex-shrink:0}
/* "Send a file", from the Library (18 Nov): the two ways side by side; the list scrolls in the dialog, a long title wraps */
.modal fieldset.w-tpf:has(input[name=atsrc]){display:flex;flex-wrap:wrap;gap:8px}.modal fieldset.w-tpf:has(input[name=atsrc]) legend{width:100%}
.modal fieldset.w-tpf:has(input[name=atsrc]) .w-check{flex:1 1 140px;min-height:44px;align-items:center}
.w-atlibl{display:grid;gap:6px;max-height:min(40vh,320px);overflow:auto;overscroll-behavior:contain}
.w-atlibl .w-check{min-height:44px;overflow-wrap:anywhere}.w-atlibl .w-check input{flex:none}
#atpc[hidden],#atlibw[hidden]{display:none}
/* the phone walk (livecrm round 8, 18 Nov 11:59 UTC; inbox rows L9-P01..P04): on a phone the reply box's text is 16 px
   (an iPhone zooms the page on every tap into a field under 16 px), every control a thumb presses in the chat, the list
   and the Lead details panel is 44 px, and the State filter has its own line instead of running off the screen's edge */
@media (max-width:760px){
 .w-compose textarea#composer{font-size:16px}
 .w-compose .w-ib,.w-ctx-top .w-ib{width:44px;height:44px}
 .w-compose .w-mode button{height:40px;padding:0 12px;font-size:14px}
 .w-compose .btn,#view .w-compose .btn.sm{height:44px;min-height:44px}
 /* "Why?" and "Quote" keep their place in the line; the area a thumb can press grows to 44 px around them */
 .w-msgs .lnk[data-why],.w-msgs .w-qbtn{padding:13px 8px;margin:-13px -8px;position:relative}
 .w-inbox .w-tabs button{min-height:44px;min-width:44px;box-sizing:border-box;justify-content:center}
 .w-ctabs button{min-height:44px;min-width:44px;box-sizing:border-box;justify-content:center}
 .w-inbox button.w-ansq,.w-inbox .w-ansq{min-height:44px;box-sizing:border-box}
 .w-inbox .w-held .btn,#view .w-inbox .w-held .btn.sm{min-height:44px;height:auto}
 .w-ctx .w-seg button{height:44px}
 .w-ctx .btn{min-height:44px}
}
@media (max-width:640px){
 .w-inbox .w-tabs{flex-wrap:wrap;row-gap:0}
 .w-inbox .w-tabs select.w-stf-ph{order:9;flex:0 0 180px;width:180px;max-width:180px;margin:0 calc(100% - 180px) 6px 0;height:44px!important;min-height:44px!important;font-size:16px!important;line-height:42px}
}
/* dayone (19 Nov): the AI tab while the AI is paused for everyone: greyed, says why */
.w-tabs button.w-tab-off{opacity:.55;cursor:default;text-decoration:none}
/* round 8 (22 Nov 2026): under each row of "Not leads", why it was set aside and the way back: the existing "more"
   line, read as part of the row above it (under its words, no rule between), with a full touch target on a phone */
.w-nlwhy{justify-content:space-between;border-top:0;padding:0 16px 8px 72px}
.w-nlwhy .small{min-width:0}
@media (max-width:760px){#view .w-nlwhy .btn.sm{min-height:44px}}
/* fix-1201 J9: a chat brought in from the sales phone: the thread's bubbles, muted, under one quiet heading */
.w-old{opacity:.72}
.w-old .w-bubble{background:var(--soft);border-color:var(--line)}
.w-old-h{display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center;font:500 12px var(--body);color:var(--muted);margin:8px auto 2px;max-width:min(560px,100%);padding:0 8px}
.w-old-r{font-size:11.5px;opacity:.9}
