/* Room conversations: clear identity, quiet state and a way back to new activity. */
.forum-room-live-meta{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-width:0;margin-top:4px;color:var(--muted);font-size:11px;line-height:1.3}
.forum-live-counts{display:inline-flex;align-items:center;gap:4px;border:0;background:none;color:var(--muted);padding:0;min-height:0;font:inherit;}

.forum-connection{display:inline-flex;align-items:center;gap:5px;font-weight:650;white-space:nowrap}
.forum-connection>i{width:6px;height:6px;background:var(--muted);border-radius:50%;flex:none;opacity:.65}
.forum-chat[data-connection-state=live] .forum-connection>i{background:var(--green);opacity:1}
.forum-chat[data-connection-state=live] .forum-connection{color:var(--green)}
.forum-chat[data-connection-state=reconnecting] .forum-connection,.forum-chat[data-connection-state=offline] .forum-connection{color:var(--accent)}
.forum-chat .forum-jump-latest{position:absolute;bottom:var(--forum-jump-bottom,86px);left:50%;transform:translateX(-50%);z-index:8;display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--accent);box-shadow:0 5px 20px color-mix(in srgb,var(--ink) 12%,transparent);min-height:40px;padding:9px 16px;font-size:12px;font-weight:700;white-space:nowrap;cursor:pointer;transition:background .2s,border-color .2s}
.forum-chat .forum-jump-latest[hidden]{display:none!important}.forum-chat .forum-jump-latest:hover{background:var(--lavender);border-color:var(--accent)}.forum-jump-latest .icon{width:16px;height:16px}
.forum-chat .forum-message-list:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
.forum-day-divider{display:flex;align-items:center;gap:14px;justify-content:center;margin:20px 0 16px;color:var(--muted);font-size:11px;line-height:1.4;pointer-events:none;clear:both}
.forum-day-divider:first-child{margin-top:4px}.forum-day-divider::before,.forum-day-divider::after{content:'';height:1px;flex:1;background:color-mix(in srgb,var(--line) 65%,transparent);max-width:120px}.forum-day-divider>span{border:1px solid var(--line);padding:5px 12px;border-radius:99px;background:color-mix(in srgb,var(--surface) 90%,transparent);font-weight:550}
.forum-chat .forum-send-retry{display:inline-flex;align-items:center;justify-content:center;min-height:36px;border:1px solid color-mix(in srgb,var(--accent) 35%,var(--line));border-radius:9px;background:var(--surface);color:var(--accent);padding:7px 11px;margin-top:4px;font-size:12px;line-height:1.4;font-weight:650;cursor:pointer;transition:background .2s}
.forum-chat .forum-send-retry:hover{background:var(--lavender)}
@media(max-width:900px){.has-active-chat .forum-chat-heading{min-height:74px!important}.forum-room-live-meta{font-size:10px;margin-top:2px;gap:8px}.forum-live-counts{min-height:0}.forum-chat .room-topic-line{max-width:100%;font-size:11px;line-height:1.3}.forum-chat .forum-jump-latest{min-height:38px;font-size:11px;padding:8px 13px}}
@media(max-width:420px){.forum-room-live-meta{gap:6px}.forum-live-counts{gap:3px}.forum-live-counts>span[aria-hidden]{margin-inline:1px}}

/* The back link and conversation share the available height rather than both claiming 100%. */
@media(max-width:900px){
 .has-active-chat .community-room-page{display:flex;flex-direction:column}
 .has-active-chat .community-room-page>.back-link{flex:0 0 auto}
 .has-active-chat .community-room-page>.community-room-layout{flex:1 1 0;height:auto!important;min-height:0!important}
}

@media(max-width:900px){.has-active-chat .community-room-page{height:var(--forum-page-height,calc(100dvh - 84px))!important;max-height:var(--forum-page-height,calc(100dvh - 84px))!important}}

/* Room header: the live line reads as one sentence and the header has room to breathe.
   The counts used to be an inline-flex box, which made every word ("2", "members",
   "·", "1", "online") its own flex item, spacing the sentence out word by word. */
