/* The surrounding page stays usable while native private messages are open. */
.oogc-message-panel {
 position:fixed;z-index:600;top:var(--oogc-message-top,80px);right:16px;bottom:16px;
 display:flex;flex-direction:column;width:min(1120px,calc(100% - var(--oogc-sidebar,220px) - 80px));min-height:0;
 overflow:hidden;box-sizing:border-box;border:1px solid var(--oogc-border);border-radius:12px;
 background:var(--oogc-bg);color:var(--oogc-text);box-shadow:0 16px 64px #0008;
}
.oogc-message-panel[hidden],.oogc-message-panel [hidden] { display:none!important; }
.oogc-message-panel-head {
 display:flex;align-items:center;justify-content:space-between;gap:16px;flex:none;
 min-height:52px;box-sizing:border-box;padding:8px 12px 8px 18px;
 border-bottom:1px solid var(--oogc-border);background:var(--oogc-surface);
}
.oogc-message-panel-head h2 { margin:0;font-size:16px;line-height:1.5;font-weight:600; }
.oogc-message-panel-head button {
 display:grid;place-items:center;flex:none;width:36px;height:36px;margin:0;padding:8px;
 border:0;border-radius:7px;background:transparent;color:var(--oogc-muted);cursor:pointer;
}
.oogc-message-panel-head button:hover { background:var(--oogc-surface-2);color:var(--oogc-text); }
.oogc-message-panel-head svg { display:block;width:20px;height:20px; }
.oogc-message-panel button:focus-visible { outline:2px solid var(--oogc-focus);outline-offset:2px; }
.oogc-message-frame { display:block;flex:1;min-width:0;min-height:0;width:100%;border:0;background:var(--oogc-bg); }
.oogc-message-loading,.oogc-message-failure {
 position:absolute;z-index:1;inset:52px 0 0;display:flex;align-items:center;justify-content:center;
 gap:12px;margin:0;padding:24px;background:var(--oogc-bg);color:var(--oogc-muted);font-size:13px;
}
.oogc-message-failure button { padding:7px 14px;border:1px solid var(--oogc-border);border-radius:6px;background:var(--oogc-surface-2);color:var(--oogc-text);cursor:pointer; }

/* Public messages and message preferences keep only their own native tabs. */
.oogc-page.oogc-site #ct.oogc-pm-utility { display:block;width:100%;margin:0;padding:0;border:0;background:none; }
.oogc-page.oogc-site #ct.oogc-pm-utility>.mn { float:none;width:100%;min-width:0;margin:0; }
.oogc-page.oogc-site #ct.oogc-pm-utility>.mn>.bm { max-width:none;margin:0;padding:20px;box-sizing:border-box; }
.oogc-page #ct.oogc-pm-utility h1.mt { display:none; }
.oogc-page #ct.oogc-pm-utility .tb { display:flex;flex-wrap:wrap;gap:6px;margin:0 0 18px; }
.oogc-page #ct.oogc-pm-utility .tfm { max-width:100%; }

/* Only iframe documents opt in: the standalone message center is unchanged. */
html.oogc-messages-embedded { min-width:0;height:100%;background:var(--oogc-bg); }
html.oogc-messages-embedded body.oogc-page { width:100%;min-width:0;min-height:0;margin:0;padding:0!important; }
html.oogc-messages-embedded :is(
 .oogc-header,.oogc-topbar,.oogc-sidebar,.oogc-native-tools,.oogc-page-toolbar,
 .oogc-layout-breadcrumb,.oogc-context-rail,.oogc-footer,.oogc-footer-shell,
 .oogc-bottom-nav,.oogc-mobile-nav,.oogc-scrim,#hd,#toptb,#ft,#pt,#scrolltop
) { display:none!important; }
html.oogc-messages-embedded body>div:first-child:not([id]):not([class]) { display:none!important; }
html.oogc-messages-embedded .oogc-page :is(#wp.oogc-wrap,.oogc-site-layout,#oogc-main) {
 display:block;width:100%!important;max-width:none;min-width:0;min-height:0;
 box-sizing:border-box;margin:0!important;padding:0!important;
}
html.oogc-messages-embedded .oogc-page #ct {
 display:block;float:none;width:100%!important;min-width:0;margin:0!important;padding:0!important;
}
html.oogc-messages-embedded .oogc-page #ct>.appl { display:none!important; }
html.oogc-messages-embedded .oogc-page #ct>.mn { float:none;width:100%!important;min-width:0;margin:0!important;box-sizing:border-box; }
html.oogc-messages-embedded .oogc-page #ct:not(.oogc-chat)>.mn { padding:16px!important; }
html.oogc-messages-embedded .oogc-page #ct:not(.oogc-chat)>.mn>.bm { width:100%;max-width:none;margin:0;box-sizing:border-box; }
html.oogc-messages-embedded .oogc-page #ct:not(.oogc-chat) .tb { display:flex;flex-wrap:wrap;gap:6px; }
html.oogc-messages-embedded .oogc-page #ct:not(.oogc-chat) .tfm { width:100%;max-width:100%; }
html.oogc-messages-embedded .oogc-page #ct:not(.oogc-chat) textarea { max-width:100%;box-sizing:border-box; }
html.oogc-messages-embedded body.oogc-chat-page { height:100dvh;overflow:hidden; }
html.oogc-messages-embedded .oogc-page.oogc-site #ct.oogc-chat {
 display:grid;grid-template-columns:clamp(210px,24vw,270px) minmax(0,1fr);height:100dvh;min-height:0;
 border:0;border-radius:0;overflow:hidden;
}
html.oogc-messages-embedded .oogc-chat>.oogc-chat-conversations {
 display:flex!important;width:auto;min-width:0;min-height:0;border-right:1px solid var(--oogc-border);
}
html.oogc-messages-embedded .oogc-page.oogc-site #ct.oogc-chat>.mn { display:block!important;width:auto!important;min-height:0; }
html.oogc-messages-embedded .oogc-chat-back { display:none; }
html.oogc-messages-embedded .oogc-chat:not(.has-conversation) .oogc-chat-heading { display:none; }
html.oogc-messages-embedded .oogc-chat-list-head,
html.oogc-messages-embedded .oogc-chat-heading { min-height:56px;padding:10px 14px; }
html.oogc-messages-embedded .oogc-chat-session { gap:8px;padding:12px 8px; }
html.oogc-messages-embedded .oogc-chat-session-avatar,
html.oogc-messages-embedded .oogc-chat-session-avatar img { width:34px;height:34px; }
html.oogc-messages-embedded .oogc-chat-list-tools { gap:8px;padding:14px 12px; }
html.oogc-messages-embedded .oogc-chat #pm_ul { padding:16px 14px!important; }
html.oogc-messages-embedded .oogc-chat #pm_ul_post textarea { min-height:60px;max-height:min(120px,22dvh); }

@media(max-width:560px) {
 html.oogc-messages-embedded .oogc-page.oogc-site #ct.oogc-chat { display:flex; }
 html.oogc-messages-embedded .oogc-chat>.oogc-chat-conversations { width:100%;border-right:0; }
 html.oogc-messages-embedded .oogc-page.oogc-site #ct.oogc-chat:not(.has-conversation)>.mn,
 html.oogc-messages-embedded .oogc-chat.has-conversation>.oogc-chat-conversations { display:none!important; }
 html.oogc-messages-embedded .oogc-page.oogc-site #ct.oogc-chat.has-conversation>.mn { width:100%!important; }
 html.oogc-messages-embedded .oogc-chat-back { display:block; }
}
