/* Baha C6 v22.9.438 – flat chrome, ordinary document scrolling.
   Theme colours and intentionally selected message/avatar effects stay separate. */
body.baha-ui-flat-on{
  --shadow-soft:none;--shadow-raised:none;--baha-ui-shadow:0 4px 16px #0002;
  --baha-ui-accent-soft:color-mix(in srgb,var(--baha-ui-accent) 14%,var(--surface-1));
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  background-attachment:scroll!important;
}
body.baha-ui-flat-on.baha-ui-accent-theme{--baha-ui-accent:var(--accent);--baha-ui-accent-strong:var(--link)}
body.baha-ui-flat-on.baha-ui-wallpaper-none{background:var(--page-bg-soft)}
body.baha-ui-flat-on .retro-shell{
  background:var(--surface-1);border-width:1px;border-color:var(--border-subtle);
  border-radius:12px;box-shadow:none;overflow:visible!important;
}
body.baha-ui-flat-on .top{
  background:var(--surface-1)!important;border-color:var(--border-subtle);box-shadow:none;
  border-radius:12px 12px 0 0;
}
body.baha-ui-flat-on :is(button,.btn,.baha-icon-btn,.baha-primary-btn){box-shadow:none;text-shadow:none}
body.baha-ui-flat-on :is(.baha-card,.settings-block,.setting-block,.pv2-section,.pv2-more,.conversation-row,.hub-first-card,.start-panel,.modern-home-tile,.modern-tile){
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  box-shadow:none;border-radius:12px;background:var(--surface-1)!important;
}
/* No animated card arrival: content is painted at full opacity on its first frame. */
body.baha-ui-flat-on :is(.post[data-room-post-id],.thread-message[data-message-id],.forum-public-post){animation:none!important}
body.baha-ui-flat-on :is(.post,.thread-message):not(.baha-card-effect){box-shadow:none}
body.baha-ui-flat-on :is(.room-wall-header,#room-inline-composer,.baha-context-composer-docked,.baha-context-action-dock,.conversation-compose-top,.hub1-fixed-dock){
  background:var(--surface-1)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  box-shadow:none!important;border-color:var(--border-subtle)!important;border-radius:12px!important;
}
body.baha-ui-flat-on .hub1-fixed-dock{gap:2px;padding:4px;border-width:1px}
body.baha-ui-flat-on .hub1-fixed-dock a{
  border:0!important;border-radius:8px!important;background:transparent!important;
  box-shadow:none!important;min-height:52px;padding:4px;color:var(--text-secondary)!important;
}
body.baha-ui-flat-on .hub1-fixed-dock a.baha-nav-active{
  background:var(--baha-ui-accent-soft)!important;color:var(--baha-ui-accent-strong)!important;
}
body.baha-ui-flat-on .hub1-fixed-dock a::before,
body.baha-ui-flat-on .hub1-fixed-dock a>span::after{display:none!important}
body.baha-ui-flat-on .hub1-fixed-dock a>span{
  transform:none!important;filter:none!important;text-shadow:none!important;animation:none!important;
}
body.baha-ui-flat-on .baha-flat-dock-icon{display:grid;place-items:center;width:24px;height:24px}
.baha-flat-dock-icon svg{display:block;width:24px;height:24px}
body.baha-ui-flat-on .hub1-fixed-dock a>small{font-size:11px;font-weight:600}
body.baha-ui-flat-on .baha-quick-actions-toggle{
  background:var(--baha-ui-accent)!important;border:0;border-radius:50%!important;box-shadow:0 2px 6px #0002!important;
}
/* The inbox is a normal list: no clipped, filtered or separately animated rows. */
body.baha-ui-flat-on .messages-inbox{padding:16px;overflow:visible!important}
body.baha-ui-flat-on .messages-head{margin:18px 0 12px;gap:12px;align-items:center}
body.baha-ui-flat-on .messages-head h2{font-size:1.35rem;margin:0 0 3px}
body.baha-ui-flat-on .messages-head-actions{display:flex;flex-wrap:wrap;gap:6px}
body.baha-ui-flat-on .messages-head-actions :is(a,button){width:auto;min-width:40px;min-height:40px;padding:7px 10px;border-radius:10px;font-size:.8rem}
body.baha-ui-flat-on .messages-inbox .message-view-tabs{
  gap:4px;padding:4px;margin-block:10px;border:0;box-shadow:none;border-radius:10px;background:var(--surface-2);
}
body.baha-ui-flat-on .messages-inbox .message-view-tabs>a{
  padding:10px 8px;border:0;border-radius:7px;box-shadow:none;font-size:.9rem;
}
body.baha-ui-flat-on .messages-inbox .message-view-tabs>a.is-active{background:var(--surface-1);box-shadow:none}
body.baha-ui-flat-on .messages-inbox .conversation-list{display:block;margin:8px 0;overflow:visible;border:0;background:var(--surface-1)}
body.baha-ui-flat-on .messages-inbox .conversation-row{
  display:grid;grid-template-columns:52px minmax(0,1fr);gap:12px;align-items:center;
  min-height:80px;height:auto;margin:0;padding:12px 4px;border:0!important;
  border-bottom:1px solid var(--border-subtle)!important;border-radius:0!important;
  background:var(--surface-1)!important;box-shadow:none!important;
  filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  transform:none!important;animation:none!important;transition:background-color .12s ease;
}
body.baha-ui-flat-on .messages-inbox .conversation-row:hover{background:var(--surface-hover)!important}
body.baha-ui-flat-on .messages-inbox .conversation-row.has-unread{background:var(--surface-2)!important}
body.baha-ui-flat-on .messages-inbox .conversation-avatar,
body.baha-ui-flat-on .messages-inbox .conversation-avatar>.community-avatar-frame{width:52px!important;height:52px!important;min-width:52px}
body.baha-ui-flat-on .messages-inbox .conversation-top{gap:8px;min-width:0}
body.baha-ui-flat-on .messages-inbox .conversation-top>b{font-size:1rem}
body.baha-ui-flat-on .messages-inbox .conversation-preview{font-size:.9rem;line-height:1.4;margin-top:4px}
body.baha-ui-flat-on .messages-inbox .conversation-aside time{font-size:.73rem}
body.baha-ui-flat-on .global-active-room{box-shadow:none;border-radius:10px;background:var(--surface-2)!important}
/* A fixed rail contains a single ordinary scroll area. No nested blur surfaces. */
@media(min-width:700px){
  body.baha-ui-flat-on.has-baha-widget-rail .baha-widget-rail{contain:none;isolation:auto}
  body.baha-ui-flat-on.has-baha-widget-rail :is(.baha-widget-rail-top,.baha-widget-card){
    background:var(--surface-1)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
    box-shadow:none!important;border-color:var(--border-subtle);border-radius:10px;overflow:hidden;
  }
  body.baha-ui-flat-on.has-baha-widget-rail .baha-widget-head{
    background:var(--surface-2)!important;border-bottom-color:var(--border-subtle)!important;box-shadow:none;
  }
  body.baha-ui-flat-on.has-baha-widget-rail .baha-widget-person{min-height:54px;scroll-snap-align:none}
  body.baha-ui-flat-on.has-baha-widget-rail .baha-widget-head>span>i{background:none;filter:none;text-shadow:none}
  body.baha-ui-flat-on.has-baha-widget-rail .baha-quick-actions{right:calc(var(--baha-widget-main-right) + 12px)}
}
/* Dialog dimming uses a plain scrim rather than blurring the whole viewport. */
body.baha-ui-flat-on :is(.baha-sheet-overlay,.thread-longpress-backdrop,.baha-mobile-sheet-panel,.room-info-panel){
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
}
body.baha-ui-flat-on.room-info-open::before{backdrop-filter:none!important}
@media(max-width:699px){
  body.baha-ui-flat-on .retro-shell{border-radius:0}
  body.baha-ui-flat-on .messages-inbox{padding:10px 12px}
  body.baha-ui-flat-on .messages-inbox .message-view-tabs>a{font-size:.82rem;padding:9px 4px}
}
