/* Standalone chat window and OBS browser-source presentation. */
body.fma-chat-view-popup,
body.fma-chat-view-obs {
  margin: 0 !important;
  width: 100vw !important;
  min-width: 0 !important;
  height: 100vh !important;
  height: 100dvh !important;
  overflow: hidden !important;
  background: #0b0b0b !important;
}
body.fma-chat-view-popup > .fma-chat-app,
body.fma-chat-view-obs > .fma-chat-app {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  margin: 0;
}
body.fma-chat-view-popup .app-shell,
body.fma-chat-view-obs .app-shell {
  width: 100%;
  min-height: 100%;
}
body.fma-chat-view-popup .masthead,
body.fma-chat-view-popup .intro,
body.fma-chat-view-popup .community-sidebar,
body.fma-chat-view-popup .context-sidebar,
body.fma-chat-view-popup .page-footer {
  display: none !important;
}
body.fma-chat-view-popup .main-wrap {
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  padding: 8px;
}
body.fma-chat-view-popup .workspace { display: block; height: 100%; }
body.fma-chat-view-popup .chat-panel {
  height: 100%;
  min-height: 0;
  border-radius: 8px;
}
body.fma-chat-view-popup .chat-header { min-height: 66px; }

body.fma-chat-view-obs,
body.fma-chat-view-obs html,
html:has(body.fma-chat-view-obs) {
  background: transparent !important;
  color-scheme: dark;
  margin-top: 0 !important;
}
html:has(body.fma-chat-view-obs) { width: 100%; height: 100%; overflow: hidden; }
body.fma-chat-view-obs { width: 100vw !important; height: 100vh !important; height: 100dvh !important; min-height: 0 !important; margin-top: 0 !important; overflow: hidden !important; container-type: size; }
body.fma-chat-view-obs #wpadminbar { display: none !important; }
body.fma-chat-view-obs .masthead,
body.fma-chat-view-obs .intro,
body.fma-chat-view-obs .community-sidebar,
body.fma-chat-view-obs .context-sidebar,
body.fma-chat-view-obs .page-footer,
body.fma-chat-view-obs .chat-header,
body.fma-chat-view-obs .chat-tabs,
body.fma-chat-view-obs .pinned-notice,
body.fma-chat-view-obs .composer-area,
body.fma-chat-view-obs .login-gate,
body.fma-chat-view-obs .new-messages,
body.fma-chat-view-obs .date-divider,
body.fma-chat-view-obs .message-date {
  display: none !important;
}
body.fma-chat-view-obs .app-shell,
body.fma-chat-view-obs .main-wrap,
body.fma-chat-view-obs .workspace,
body.fma-chat-view-obs .chat-panel,
body.fma-chat-view-obs .fma-chat,
body.fma-chat-view-obs .messages {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
}
body.fma-chat-view-obs .app-shell,
body.fma-chat-view-obs .main-wrap,
body.fma-chat-view-obs .workspace,
body.fma-chat-view-obs .chat-panel,
body.fma-chat-view-obs .fma-chat,
body.fma-chat-view-obs .messages {
  box-sizing: border-box;
  max-width: none !important;
}
body.fma-chat-view-obs .main-wrap { max-width: none; }
body.fma-chat-view-obs .workspace { display: block !important; }
body.fma-chat-view-obs .chat-panel { display: flex; width: 100% !important; overflow: hidden; }
body.fma-chat-view-obs .fma-chat { display: flex; flex: 1; width: 100% !important; min-width: 0; }
body.fma-chat-view-obs .messages {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: clamp(4px, 1.6cqw, 8px);
  overflow: hidden;
  padding: clamp(5px, 2.2cqw, 10px);
  container-type: inline-size;
}
body.fma-chat-view-obs .message {
  width: 100% !important;
  max-width: 100%;
  flex: 0 0 auto;
  margin: 0;
  padding: clamp(5px, 1.8cqw, 9px) clamp(7px, 2.6cqw, 11px);
  border: 1px solid rgba(212, 172, 13, .28);
  border-left: 3px solid #d4ac0d;
  border-radius: clamp(5px, 1.8cqw, 7px);
  background: rgba(11, 11, 11, .88);
  box-shadow: 0 2px 10px rgba(0,0,0,.28);
}
body.fma-chat-view-obs .message-row { display: flex; align-items: flex-start; gap: clamp(6px, 2.3cqw, 10px); }
body.fma-chat-view-obs .message-content { flex: 1; min-width: 0; }
body.fma-chat-view-obs .message-meta { display: flex; align-items: center; gap: clamp(4px, 1.8cqw, 8px); flex-wrap: wrap; row-gap: 2px; }
body.fma-chat-view-obs .reply-button,
body.fma-chat-view-obs .delete-button,
body.fma-chat-view-obs .you-label { display: none !important; }
body.fma-chat-view-obs .message-meta b { font-size: clamp(10px, 3.7cqw, 12px); line-height: 1.25; color: #d4ac0d; overflow-wrap: anywhere; }
body.fma-chat-view-obs .message-meta time { font-size: clamp(9px, 3cqw, 10px); line-height: 1.25; color: #aaa; }
body.fma-chat-view-obs .message-content p { margin-top: clamp(2px, .7cqw, 3px); color: #f1f1f1; font-size: clamp(12px, 4.6cqw, 14px); line-height: 1.3; overflow-wrap: anywhere; }
body.fma-chat-view-obs .avatar { width: clamp(20px, 8cqw, 26px); height: clamp(20px, 8cqw, 26px); flex: 0 0 auto; border-color: #4b421d; color: #d4ac0d; }
body.fma-chat-view-obs .empty-state { color: #fff; border: 1px solid rgba(212,172,13,.35); border-radius: 7px; background: rgba(11,11,11,.82); }
