/* Shared consultation presentation. Load after the existing portal/workspace CSS. */
.chat-thread{--chat-ink:#263d33;--chat-muted:#637067;--chat-line:#e4e6dd;--chat-green:#24533f;--chat-cream:#fff8e9;border:1px solid var(--chat-line);background:#fffefa;color:var(--chat-ink);box-shadow:0 8px 30px #263d3306}
.chat-thread .chat-company-header{overflow:hidden;border:1px solid #e5e7dc;border-radius:20px;background:linear-gradient(115deg,#f0f5eb,#fff8e9);margin:0 0 22px}
.chat-company-cover{height:156px;overflow:hidden;background:#eef1e7}
.chat-company-cover-image{display:block;width:100%;height:100%;object-fit:cover;object-position:center 42%}
.chat-company-identity{display:flex;align-items:center;gap:16px;padding:22px}
.has-company-photo .chat-company-identity{position:relative;padding-top:16px}
.chat-company-logo{display:grid;place-items:center;position:relative;flex:0 0 72px;width:72px;height:72px;overflow:hidden;border:4px solid #fff;border-radius:20px;background:#fff;color:#566843;box-shadow:0 3px 14px #263d3312;font-size:26px;font-weight:700}
.has-company-photo .chat-company-logo{align-self:flex-start;margin-top:-38px}
.chat-company-logo-image{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;background:white;padding:5px}
.chat-company-copy{min-width:0}
.chat-company-eyebrow{color:#84603b;font-size:12px;font-weight:700;letter-spacing:.08em;margin:0 0 4px!important}
.chat-company-copy h3{font-size:clamp(19px,2.4vw,25px);line-height:1.45;margin:0 0 7px!important;overflow-wrap:anywhere}
.chat-company-meta{font-size:13px!important;line-height:1.7;color:var(--chat-muted,#637067);margin:0!important}
.chat-thread .chat-next-step{display:grid;grid-template-columns:1fr auto;gap:5px 18px;align-items:center;padding:18px 20px;border:1px solid #dfe8d8;border-left:4px solid #6a8760;border-radius:16px;background:#f1f6ec;box-shadow:none}
.chat-next-step strong{font-size:12px;letter-spacing:.08em;color:#3e6249;grid-column:1}
.chat-next-step p{grid-column:1;line-height:1.7;margin:0!important}
.chat-next-step button{grid-column:2;grid-row:1/3;margin:0!important}
.chat-thread .chat-conversation{list-style:none;display:flex;flex-direction:column;gap:22px;background:linear-gradient(180deg,#f3f5ef,#f8f7ef);border:1px solid #e7e9df;border-radius:20px;padding:24px 20px;margin:24px 0;scrollbar-color:#c3cebf transparent;overscroll-behavior:contain}
.chat-thread .chat-row{display:grid;grid-template-columns:36px minmax(0,1fr);column-gap:10px;row-gap:4px;width:min(88%,680px);margin:0;align-items:start}
.chat-thread .chat-row.chat-own{align-self:flex-end;grid-template-columns:minmax(0,1fr) 36px}
.chat-thread .chat-author{grid-column:2;grid-row:1;display:block;max-width:100%;font-size:12px;color:#61705f;margin:0 0 2px;line-height:1.5}
.chat-thread .chat-bubble{grid-column:2;grid-row:2;display:block;background:white;border:1px solid #e2e6d9;border-radius:3px 17px 17px;padding:13px 16px;margin:0;max-width:100%;width:fit-content;line-height:1.85;white-space:pre-wrap;color:#263d33;box-shadow:0 2px 5px #263d3304;overflow-wrap:anywhere}
.chat-thread .chat-own .chat-author{grid-column:1;justify-self:end}
.chat-thread .chat-own .chat-bubble{grid-column:1;justify-self:end;border-radius:17px 3px 17px 17px;background:#e6eedc;border-color:#dbe5d0}
.chat-avatar{grid-column:1;grid-row:1/3;display:grid;place-items:center;position:relative;overflow:hidden;width:36px;height:36px;border-radius:50%;border:2px solid white;box-shadow:0 1px 6px #263d3310;background:#e6eddb;color:#4a6245;font-size:13px;font-weight:700;line-height:1}
.chat-avatar-customer{background:#fff0d6;color:#906b30}
.chat-thread .chat-own .chat-avatar{grid-column:2}
.chat-avatar-image{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:white}
.chat-thread .chat-time{grid-column:2;grid-row:3;display:block;color:#7d877a;font-size:11px;margin-top:2px}
.chat-thread .chat-own .chat-time{grid-column:1;justify-self:end}
.chat-thread .chat-bubble a{color:#476645;text-decoration-thickness:1px;overflow-wrap:anywhere}
.chat-thread .chat-photo{display:block;max-width:min(100%,360px);max-height:300px;object-fit:contain;border-radius:12px;margin:8px 0;background:#fff}
.chat-thread .chat-compose{padding:17px 18px 2px;border:1px solid #e5e7dc;border-radius:18px;background:#fff;font-size:15px;font-weight:650}
.chat-thread .chat-compose textarea{margin-top:9px;border-color:#d5ded0;background:#fffefa;line-height:1.8;min-height:105px}
.chat-thread .chat-tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:10px 0 16px}
.chat-thread .chat-tools label{width:100%;font-weight:500;font-size:13px;color:#65715f}
.chat-thread .mail-status,.chat-thread .draft-status{font-size:12px;line-height:1.7;color:#7a8272}
.chat-thread .chat-secondary{border-color:#e6e7df;background:#fffefa}
.chat-thread .chat-secondary summary{font-size:14px;color:#64735d}
.chat-thread .quote-panel{border:1px solid #e8dec8;border-radius:20px;background:#fff9ec;padding:22px;margin:18px 0;box-shadow:none}
.quote-panel .quote-preview{border:1px solid #e3e6d9;border-radius:17px;background:#fff;padding:20px}
.quote-panel dt{font-size:12px;color:#6b7466;font-weight:650;margin-top:16px}
.quote-panel dd{margin:4px 0 0;line-height:1.8}
.quote-panel .quote-history{padding:18px;background:#fbfcf7;border:1px solid #e3e6d9;border-radius:14px;margin:12px 0}
.quote-panel input[type=file]{border:1px dashed #bfcbb5;background:#fafcf5;padding:14px;border-radius:12px}
.quote-panel input[type=file]::file-selector-button{border:1px solid #bdcdb3;background:white;color:#3c5d41;border-radius:8px;padding:8px 12px;margin-right:12px;font:inherit;cursor:pointer}
/* Auxiliary controls are quiet by default; the next action is explicitly marked. */
.chat-thread button,.quote-panel button{background:white;color:#3c5944;border:1px solid #c8d4bf;border-radius:11px;box-shadow:none;font-weight:600;min-height:44px;line-height:1.5;padding:10px 16px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.chat-thread button:hover,.quote-panel button:hover{background:#f2f6eb;border-color:#a6b99a}
.chat-thread .quote-action-primary,.quote-panel .quote-action-primary,.chat-next-step .quote-action-primary{background:#24533f;color:#fff;border:1px solid #24533f;border-radius:12px;padding:12px 22px;box-shadow:0 3px 8px #24533f16;font-weight:700}
.chat-thread .quote-action-primary:hover,.quote-panel .quote-action-primary:hover{background:#173f2e;border-color:#173f2e}
.chat-thread .quote-action-secondary,.quote-panel .quote-action-secondary{background:white;color:#496146;border:1px solid #c8d4bf;border-radius:11px;box-shadow:none}
.chat-thread .quote-action-danger,.quote-panel .quote-action-danger{background:transparent;color:#9b5145;border:1px solid #e3c5be;border-radius:9px;box-shadow:none;font-size:12px;padding:7px 11px;min-height:40px}
.chat-thread .quote-action-danger:hover,.quote-panel .quote-action-danger:hover{background:#fff2ee;border-color:#cf9d92}
.chat-thread button:focus-visible,.quote-panel button:focus-visible,.quote-panel summary:focus-visible{outline:3px solid #d99636;outline-offset:3px}
.chat-thread button:disabled,.quote-panel button:disabled{opacity:.55;box-shadow:none;cursor:not-allowed}
.quote-panel .quote-note{background:#f2f6ec;border-left:3px solid #7a9666;padding:12px 14px;color:#496146;font-size:13px;border-radius:0 9px 9px 0}
.quote-panel .quote-document-card{padding:14px 16px;border:1px solid #e1e5d7;background:#fcfdf8;border-radius:13px;margin:16px 0;overflow-wrap:anywhere}
@media(max-width:760px){
 .chat-company-cover{height:128px}.chat-company-identity{padding:18px;gap:12px}.chat-company-logo{width:60px;height:60px;flex-basis:60px;border-radius:16px;font-size:22px}.has-company-photo .chat-company-logo{margin-top:-32px}
 .chat-company-copy h3{font-size:19px}.chat-company-meta{font-size:12px!important}.chat-thread .chat-next-step{display:block;padding:16px}.chat-next-step p{margin:6px 0 12px!important}.chat-next-step button{width:100%}
 .chat-thread .chat-conversation{padding:18px 12px;gap:18px}.chat-thread .chat-row{width:96%;grid-template-columns:30px minmax(0,1fr);column-gap:7px}.chat-thread .chat-row.chat-own{grid-template-columns:minmax(0,1fr) 30px}.chat-avatar{width:30px;height:30px;font-size:11px}.chat-thread .chat-bubble{padding:11px 13px;font-size:15px}.chat-thread .quote-panel{padding:16px}.quote-panel .quote-preview{padding:16px}.chat-thread .chat-compose{padding:14px 13px 2px}
 .chat-thread .chat-tools{display:grid;grid-template-columns:1fr 1fr}.chat-thread .chat-tools label{grid-column:1/-1}.chat-thread .chat-tools button{margin:0}.quote-panel .quote-action-primary{width:100%;margin:6px 0}.quote-panel input[type=file]{font-size:13px}
}
@media(prefers-reduced-motion:reduce){.chat-thread *,.quote-panel *{scroll-behavior:auto}}
