/* Phase 3 reuses the prototype's layout and adds only live data affordances. */
.social-pages{margin-block:20px;justify-content:center}
.chat-list>div[data-conversation-rows]{min-width:0}
.conversation-row .od-field{min-width:0}
.chat-sync{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:8px}
.chat-sync[hidden]{display:none}
.chat-top>a.od-row{color:var(--fg)}
.chat-messages>.message{min-width:0}
.unavailable-card{color:var(--muted)}
.chat-list .social-pages{padding:8px;font-size:12px;gap:8px;flex-wrap:wrap}
.chat-list .social-pages button{font-size:12px;padding:8px;min-height:36px}
a[href="#/chats"] [data-chat-unread]{font-size:10px;min-width:18px;padding:0 5px}
.avatar img{height:100%;object-fit:cover}
[data-profile-avatar] .avatar{width:64px;min-height:64px}
[data-avatar-status]{min-height:24px}
@media(max-width:767px){.nav-mobile a[href="#/chats"]{position:relative}.nav-mobile [data-chat-unread]{position:absolute;top:0;left:55%}}

/* On a phone, give the conversation the available screen instead of scrolling
   the page heading and site chrome above a small message window. */
@media(max-width:767px){
 body:has(.chat-page.active-chat){--chat-nav-height:calc(65px + env(safe-area-inset-bottom));overflow:hidden}
 body:has(.chat-page.active-chat) .site-header,
 body:has(.chat-page.active-chat) #footer{display:none}
 body:has(.chat-page.active-chat) .site-main{min-height:0;padding:0}
 body:has(.chat-page.active-chat) .nav-mobile{
  top:calc(var(--chat-visible-top,0px) + var(--chat-visible-height,100dvh) - var(--chat-nav-height));bottom:auto
 }
 .chat-page.active-chat{
  position:fixed;left:0;right:0;top:var(--chat-visible-top,0px);
  height:calc(var(--chat-visible-height,100dvh) - var(--chat-nav-height));
  padding-block:8px;overflow:hidden
 }
 .chat-page.active-chat>.page-heading,
 .chat-page.active-chat .chat-compose label{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip-path:inset(50%);white-space:nowrap
 }
 .chat-page.active-chat .chat-layout{height:100%;min-height:0}
 .chat-page.active-chat .chat-context{padding-block:8px}
 .chat-page.active-chat .chat-context img{max-height:64px;object-fit:contain}
 .chat-page.active-chat .chat-compose{padding-block:8px}
 .chat-page.active-chat .compose-row textarea{height:52px;min-height:52px;max-height:96px;padding-block:10px;resize:none}
 .chat-page.active-chat.chat-short .chat-context{display:none}
}

.chat-context-summary,.chat-recommend-compact{display:none}
@media(max-width:767px){
 .chat-page.active-chat .chat-screen{grid-template-columns:minmax(0,1fr)}
 .chat-page.active-chat .chat-screen>header{min-width:0}
 .chat-page.active-chat .chat-compose{grid-template-columns:minmax(0,1fr)}
 .chat-page.active-chat .chat-compose form{min-width:0}
 .chat-page.active-chat .chat-top>a.od-row{min-width:0}
 .chat-page.active-chat .chat-top strong{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 .chat-page.active-chat .chat-context{padding-block:0}
 .chat-page.active-chat .chat-context-summary{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;padding:0;border:0;background:transparent;color:var(--fg);text-align:left}
 .context-summary-title{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:14px}
 .context-summary-meta{flex:none;white-space:nowrap;font-size:12px}
 .chat-context-summary .icon{width:16px;height:16px;flex:none;transform:rotate(90deg)}
 .chat-context-summary[aria-expanded="true"] .icon{transform:rotate(-90deg)}
 .chat-page.active-chat .chat-context-card{display:none;padding-bottom:8px}
 .chat-page.active-chat .chat-context-card.is-expanded{display:block}
 body:has(.chat-page.active-chat.chat-short){--chat-nav-height:0px}
 body:has(.chat-page.active-chat.chat-short) .nav-mobile{display:none}
 .chat-page.active-chat.chat-short{padding-block:4px}
 .chat-page.active-chat.chat-short .chat-top{padding-block:4px}
 .chat-page.active-chat.chat-short .chat-top .body-sm{display:none}
 .chat-page.active-chat.chat-short .chat-compose{padding-block:6px}
 .chat-page.active-chat.chat-short .compose-row textarea{height:44px;min-height:44px;padding-block:6px}
 .chat-page.active-chat.chat-short .compose-tools{display:none}
 .chat-page.active-chat.chat-short .chat-recommend-compact{display:inline-flex;flex:none}
}

/* Notification and manual-work attention indicators. */
.attention-anchor{position:relative}
.attention-badge{background:#c62828!important;color:#fff;min-width:18px;font-size:11px;line-height:18px;text-align:center;padding:0 5px;border-radius:10px;flex:none}
.header-account .icon-btn.attention-anchor .attention-badge{position:absolute;top:-3px;right:-4px}
.nav-mobile .attention-anchor .attention-badge{position:absolute;top:1px;right:calc(50% - 28px)}
.admin-sidebar .attention-badge{margin-left:6px}
.attention-status{margin-bottom:16px;color:var(--muted)}
.attention-unread-label{color:#c62828;font-weight:600;margin-left:12px}
.notice-tools{margin-bottom:16px}