.forum-live-counts{display:block}
.forum-room-live-meta{align-items:center;gap:9px;margin-top:2px}
.forum-room-live-meta .forum-connection,
.forum-room-live-meta .forum-live-counts{margin:0}
.forum-room-live-meta .forum-connection{align-self:center}

/* A community room fills the viewport below the top bar, so the header can never be
   scrolled under the browser chrome; only the message list scrolls. */
@media(min-width:901px){
  body.has-active-chat:has(.community-room-page){height:100dvh;overflow:hidden}
  .has-active-chat .community-room-page{height:calc(100dvh - 96px);max-height:calc(100dvh - 96px);overflow:hidden}
}

.has-active-chat .forum-chat-heading{gap:12px;flex:0 0 auto;align-items:center;overflow:visible;padding:10px 16px}
.has-active-chat .forum-chat-heading .forum-room-identity{min-width:0;align-items:center}
.has-active-chat .forum-chat-heading .forum-room-heading-meta{min-width:0;gap:3px}
.forum-room-title-row{flex-wrap:wrap;row-gap:4px}
.forum-room-title-row h1{min-width:0}
.room-badge-category{flex:none}
@media(max-width:900px){
  .forum-room-live-meta{gap:7px}
  .has-active-chat .forum-chat-heading{align-items:flex-start}
}

.forum-member-count-button{appearance:none;border:0;background:transparent;color:inherit;font:inherit;padding:2px 4px;border-radius:6px;cursor:pointer;transition:background .2s,color .2s}
.forum-member-count-button:hover{background:var(--lavender);color:var(--accent)}
.forum-member-count-button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}

/* Header counters are a text action, not a fixed-size icon button. */
.forum-chat .forum-chat-heading .forum-member-count-button{display:inline-flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center;justify-content:flex-start;flex:0 0 auto!important;width:auto!important;max-width:none!important;min-width:0!important;height:auto!important;min-height:24px!important;white-space:nowrap!important;line-height:1.3!important;padding:2px 4px!important;font-size:inherit!important;gap:4px!important}
.forum-chat .forum-chat-heading .forum-member-count-button>span{display:inline!important;flex:none!important;width:auto!important;margin:0!important;padding:0!important;line-height:inherit!important;font-size:inherit!important;white-space:nowrap!important}

/* Keep status, clickable counts and the description in a predictable reading order. */
body.has-active-chat .forum-chat .forum-room-heading-meta{display:grid!important;grid-template-columns:minmax(0,1fr)!important;row-gap:2px!important;min-width:0}
body.has-active-chat .forum-chat .forum-room-title-row{grid-column:1!important;grid-row:1!important}
body.has-active-chat .forum-chat .forum-room-live-meta{display:flex!important;grid-column:1!important;grid-row:2!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;overflow:visible!important;white-space:normal!important;line-height:1.4!important}
body.has-active-chat .forum-chat .forum-room-live-meta .forum-connection{display:inline-flex!important;align-items:center;gap:5px;flex:none;white-space:nowrap}
body.has-active-chat .forum-chat .forum-room-live-meta .forum-member-count-button{display:inline-flex!important;margin:0!important;gap:8px!important;padding:2px 4px!important}
body.has-active-chat .forum-chat .forum-member-count-button .forum-count-group{display:inline-block!important;white-space:nowrap!important}
body.has-active-chat .forum-chat .forum-member-count-button .forum-count-separator{color:var(--muted);opacity:.65}
body.has-active-chat .forum-chat .forum-room-heading-meta .room-topic-line{display:block!important;grid-column:1!important;grid-row:3!important;min-width:0;max-width:100%;margin:0!important;font-size:11px!important;line-height:1.4!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis}
body.has-active-chat .forum-chat .forum-room-heading-meta .room-topic-line::before{content:none!important}

body.has-active-chat .forum-chat .forum-member-count-button .forum-count-group [data-forum-member-count],body.has-active-chat .forum-chat .forum-member-count-button .forum-count-group [data-forum-online-count]{display:inline!important;font:inherit!important;line-height:inherit!important;margin:0!important;padding:0!important;width:auto!important;height:auto!important}
