/* CoolSpeak channel layout. The underlying account/message components stay intact. */
.cpd-theme-dark{--cpd-color-bg-canvas-default:#313338;--cpd-color-bg-subtle-primary:#2b2d31;--cpd-color-bg-subtle-secondary:#232428;--cpd-color-text-primary:#f2f3f5;--cpd-color-text-secondary:#b5bac1;--cpd-color-border-interactive-primary:#5865f2}
.cpd-theme-dark .mx_SpacePanel{background:#1e1f22!important;border-right:0;padding-top:12px}
.cpd-theme-dark .mx_SpacePanel .mx_SpaceTreeLevel{padding-inline:8px}
.cpd-theme-dark .mx_RoomListPanel{background:#2b2d31!important;border-right:1px solid #202225;padding-top:8px}
.cpd-theme-dark .mx_RoomListPanel header{min-height:52px;border-bottom:1px solid #202225;margin-bottom:8px}
.cpd-theme-dark .mx_RoomListPanel [role=treegrid]{padding:0 8px}
.cpd-theme-dark .mx_RoomListPanel [role=row][aria-level="1"]{color:#949ba4;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.7px;padding-top:10px}
.cpd-theme-dark .mx_RoomListItemView{border-radius:5px!important;min-height:38px!important;color:#b5bac1!important;padding:6px 10px!important}
.cpd-theme-dark .mx_RoomListItemView:hover{background:#35373c!important;color:#dbdee1!important}
.cpd-theme-dark .mx_RoomListItemView_selected{background:#404249!important;color:#fff!important;box-shadow:inset 3px 0 #5865f2}
.cpd-theme-dark .mx_RoomListPanel [role=listbox]{gap:4px;padding:8px}
.cpd-theme-dark .mx_RoomListPanel [role=option]{font-size:11px;border-radius:5px}
.cpd-theme-dark .mx_RoomView,.cpd-theme-dark .mx_RoomView_body,.cpd-theme-dark .mx_RoomView_timeline{background:#313338!important}
.cpd-theme-dark .mx_RoomHeader{background:#313338!important;min-height:56px!important;border-bottom:1px solid #26272b!important;box-shadow:0 1px 2px #0002}
.cpd-theme-dark .mx_MessageComposer{background:#313338!important;padding:8px 16px 16px!important}
.cpd-theme-dark .mx_MessageComposer_wrapper{background:#383a40!important;border-radius:8px!important;border:0!important;padding:8px 12px}
.cpd-theme-dark .mx_RoomView_statusArea{background:#313338!important}
.cpd-theme-dark .mx_EventTile:hover{background:#2e3035!important}
.cpd-theme-dark .mx_RightPanel,.cpd-theme-dark .mx_MemberList{background:#2b2d31!important}
.cpd-theme-dark .mx_AppTileMenuBar{background:#232428!important;border-radius:8px 8px 0 0;border-bottom:1px solid #3f4147}
.cpd-theme-dark .mx_AppTileFullWidth{border-radius:8px!important;overflow:hidden;border:1px solid #3f4147}
.mx_RoomView_body{display:flex;flex-direction:column;min-height:0}
.mx_RoomView_body>.mx_RoomHeader{order:0;flex-shrink:0}
.mx_RoomView_body>.mx_AuxPanel{order:1}
.mx_RoomView_body>.mx_RoomView_timeline{order:2;min-height:0;flex:1}
.mx_RoomView_body>.mx_RoomView_statusArea{order:3;flex-shrink:0}
.mx_RoomView_body>.mx_MessageComposer{order:4;flex-shrink:0}
/* Voice is docked below chat, with its own scroll area on smaller screens. */
.mx_RoomView_body>.mx_AuxPanel:has(#coolspeak-voice){order:5;flex-shrink:0;max-height:265px;margin:0 12px 10px;overflow:auto}
.mx_AuxPanel:has(#coolspeak-voice) .mx_AppsDrawer{max-height:260px!important;min-height:250px}
.mx_AuxPanel:has(#coolspeak-voice) #coolspeak-voice{min-height:240px}
/* Old call-history buttons must not send users back into ringing calls. */
.mx_RoomView_body:has(#coolspeak-voice) .mx_LegacyCallEvent_content_button{display:none!important}
@media(max-width:700px){.mx_RoomView_body>.mx_AuxPanel:has(#coolspeak-voice){max-height:240px;margin:0 5px 5px}.mx_MessageComposer{padding-inline:8px!important}}
@media(min-width:1000px){div:has(>.mx_LeftPanel_panel>.mx_LeftPanel_outerWrapper){flex:0 0 248px!important}}
/* Collapsing controls never hides or destroys the media iframe. */
.cs-voice-collapsed .mx_RoomView_body>.mx_AuxPanel:has(#coolspeak-voice){height:155px!important;max-height:155px!important}
.cs-voice-collapsed .mx_AuxPanel:has(#coolspeak-voice) .mx_AppsDrawer{height:150px!important;min-height:150px!important;max-height:150px!important}
.cs-voice-collapsed .mx_AuxPanel:has(#coolspeak-voice) #coolspeak-voice{height:140px!important;min-height:140px!important}
