#comms{width:min(1080px,95vw);max-height:92vh;border:1px solid #d8dfea;border-radius:14px;padding:24px;color:#16223c;font:14px system-ui;background:#fff;box-shadow:0 20px 100px #0003}#comms-dialog::backdrop{background:#16223c88}.comms-header{display:flex;justify-content:space-between;align-items:start;gap:20px}.comms-header h2{margin:6px 0 16px;font-size:23px}.comms-header small{letter-spacing:.08em;color:#6b7890;font-size:10px}.comms-layout{display:grid;grid-template-columns:280px 1fr;gap:24px}.comms-layout aside{border-right:1px solid #e1e6ef;padding-right:16px}.comms-item{display:flex!important;flex-direction:column;gap:6px;width:100%;text-align:left;margin:8px 0;padding:12px!important;background:#f2f5fa!important;color:#16223c!important}.comms-item.unread{border-left:3px solid #ffb400!important}.comms-item span{font-size:12px;font-weight:400}.comms-item small{font-size:11px;color:#647087}#comms button{background:#16223c;color:#fff;border:0;padding:9px 13px;border-radius:6px;cursor:pointer;font:600 12px system-ui}#comms label{display:block;margin:10px 0;font-size:12px;font-weight:600}#comms input:not([type=checkbox]),#comms textarea,#comms select{display:block;width:100%;border:1px solid #bdc7d7;padding:9px;border-radius:6px;font:14px system-ui;margin-top:5px}#comms textarea{min-height:85px}#comms input[type=checkbox]{width:auto;display:inline;margin-right:6px}#comms fieldset{border:1px solid #d8dfea;border-radius:8px;margin:14px 0;padding:12px}.comms-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:15px}.comms-post{background:#f5f7fb;padding:14px;border-radius:8px;margin:12px 0}.comms-post small{float:right;color:#647087;font-size:10px}.comms-post p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}.comms-calendar{padding-top:18px;margin-top:18px;border-top:1px solid #d8dfea}.comms-calendar a{display:inline-block;margin-right:16px}.comms-calendar p{color:#647087}.comms-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}#comms-status{color:#8b3d13;white-space:pre-wrap}@media(max-width:680px){#comms{padding:16px}.comms-layout{grid-template-columns:1fr}.comms-layout aside{border-right:0;border-bottom:1px solid #d8dfea;max-height:220px;overflow:auto}.comms-grid{grid-template-columns:1fr}.comms-header h2{font-size:20px}}

#comms-dialog{padding:0;border:0;border-radius:14px;max-width:96vw;max-height:94vh;background:#fff}
#comms.comms-page{width:100%;max-height:none;box-sizing:border-box;box-shadow:none;min-height:65vh}
#comms [hidden]{display:none!important}.comms-context{font-size:12px;color:#315f88;overflow-wrap:anywhere}
#comms .comms-actions [aria-pressed="true"]{background:#dbeafe;color:#16223c}
#comms-notices{position:fixed;right:22px;bottom:22px;width:min(350px,calc(100vw - 44px));z-index:1200;display:grid;gap:10px;font:13px system-ui}
#comms-notices section{display:grid;gap:8px;background:#fff;color:#16223c;border:1px solid #d8dfea;border-left:4px solid #3b82f6;border-radius:9px;padding:16px;box-shadow:0 6px 25px #16223c26;overflow-wrap:anywhere}
#comms-notices small{font-size:10px;color:#315f88}#comms-notices button{padding:7px 10px;margin-right:8px;border:1px solid #bdc7d7;border-radius:6px;background:#f2f5fa;color:#16223c;cursor:pointer}

#comms button.comms-delete{background:#fbe8e4;color:#a32924;margin-left:auto}#comms .comms-grid>label{min-width:0}#comms button:disabled{opacity:.5;cursor:wait}

