.shared-message-template-editor{width:min(860px,94vw);max-height:90vh;overflow:auto;padding:18px;font-size:13px}.shared-message-template-editor h2{font-size:18px;margin:0 0 4px}.shared-message-template-editor>label{display:block;margin-top:8px}.shared-message-template-editor>input,.shared-message-template-editor>textarea{box-sizing:border-box;width:100%;font:inherit}.shared-message-template-editor>small{display:block;margin:4px 0}.shared-message-template-editor .actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.shared-message-template-editor button{font:inherit;padding:5px 8px}.shared-message-template-editor pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit}.shared-template-previews{display:grid;grid-template-columns:1fr 1fr;gap:10px}.shared-template-previews>p{grid-column:1/-1}.shared-template-previews article,.shared-message-template-editor details article{border:1px solid #ddd;border-radius:6px;padding:10px;margin-top:6px}.shared-message-template-editor [hidden]{display:none!important}@media(max-width:600px){.shared-template-previews{grid-template-columns:1fr}}

.shared-template-publication{border:1px solid #ddd;border-radius:6px;padding:10px;margin-top:12px;min-width:0}.shared-template-publication h3{margin:0 0 6px;font-size:15px}.shared-template-publication p{margin:6px 0;overflow-wrap:anywhere}.shared-template-publication>div{display:flex;flex-wrap:wrap;gap:8px}.shared-template-publication>label{display:block;min-width:0;margin:6px 0}.shared-template-publication select{box-sizing:border-box;width:100%;max-width:100%;font:inherit;white-space:normal}.shared-template-publication button{max-width:100%;white-space:normal;margin:3px 4px 3px 0}.shared-template-publication small{display:block;overflow-wrap:anywhere}

/* One compact authoring surface; advanced/history controls retain their guards. */
.shared-message-template-editor{box-sizing:border-box;width:min(660px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:14px;font-size:13px;overflow-x:hidden}
.shared-message-template-editor[open]{display:block}
.shared-message-template-editor :is(input:not([type=checkbox]),select,textarea){box-sizing:border-box;max-width:100%;font:inherit;padding:6px 8px;border:1px solid #ccc;border-radius:4px}
.shared-message-template-editor>select{width:100%;height:34px}
.shared-message-template-editor>input{height:34px}
.shared-message-template-editor>textarea{min-height:140px;resize:vertical;line-height:1.45}
.shared-message-template-editor>label{font-size:12px;margin-top:8px}
.shared-message-template-editor [data-shared-template-state]{color:#666;margin:3px 0}
.shared-message-template-editor :is(details,section){min-width:0;overflow-wrap:anywhere}
.shared-message-template-editor>details{margin-top:8px;border-top:1px solid #eee;padding-top:8px}
.shared-message-template-editor summary{cursor:pointer;font-size:12px}
.shared-template-more-details>small{display:block;margin:5px 0}
.shared-template-more-details>button{margin:4px}
.shared-template-more-details>label{display:block;margin-top:6px}
.shared-template-previews{display:block;margin:8px 0}
.shared-template-previews article{padding:8px}
.shared-template-previews h3{display:none}
.shared-template-previews p{font-size:12px;color:#666;margin:4px 0}
.shared-template-previews pre{margin:6px 0 0;line-height:1.45}
.shared-template-preview-only .shared-template-edit-only{display:none!important}
.shared-template-placeholder-controls{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:8px 0}
.shared-template-placeholder-controls label{font-size:12px}
.shared-template-placeholder-controls select{flex:1 1 150px;min-width:0;height:34px}
.shared-template-placeholder-controls button{min-height:32px}
.shared-template-compatibility{font-size:12px;line-height:1.4}
.shared-template-compatibility p{margin:5px 0}
.shared-template-compatibility label{display:block;margin:6px 0}
.shared-message-template-editor [data-shared-template-feedback]{margin:6px 0;line-height:1.4}
.shared-message-template-editor [data-shared-template-feedback][role=alert]{color:#a82432}
.shared-message-template-editor .shared-template-save-success{color:#22763c;background:#eff8f1;border:1px solid #b6d5bf;border-radius:5px;padding:7px 10px}
.shared-message-template-editor button:focus-visible,.shared-message-template-editor summary:focus-visible{outline:2px solid #a82432;outline-offset:2px}
@media(max-width:600px){.shared-message-template-editor{padding:12px}.shared-message-template-editor button{min-height:34px}}
