/* Conversation-first lead workspace. Deliberately scoped; no platform theme changes. */
.lead-conversation-workspace {
  --lc-ink:#111b21;--lc-muted:#52616b;--lc-line:#dce2e5;--lc-green:#00745f;
  --lc-paper:#fff;--lc-chat:#efeae2;--lead-ink:#111b21;--lead-muted:#52616b;
  --lead-border:#dce2e5;--lead-surface:#fff;--lead-accent:#00745f;
  color:var(--lc-ink);
}
.lead-conversation-workspace .lead-shell{max-width:1500px;padding:16px 22px 28px;gap:12px}
.lead-conversation-workspace .lead-breadcrumb{margin:0;font-size:12px;line-height:1.5}
.lead-conversation-workspace .lc-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;align-items:start;gap:16px}
.lead-conversation-workspace .lc-conversation{min-width:0;border:1px solid var(--lc-line);border-radius:10px;overflow:hidden;background:var(--lc-paper);box-shadow:0 2px 8px #111b2105}
.lead-conversation-workspace .lc-contact{padding:15px 20px 12px;background:#fff;border-bottom:1px solid var(--lc-line)}
.lead-conversation-workspace .lc-contact-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.lead-conversation-workspace .lc-contact h1{font-size:20px;line-height:1.3;letter-spacing:-.02em;margin:0;font-weight:700;overflow-wrap:anywhere}
.lead-conversation-workspace .lc-contact h2{font-size:16px;margin:0;line-height:1.35}
.lead-conversation-workspace .lead-customer-label{display:none}
.lead-conversation-workspace .lead-customer-badges{gap:6px}
.lead-conversation-workspace .lead-pill{padding:3px 7px;font-size:11px;border-radius:5px}
.lead-conversation-workspace .lc-contact-facts{display:flex;align-items:baseline;flex-wrap:wrap;gap:5px 18px;margin-top:8px;font-size:13px;line-height:1.5;color:var(--lc-muted)}
.lead-conversation-workspace .lc-contact-facts a{color:#006b58;text-decoration:none}
.lead-conversation-workspace .lc-contact-facts a:hover{text-decoration:underline}
.lead-conversation-workspace .lc-contact-facts strong{color:var(--lc-ink);font-weight:550}
.lead-conversation-workspace .lc-contact .lead-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 18px;margin-top:8px}
.lead-conversation-workspace .lc-contact .lead-field{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px}
.lead-conversation-workspace .lc-contact .lead-field strong{font-size:13px;font-weight:500}
.lead-conversation-workspace .lc-contact .lead-info-sections,.lead-conversation-workspace .lc-contact .lead-info-section{gap:7px}
.lead-conversation-workspace .lc-contact .lead-info-section+.lead-info-section{border:0;padding:0}
.lead-conversation-workspace .lc-contact .lead-customer-footer{margin-top:9px;padding-top:0;border:0;gap:8px;align-items:center}
.lead-conversation-workspace .lc-contact .lead-contact-actions{margin:0;padding:0;border:0;gap:6px}
.lead-conversation-workspace .lc-contact .btn{min-height:32px;padding:5px 10px;font-size:12px}
.lead-conversation-workspace .lc-response-strip{display:flex;align-items:center;flex-wrap:wrap;gap:6px 18px;background:#f7f9fa;border-bottom:1px solid var(--lc-line);padding:9px 20px;font-size:12px;line-height:1.55;color:var(--lc-muted)}
.lead-conversation-workspace .lc-response-item{display:flex;align-items:baseline;gap:5px;flex-wrap:wrap}
.lead-conversation-workspace .lc-response-item strong{font-weight:650;color:var(--lc-ink);font-variant-numeric:tabular-nums}
.lead-conversation-workspace .lc-response-item.is-urgent{color:#8d321c}
.lead-conversation-workspace .lc-response-item.is-urgent strong{color:#8d321c}
.lead-conversation-workspace .lc-response-item.is-urgent::before{content:'';width:6px;height:6px;border-radius:50%;background:#b64324;align-self:center}
.lead-conversation-workspace .lc-chat{background:var(--lc-chat);min-width:0;color:var(--lc-ink)}
.lead-conversation-workspace .lc-chat #waThread{display:flex;flex-direction:column;min-width:0}
.lead-conversation-workspace .lc-chat [hidden]{display:none!important}
.lead-conversation-workspace .lc-chat .wa-contact{display:none}
.lead-conversation-workspace .lc-chat .wa-messages{display:flex;flex-direction:column;align-items:flex-start;gap:8px;height:clamp(220px,calc(100dvh - 410px),600px);min-height:220px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:22px 30px;background:#efeae2;background-image:radial-gradient(#d7d1c680 .65px,transparent .65px);background-size:22px 22px;scroll-behavior:auto}
.lead-conversation-workspace .lc-chat .wa-bubble{position:relative;align-self:flex-start;max-width:min(82%,620px);margin:0;background:#fff;color:#111b21;border:0;border-radius:0 8px 8px 8px;padding:8px 10px 5px;box-shadow:0 1px 1px #0b141a21;font-size:14px;line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}
.lead-conversation-workspace .lc-chat .wa-bubble.out{align-self:flex-end;background:#d9fdd3;border-radius:8px 0 8px 8px}
.lead-conversation-workspace .lc-chat .wa-bubble::before{content:'';position:absolute;left:-7px;top:0;border-top:8px solid #fff;border-left:8px solid transparent}
.lead-conversation-workspace .lc-chat .wa-bubble.out::before{left:auto;right:-7px;border-left:0;border-right:8px solid transparent;border-top-color:#d9fdd3}
.lead-conversation-workspace .lc-chat .wa-bubble small{display:block;color:#52616b;font-size:11px;line-height:1.4;text-align:right;margin:3px 0 0;white-space:normal}
.lead-conversation-workspace .lc-chat .wa-bubble.failed,.lead-conversation-workspace .lc-chat .wa-bubble.unknown{outline:2px solid #a64716;outline-offset:-1px}
.lead-conversation-workspace .lc-chat .wa-day{align-self:center;background:#fff9;box-shadow:0 1px 2px #111b210d;padding:4px 10px;border-radius:6px;color:#52616b;font-size:11px;margin:6px 0;white-space:normal}
.lead-conversation-workspace .lc-chat #waOlder{display:block;margin:10px auto 0;border:1px solid #cdd6d4;border-radius:16px;background:#fff;padding:6px 12px;color:#006b58;font-size:12px;cursor:pointer}
.lead-conversation-workspace .lc-chat #waComposer{margin:0;background:#f0f2f5;border-top:1px solid #d1d7db;padding:10px 16px 12px;color:#111b21}
.lead-conversation-workspace .lc-chat .wa-compose-row{display:flex;align-items:flex-end;gap:10px}
.lead-conversation-workspace .lc-chat #waDraft{flex:1;width:100%;min-width:0;min-height:44px;max-height:160px;margin:0;padding:10px 14px;border:1px solid #c5cdd2;border-radius:10px;background:#fff;color:#111b21;font:inherit;font-size:14px;line-height:1.5;resize:vertical;caret-color:#00745f}
.lead-conversation-workspace .lc-chat #waDraft::placeholder{color:#667781;opacity:1}
.lead-conversation-workspace .lc-chat #waSend{flex:0 0 auto;min-width:70px;min-height:44px;border:0;border-radius:22px;padding:10px 15px;background:#00745f;color:#fff;font:inherit;font-size:13px;font-weight:650;cursor:pointer;box-shadow:none}
.lead-conversation-workspace .lc-chat #waSend:hover:not(:disabled){background:#005f4e}
.lead-conversation-workspace .lc-chat #waSend:disabled{background:#63776f;color:#fff;opacity:1;cursor:not-allowed}
.lead-conversation-workspace .lc-chat #waComposer label{display:block;font-size:11px;color:#52616b;margin:0 0 5px;font-weight:550}
.lead-conversation-workspace .lc-chat #waWindow{font-size:11px;line-height:1.5;color:#52616b;margin:0 0 6px}
.lead-conversation-workspace .lc-chat #waComposer small{display:block;font-size:11px;line-height:1.5;color:#52616b;margin-top:6px}
.lead-conversation-workspace .lc-chat .wa-empty{padding:48px 24px;text-align:center;min-height:280px;display:flex;flex-direction:column;justify-content:center;align-items:center;color:#52616b;background:#efeae2}
.lead-conversation-workspace .lc-chat .wa-empty h2{font-size:18px;margin:0 0 8px;color:#111b21}
.lead-conversation-workspace .lc-chat .wa-empty p{font-size:13px;line-height:1.6;margin:0;max-width:420px}
.lead-conversation-workspace .wa-error{margin:0;padding:10px 16px;background:#fff0eb;color:#8d321c;font-size:12px;border:0;border-bottom:1px solid #e9c3b6}
.lead-conversation-workspace .lc-sidebar{min-width:0;display:grid;gap:12px;align-content:start}
.lead-conversation-workspace .lc-sidebar .lead-card{padding:16px;border-radius:10px;box-shadow:none}
.lead-conversation-workspace .lc-sidebar h2{font-size:15px;margin:0 0 12px}
.lead-conversation-workspace .lc-sidebar h3{font-size:13px}
.lead-conversation-workspace .lc-sidebar .lead-form{gap:7px}
.lead-conversation-workspace .lc-sidebar .lead-form .input{min-height:36px;padding:7px 9px;font-size:13px;line-height:1.5;border-radius:6px}
.lead-conversation-workspace .lc-sidebar .lead-form textarea.input{min-height:82px}
.lead-conversation-workspace .lc-sidebar .btn{min-height:36px;padding:7px 10px;font-size:12px;border-radius:6px}
.lead-conversation-workspace .lc-sidebar .lead-manage-divider{margin:14px 0}
.lead-conversation-workspace .lc-disclosure{min-width:0;background:#fff;border:1px solid var(--lc-line);border-radius:8px;padding:0 14px}
.lead-conversation-workspace .lc-disclosure>summary{cursor:pointer;color:#3b4a54;font-size:13px;font-weight:650;line-height:1.5;padding:12px 0}
.lead-conversation-workspace .lc-disclosure[open]>summary{border-bottom:1px solid #e9edef;margin-bottom:12px}
.lead-conversation-workspace .lc-disclosure[open]{padding-bottom:14px}
.lead-conversation-workspace .lc-disclosure .lead-card-head{margin-bottom:10px}
.lead-conversation-workspace .lc-disclosure .lead-composer-tabs{padding:3px;gap:2px}
.lead-conversation-workspace .lc-disclosure .lead-composer-tabs button{font-size:12px;padding:7px;min-height:34px}
.lead-conversation-workspace .lc-disclosure .lead-composer-panel{padding:12px 0 0}
.lead-conversation-workspace .lc-disclosure .lead-fields{grid-template-columns:1fr;gap:10px}
.lead-conversation-workspace .lc-disclosure .lead-info-sections{gap:10px}
.lead-conversation-workspace .lc-disclosure .lead-field strong{font-size:12px;font-weight:500}
.lead-conversation-workspace .lc-history .lead-event{padding:0 0 14px 15px;margin-left:3px}
.lead-conversation-workspace .lc-history .lead-event-top{justify-content:flex-start;gap:2px 7px;font-size:11px}
.lead-conversation-workspace .lc-history .lead-event-top strong{font-size:12px}
.lead-conversation-workspace .lc-history .lead-event p{font-size:12px;line-height:1.5;margin:4px 0 0}
.lead-conversation-workspace :is(a,button,input,textarea,select,summary):focus-visible{outline:3px solid #146da8;outline-offset:3px}
@media(min-width:1600px){.lead-conversation-workspace .lc-layout{grid-template-columns:minmax(0,1fr) 310px}}
@media(max-width:1100px){.lead-conversation-workspace .lead-shell{padding:14px 16px 24px}.lead-conversation-workspace .lc-layout{grid-template-columns:minmax(0,1fr) 250px;gap:12px}.lead-conversation-workspace .lc-contact{padding:13px 16px}.lead-conversation-workspace .lc-chat .wa-messages{padding:20px}}
@media(max-width:850px){.lead-conversation-workspace .lc-layout{grid-template-columns:minmax(0,1fr)}.lead-conversation-workspace .lc-sidebar{grid-template-columns:repeat(2,minmax(0,1fr))}.lead-conversation-workspace .lc-sidebar>*{align-self:start}.lead-conversation-workspace .lc-chat .wa-messages{height:clamp(350px,54vh,580px)}}
@media(max-width:520px){.lead-conversation-workspace .lead-shell{padding:10px 10px 22px;gap:9px}.lead-conversation-workspace .lc-contact{padding:12px 14px}.lead-conversation-workspace .lc-contact h1{font-size:18px}.lead-conversation-workspace .lc-contact .lead-fields{grid-template-columns:1fr;gap:5px}.lead-conversation-workspace .lc-response-strip{padding:8px 14px;gap:3px 12px}.lead-conversation-workspace .lc-contact-facts{gap:4px 12px;font-size:12px}.lead-conversation-workspace .lc-chat .wa-messages{padding:18px 16px;min-height:300px;height:50vh}.lead-conversation-workspace .lc-chat .wa-bubble{max-width:90%}.lead-conversation-workspace .lc-chat #waComposer{padding:9px 10px 11px}.lead-conversation-workspace .lc-chat #waSend{min-width:60px;padding:10px}.lead-conversation-workspace .lc-sidebar{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){.lead-conversation-workspace *{scroll-behavior:auto!important}}

.lead-conversation-workspace .lc-fact-label{color:#52616b;font-size:11px;margin-right:4px}
.lead-conversation-workspace .lc-chat .wa-system-event{align-self:center;max-width:96%;padding:5px 10px;border-radius:6px;background:#ffffffb8;color:#46565f;font-size:11px;line-height:1.45;text-align:center;overflow-wrap:anywhere}
.lead-conversation-workspace .wa-system-event>div,.lead-conversation-workspace .wa-system-event>small{display:inline;font-size:11px}
.lead-conversation-workspace .wa-system-event>small::before{content:' · ';white-space:pre}
.lead-conversation-workspace .wa-thread-empty,.lead-conversation-workspace .lc-no-conversation{padding:18px;color:#52616b;font-size:13px;line-height:1.5}
.lead-conversation-workspace #leadTimeline{padding:18px 22px;min-height:300px}
.lead-conversation-workspace .wa-error{margin:0;padding:10px 16px;background:#fff1e9;color:#8b361a;border-bottom:1px solid #e5b79d;font-size:13px}
.lead-conversation-workspace .lc-current-note{font-size:12px;line-height:1.5;white-space:pre-wrap;color:#46565f}
