
html body #chat-view .conversation-header{background:color-mix(in srgb,var(--ui-panel,#202124) 75%,transparent)!important;backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px);border-bottom:0!important;padding:10px 14px;gap:12px}
html body #chat-view .conversation-heading{min-width:0;border:1px solid #ffffff25;border-radius:40px;padding:7px 22px;text-align:center;background:linear-gradient(160deg,#ffffff20,#ffffff08);box-shadow:inset 0 1px 0 #ffffff16,0 4px 18px #0001}
html body #chat-view #chat-title{font-size:18px;line-height:1.25;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body #chat-view #chat-title button{font:inherit;font-weight:650;display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:auto;color:inherit}
html body #chat-view #chat-subtitle{font-size:12px;line-height:1.3;margin:3px 0 0;opacity:.7}
html body #chat-view #back,html body #chat-view #chat-options{border-radius:50%;background:#ffffff0d!important;border:1px solid #ffffff1a;width:42px;height:42px}
html body #chat-view #chat-avatar{border-radius:50%;border:2px solid #ffffff30;box-shadow:0 2px 12px #0002}
@media(max-width:680px){
 html body #chat-view .conversation-header{display:grid!important;grid-template-columns:44px minmax(0,1fr) 44px;grid-template-rows:auto 30px;gap:5px 12px;padding:8px 12px}
 html body #chat-view #back{grid-column:1;grid-row:1;display:grid}
 html body #chat-view .conversation-heading{grid-column:2;grid-row:1;width:auto;justify-self:stretch;padding:7px 14px}
 html body #chat-view #chat-avatar{grid-column:3;grid-row:1;width:42px;height:42px;margin:0}
 html body #chat-view .chat-call-actions{grid-column:2;grid-row:2;justify-self:center;display:flex;gap:18px;margin:0}
 html body #chat-view .chat-call-actions button{width:30px;height:30px;min-height:0;padding:5px;background:transparent}
 html body #chat-view #chat-options{grid-column:3;grid-row:2;justify-self:center;width:30px;height:30px;border:0;background:transparent!important}
}
html body dialog.glass-message-menu{display:flex;flex-direction:column;gap:10px;width:360px;max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px);padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;overflow:visible;color:var(--ui-text,#fff)}
html body dialog.glass-message-menu:not([open]){display:none}
html body dialog.glass-message-menu::backdrop{background:#0005!important;backdrop-filter:blur(12px)!important;-webkit-backdrop-filter:blur(12px)!important}
html body dialog.glass-message-menu>.message-context-close{display:none!important}
.glass-quick-reactions{display:flex;align-items:center;justify-content:space-around;gap:2px;flex-shrink:0;padding:6px;border-radius:40px;background:rgba(46,46,50,.92);box-shadow:inset 0 1px 0 #ffffff18}
html body .glass-quick-reactions button{display:grid;place-items:center;flex:1;min-width:0;height:42px;padding:2px;font-size:29px;background:transparent!important;border:0;border-radius:50%;line-height:1}
html body .glass-quick-reactions button:hover{transform:translateY(-3px) scale(1.12)}
html body .glass-quick-reactions .glass-reactions-more{flex:0 0 36px;font-size:24px;color:#fff;background:#ffffff20!important;height:36px}
.glass-message-preview{flex-shrink:0;max-height:140px;overflow:hidden;border-radius:20px;background:var(--ui-raised,#34363d);padding:12px 16px;pointer-events:none}
.glass-message-preview .message{margin:0!important;width:auto!important;max-width:100%!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;color:inherit}
.glass-message-preview .message-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:16px}
.glass-message-preview img{max-width:100%;max-height:100px;object-fit:contain}
.glass-message-preview .message-meta{display:none!important}
.glass-actions{align-self:flex-end;width:min(300px,100%);box-sizing:border-box;overflow:auto;overscroll-behavior:contain;min-height:100px;padding:8px 10px;border:1px solid #ffffff24;border-radius:26px;background:rgba(45,47,49,.94);backdrop-filter:blur(28px);-webkit-backdrop-filter:blur(28px);box-shadow:0 16px 50px #0004;scrollbar-width:thin}
.glass-message-stamp{font-size:12px;opacity:.65;padding:8px 12px 13px;border-bottom:1px solid #ffffff20;margin-bottom:5px}
html body dialog.glass-message-menu .context-action{justify-content:flex-start;flex-direction:row-reverse;min-height:44px;border-radius:10px;gap:16px;padding:11px 12px;font-size:16px}
html body dialog.glass-message-menu .context-caption{flex:1;text-align:left}
html body dialog.glass-message-menu .context-icon{width:23px;height:23px;flex-basis:23px}
html body dialog.glass-message-menu .context-action:last-child{margin-top:7px;border-top:1px solid #ffffff20;border-radius:0;padding-top:16px}
html:not([data-theme=dark]) body .glass-actions,html:not([data-theme=dark]) body .glass-quick-reactions{background:rgba(248,248,250,.94);border-color:#0001;color:#202124}
html:not([data-theme=dark]) body .glass-message-stamp{border-color:#0002}
@media(prefers-reduced-motion:reduce){.glass-quick-reactions button{transition:none!important;transform:none!important}}
html:not([data-theme=dark]) body .glass-message-preview{background:var(--ui-raised,#eceef3);color:var(--ui-text,#202124)}
html:not([data-theme=dark]) body .glass-quick-reactions .glass-reactions-more{background:#0001!important;color:#303238}

html[data-design] body #chat-view #back{border-radius:50%!important}
html[data-design] body #chat-view #chat-title,html[data-design] body #chat-view #chat-title button{font-size:18px!important;line-height:1.25!important}
html[data-design] body dialog.message-context.glass-message-menu{background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:0!important;overflow:visible!important}
html[data-design] body dialog.message-context.glass-message-menu .context-action{font-size:16px!important}

/* Single-row header: secondary actions live behind the contact name. */
html[data-design] body #chat-view .conversation-header{display:grid!important;grid-template-columns:40px minmax(0,1fr) 40px!important;grid-template-rows:48px!important;gap:8px!important;padding:6px 10px!important;min-height:0!important}
html[data-design] body #chat-view .conversation-heading{grid-column:2!important;grid-row:1!important;box-sizing:border-box;max-width:100%;height:48px!important;min-height:0!important;padding:5px 12px!important;overflow:hidden}
html[data-design] body #chat-view #chat-title,html[data-design] body #chat-view #chat-title button{font-size:16px!important;line-height:21px!important}
html[data-design] body #chat-view #chat-subtitle{font-size:11px!important;line-height:14px!important;margin:1px 0 0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
html[data-design] body #chat-view #chat-avatar{grid-column:3!important;grid-row:1!important;width:38px!important;height:38px!important;min-width:0!important;margin:0!important}
html[data-design] body #chat-view #back{grid-column:1!important;grid-row:1!important;width:38px!important;height:38px!important;display:grid!important}
html[data-design] body #chat-view .chat-call-actions,html[data-design] body #chat-view #chat-options{display:none!important}
html[data-design] body .contact-menu-content{display:flex;flex-direction:column;gap:10px}
.contact-menu-calls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
html[data-design] body #dialog .contact-menu-call{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;padding:16px 8px!important;border-radius:18px!important;background:var(--ui-raised,#303238)!important;color:var(--ui-text,#fff)!important;font-size:14px!important;border:1px solid var(--ui-line,#444)!important}
.contact-menu-call svg{width:26px;height:26px}
.contact-menu-mute{display:flex;justify-content:space-between;align-items:center;padding:14px 4px;font-size:16px;gap:12px}
.contact-menu-mute input{width:22px;height:22px;accent-color:var(--ui-primary,#ed652c)}

/* The dialog itself receives programmatic focus, but must not draw a frame. */
html[data-design] body dialog.message-context.glass-message-menu,
html[data-design] body dialog.message-context.glass-message-menu:focus,
html[data-design] body dialog.message-context.glass-message-menu:focus-visible{outline:none!important;outline-offset:0!important;border:0!important;box-shadow:none!important}