/* New correspondence is composed in its own dialog; the case list stays in place. */
#comms #comms-compose-dialog{box-sizing:border-box;width:min(680px,calc(100vw - 28px));max-width:calc(100vw - 28px);max-height:90vh;max-height:90dvh;padding:0;border:1px solid var(--line,#d2d6d9);border-radius:10px;background:var(--card,#fff);color:var(--ink,#232c35);font-family:inherit;font-size:13px;line-height:1.5;box-shadow:0 18px 70px #0005;overflow:auto}
#comms-compose-dialog::backdrop{background:#111b2680}
#comms .comms-compose-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;background:var(--card,#fff);border-bottom:1px solid var(--line,#d2d6d9)}
#comms .comms-compose-head h3{font-size:20px;line-height:1.3;margin:2px 0 0;color:inherit}
#comms .comms-compose-head small{font-size:10px;letter-spacing:1px;color:var(--ink2,#5f6872)}
#comms .comms-compose-head .comms-compose-close{width:32px;min-height:32px;padding:4px;background:var(--board,#f7f7f6);color:var(--ink,#232c35);border:1px solid var(--line,#d2d6d9)}
#comms .comms-compose-body{padding:4px 20px 0}
#comms .comms-compose-body .hint{font-size:12px;line-height:1.5;color:var(--ink2,#5f6872)}
#comms #comms-compose-status:empty{display:none}
#comms #comms-compose-status:not(:empty){padding:10px 12px;border:1px solid var(--line,#d2d6d9);border-radius:6px;background:var(--board,#f7f7f6);white-space:pre-wrap}
#comms #comms-compose-status[role=alert]{color:var(--red,#b83d43);border-color:var(--red,#b83d43);background:var(--reds,#fbecee)}
#comms #comms-compose-dialog input:not([type=checkbox]),#comms #comms-compose-dialog select,#comms #comms-compose-dialog textarea{box-sizing:border-box;max-width:100%}
#comms #comms-compose-dialog textarea{min-height:120px;resize:vertical}
#comms #comms-compose-dialog fieldset{max-height:170px;overflow:auto;border-color:var(--line,#d2d6d9)}
#comms .comms-compose-footer{position:sticky;bottom:0;display:flex;justify-content:flex-end;gap:8px;margin-top:16px;padding:12px 0 16px;background:var(--card,#fff);border-top:1px solid var(--line,#d2d6d9)}
#comms .comms-compose-footer button[type=submit]{background:var(--hivis,#f2a900);color:#251d0c;border:1px solid var(--hivis,#f2a900)}
#comms #comms-compose-cancel{background:var(--board,#f7f7f6);color:var(--ink,#232c35);border:1px solid var(--line,#d2d6d9)}
@media(max-width:600px){#comms .comms-compose-head{padding:12px 14px}#comms .comms-compose-body{padding:4px 14px 0}#comms #comms-compose-dialog{max-height:94vh;max-height:94dvh}#comms .comms-compose-footer button{min-height:38px}}

/* Search changes visibility only; checked recipients stay selected across searches. */
#comms #comms-compose-dialog #comms-people{max-height:none;overflow:visible}
#comms .comms-people-tools{display:flex;align-items:flex-end;flex-wrap:wrap;gap:8px 12px;padding-bottom:8px;border-bottom:1px solid var(--line,#d2d6d9)}
#comms .comms-people-tools label{flex:1;min-width:160px;margin:0}
#comms #comms-recipient-count{font-size:11px;font-weight:400;color:var(--ink2,#5f6872);padding-bottom:8px;white-space:nowrap}
#comms .comms-people-list{max-height:180px;overflow:auto;overscroll-behavior:contain;margin-top:4px}
#comms .comms-people-list label{padding:4px 0;margin:2px 0;font-weight:500;overflow-wrap:anywhere;cursor:pointer}
#comms #comms-people-empty{margin:10px 0 4px}
#comms #comms-kind-help{margin:0 0 12px;font-size:12px;color:var(--ink2,#5f6872)}
