/* Dispatch SMS viewer, in the portal's look: same colours, side menu, bottom menu, search row and bottom bar as every other
   page (/static/portal-chrome.css, /static/switcher.css, /static/portal-nav.js). Only the SMS-specific parts are here. */
:root{color-scheme:dark;font-family:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI",Roboto,sans-serif;color:#f4f3ef;background:#181818;font-size:14px;--target-size:32px}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;min-block-size:100dvh;background:#181818;color:#f4f3ef;overflow-wrap:anywhere}
/* The page height already accounts for the bottom menu and the bottom bar, so no extra body padding. */
body.has-bn,body.has-sw{padding-bottom:0!important}
a{color:#8ab4ff}
.sr{position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;margin:0;padding:0}
.portal-main{block-size:calc(100dvh - var(--bn-h,0px) - var(--sw-h,0px));min-block-size:0}
.status{padding:10px 16px;display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;background:#1f1f1f;border-bottom:1px solid #2c2c2c;color:#b8b6ae;font-size:12px}
.status strong{color:#f4f3ef;font-weight:650}
.status .counts{margin-left:auto;font-size:12px}
.status span{color:#f4f3ef;font-weight:700}
.pill{border:1px solid #3a3a3a;border-radius:999px;padding:3px 9px;font-size:11px;color:#b8b6ae;background:#242424;font-weight:600}
.status .pill{color:#b8b6ae;font-weight:600}
main{flex:1;min-block-size:0;display:grid;grid-template-columns:330px minmax(0,1fr)}
.inbox{border-right:1px solid #2c2c2c;display:flex;flex-direction:column;min-block-size:0;min-inline-size:0;background:#181818}
.inbox .mobile-workspace-tools small{display:block;margin-top:10px;font-size:11px;line-height:1.5;color:#918f88}
select,input,button{color:#f4f3ef;font:inherit}
button{cursor:pointer}
button:disabled{cursor:wait;opacity:.7}
:where(a,select,input,button,[tabindex]):focus-visible{outline:2px solid #f4f3ef;outline-offset:3px}
.threads,.messages{list-style:none;padding:0;margin:0}
.threads{flex:1;overflow:auto;min-block-size:0}
.thread{inline-size:100%;border:0;border-bottom:1px solid #2c2c2c;border-radius:0;background:transparent;text-align:left;padding:14px 16px;display:flex;flex-direction:column;gap:5px;min-block-size:var(--target-size)}
.thread:hover{background:#1f1f1f}
.thread:focus-visible{outline-offset:-3px}
.thread.selected{background:#2c2c2c;box-shadow:inset 3px 0 #f4f3ef}
.contact-name{font-size:14px;line-height:1.45}
.contact-number,.thread small{font-size:11px;color:#b8b6ae;line-height:1.5}
.thread-identity{font-size:12px;color:#dedcd4;line-height:1.5}
.match-label{font-size:11px;color:#b8b6ae;line-height:1.5}
.preview{font-size:12px;color:#b8b6ae;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;line-height:1.55}
.loadmore{border:0;border-top:1px solid #2c2c2c;border-radius:0;background:#242424;padding:12px;min-block-size:var(--target-size)}
.loadmore:hover{background:#2c2c2c}
.empty{padding:18px;color:#b8b6ae;line-height:1.7}
.conversation{display:flex;flex-direction:column;min-block-size:0;min-inline-size:0}
.conversationHeading{padding:16px 22px;border-bottom:1px solid #2c2c2c;display:flex;flex-direction:column;gap:6px}
.conversationHeading h2{font-size:18px;line-height:1.5;margin:0;text-wrap:balance}
.conversationHeading p{color:#b8b6ae;font-size:12px;line-height:1.6;margin:0}
.conversationHeading .identity{color:#dedcd4}
.identity:empty{display:none}
#back{display:none}
.messages{padding:20px;display:flex;flex-direction:column;gap:14px;overflow:auto;flex:1;min-block-size:0;scrollbar-gutter:stable}
.messages .empty{margin:auto;max-inline-size:390px;text-align:center}
.bubble{padding:12px 14px;border:1px solid #3a3a3a;background:#242424;border-radius:12px 12px 12px 2px;max-inline-size:85%;align-self:flex-start;min-inline-size:0}
.bubble.out{background:#333;border-color:#4a4a4a;align-self:flex-end;border-radius:12px 12px 2px 12px}
.message-sender{display:block;line-height:1.5;font-size:13px;margin-bottom:4px}
.bubble small,.message-recipient,.message-match{color:#b8b6ae;font-size:11px;line-height:1.6;display:block;margin-bottom:5px}
.bubble .body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;margin-top:10px}
.attachment{border:1px dashed #5a5a5a;padding:8px;border-radius:6px;margin-top:8px;font-size:11px}
footer{padding:10px 18px max(10px,env(safe-area-inset-bottom));border-top:1px solid #2c2c2c;color:#918f88;font-size:11px;line-height:1.6}
#toast{position:fixed;bottom:calc(var(--bn-h,0px) + var(--sw-h,0px) + 16px);left:50%;transform:translateX(-50%);background:#3a2a2a;border:1px solid #6a4a4a;border-radius:8px;padding:12px 18px;color:#ffe3e0;box-shadow:0 8px 24px #0008;max-inline-size:calc(100% - 32px);line-height:1.6;z-index:90}
.skip-link{position:fixed;z-index:100;left:12px;top:-100px;padding:12px;background:#2c2c2c;border:2px solid #f4f3ef;border-radius:6px}
.skip-link:focus{top:12px}
/* The Conversations / Messages bar is for the single-pane phone layout; wide screens show both panes. */
@media(min-width:701px){.sms-bar{display:none}}
@media(pointer:coarse){:root{--target-size:44px}}
@media(max-width:700px){
  .status{padding:8px 12px}.status .counts{margin-left:0;flex-basis:100%}
  main{grid-template-columns:minmax(0,1fr)}
  .inbox{border-right:0}.conversation{display:none}.has-selection .inbox{display:none}.has-selection .conversation{display:flex}
  .conversationHeading{padding:12px 16px}.conversationHeading h2{font-size:17px}
  .messages{padding:14px;gap:12px}.bubble{max-inline-size:96%}.message-sender{font-size:13px}.bubble .body{font-size:14px}
}
@media(forced-colors:active){.thread.selected{border-inline-start:3px solid Highlight}.bubble{border-color:CanvasText}.match-label{color:CanvasText}}
