.chat-launch{white-space:nowrap}.chat-dialog{width:min(1040px,95vw);max-width:1040px;padding:24px;border:0;border-radius:20px;height:min(760px,92dvh)}.chat-heading{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e4eae7;padding-bottom:14px}.chat-heading h2{margin:5px 0}.chat-layout{display:grid;grid-template-columns:290px minmax(0,1fr);height:calc(100% - 105px);min-height:250px}.chat-sidebar{overflow:auto;border-right:1px solid #e4eae7;padding:12px 12px 12px 0}.chat-thread-link{display:block;text-align:left;width:100%;border:0;background:white;padding:16px;border-radius:12px;cursor:pointer;margin-bottom:5px}.chat-thread-link.selected{background:#e8f6ef}.chat-thread-link strong,.chat-thread-link span,.chat-thread-link small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-thread-link span{font-size:13px;margin:6px 0;color:#39705a}.chat-thread-link small{color:#707c76}.chat-badge{display:inline!important;background:#087958;color:white;padding:2px 6px;border-radius:20px}.chat-thread{min-width:0;display:flex;flex-direction:column;padding:16px;overflow:auto}.chat-person{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #edf0ee}.chat-person p{font-size:13px;color:#64736a}.chat-text{border:0;background:none;color:#087958;cursor:pointer;padding:8px}.chat-messages{flex:1;min-height:130px;overflow:auto;padding:16px 4px;display:flex;flex-direction:column;gap:12px}.chat-bubble{align-self:flex-start;max-width:85%;padding:12px 16px;background:#f0f3f1;border-radius:14px;overflow-wrap:anywhere}.chat-bubble.mine{align-self:flex-end;background:#e0f3e9}.chat-bubble p{white-space:pre-wrap;margin:0 0 5px}.chat-bubble time{font-size:10px;color:#617468}.chat-compose{display:flex;gap:10px;padding-top:12px;border-top:1px solid #e4eae7}.chat-compose textarea{flex:1;min-width:0;resize:none;border:1px solid #d7e1db;border-radius:12px;padding:12px;font:inherit}.chat-tip{color:#718075;margin-top:10px;font-size:11px}.chat-empty{color:#718075;padding:20px;font-size:14px;line-height:1.6}.chat-report{padding:16px;border-bottom:1px solid #ddd}.chat-report-form textarea{width:100%}.chat-error{margin:5px 0}.chat-reports{margin-top:15px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@media(max-width:650px){.chat-dialog{padding:14px;width:98vw;height:94dvh}.chat-layout{grid-template-columns:1fr;grid-template-rows:120px minmax(0,1fr)}.chat-sidebar{border-right:0;border-bottom:1px solid #ddd;padding:6px;display:flex;overflow:auto}.chat-threads{display:flex;gap:4px}.chat-thread-link{width:190px;padding:9px}.chat-thread{padding:10px 0}.chat-person{font-size:13px}.chat-person p{max-width:190px}.chat-compose .button{padding:10px}.chat-launch{font-size:12px;padding:9px!important}.chat-bubble{max-width:92%}}

/* Inbox-first messaging on phones; two panes on larger screens. */
.chat-dialog[open]{display:flex;flex-direction:column;overflow:hidden}.chat-heading{flex-shrink:0;gap:12px}.chat-heading>div{flex:1;min-width:0}.chat-back{display:none}.chat-layout{height:auto;flex:1;min-height:0;grid-template-columns:320px minmax(0,1fr);grid-template-rows:minmax(0,1fr)}.chat-sidebar{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;padding:12px 10px 0 0}.chat-search{display:block;flex-shrink:0;margin-bottom:10px}.chat-search input{width:100%;min-width:0;min-height:42px;border:1px solid #dce6df;border-radius:12px;padding:10px 12px;background:#f5f8f6;font:inherit;font-size:13px}.chat-threads{display:block;overflow-y:auto;overflow-x:hidden;min-height:0;flex:1}.chat-thread-link{display:flex;align-items:center;gap:10px;min-width:0;width:100%;padding:13px 10px;margin:0;border-radius:12px;border-bottom:1px solid #edf2ef}.chat-thread-link:hover{background:#f1f7f3}.chat-thread-link:focus-visible{outline:2px solid #087958;outline-offset:-2px}.chat-thread-link .chat-thread-avatar{display:grid;place-items:center;flex-shrink:0;width:42px;height:42px;border-radius:50%;background:#e2f1e8;color:#087958;font-size:17px;font-weight:750;white-space:normal}.chat-thread-link .chat-thread-preview{flex:1;display:block;min-width:0;overflow:hidden}.chat-thread-link .chat-thread-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0}.chat-thread-top strong{font-size:13px;flex:1;min-width:0;color:#243b30}.chat-thread-top time{font-size:10px;color:#7b8e82;flex-shrink:0}.chat-thread-link .chat-thread-listing{font-size:11px;color:#39705a;margin:4px 0}.chat-thread-link .chat-thread-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0}.chat-thread-bottom small{min-width:0;font-size:12px;line-height:1.5}.chat-thread-link.has-unread .chat-thread-bottom small{font-weight:650;color:#294e3a}.chat-thread-bottom .chat-badge{display:grid!important;place-items:center;flex-shrink:0;min-width:20px;height:20px;padding:1px 5px;font-size:10px;margin:0;background:#087958;color:white}.chat-thread{min-height:0;overflow:hidden}.chat-person{flex-shrink:0;min-width:0;flex-wrap:wrap;padding-bottom:10px}.chat-person>div{min-width:0}.chat-person strong,.chat-person p{overflow-wrap:anywhere}.chat-person p{margin:5px 0 0}.chat-messages{min-height:0}.chat-compose,.chat-tip{flex-shrink:0}.chat-reports{flex-shrink:0;font-size:12px;min-height:40px}.chat-error{flex-shrink:0}@media(max-width:650px){.chat-dialog{position:fixed;inset:0;margin:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;padding:14px 14px calc(10px + env(safe-area-inset-bottom));box-sizing:border-box}.chat-heading{padding:calc(4px + env(safe-area-inset-top)) 0 12px}.chat-heading h2{font-size:21px;margin:3px 0}.chat-layout{display:block;min-height:0;overflow:hidden}.chat-sidebar{display:flex;width:100%;height:100%;padding:12px 0 0;border:0}.chat-search input{font-size:16px;min-height:44px}.chat-threads{display:block;width:100%;overflow-y:auto;overflow-x:hidden}.chat-thread-link{width:100%;padding:14px 8px;gap:11px}.chat-thread-link .chat-thread-avatar{width:46px;height:46px}.chat-thread-top strong{font-size:14px}.chat-thread-link .chat-thread-listing{font-size:12px}.chat-thread-bottom small{font-size:13px}.chat-thread-top time{font-size:11px}.chat-thread{display:none;height:100%;padding:12px 0 0}.chat-thread-open .chat-sidebar{display:none}.chat-thread-open .chat-thread{display:flex}.chat-thread-open .chat-back{display:grid;place-items:center;width:40px;height:40px;flex-shrink:0;border:1px solid #dce7df;border-radius:12px;background:#edf6f0;color:#087958;font-size:23px;cursor:pointer}.chat-person{gap:5px}.chat-person>div:last-child{display:flex;gap:4px}.chat-person p{max-width:none;font-size:12px}.chat-text{font-size:12px}.chat-compose textarea{font-size:16px;padding:10px}.chat-bubble{font-size:14px}.chat-tip{font-size:10px;line-height:1.5}.chat-report-form{overflow:auto;flex-shrink:0;max-height:45%}}

.chat-thread:has(.chat-report){overflow-y:auto}.chat-back:focus-visible{outline:2px solid #087958;outline-offset:2px}
