/* Final voice-experience QOL layer */
.app-shell.rift-voice-experience #member-toggle{display:none!important}
.rvc-chat-composer.rvc-chat-composer-clean{grid-template-columns:minmax(0,1fr) 34px!important}
.rvc-chat-composer.rvc-chat-composer-clean .rvc-chat-send{justify-self:end}
.rvc-chat-composer.rvc-chat-composer-clean textarea{padding-left:8px}
.rvc-stage>.rvc-callbar{margin-top:2px}
.rvc-grid.single .rvc-participant{width:min(100%,720px);justify-self:center}
.rvc-participant:has(.rvm-tile-media.screen){background:#08090c}
.rvc-participant:has(.rvm-tile-media.screen) .rvc-participant-footer{padding:3px 5px;border-radius:6px;background:rgba(7,8,10,.68);right:auto;max-width:calc(100% - 24px)}
.rvc-participant:has(.rvm-tile-media.camera) .rvc-participant-footer{padding:3px 5px;border-radius:6px;background:rgba(7,8,10,.58);right:auto;max-width:calc(100% - 24px)}
.rvc-header-chat.active{color:#fff!important;background:#262a31!important}
.rvc-call-control.active:not(.danger){box-shadow:inset 0 0 0 1px rgba(78,223,140,.18)}
.rvm-mic-test:has([data-rvm-mic-test]) .rvm-meter{box-shadow:inset 0 0 0 1px rgba(255,255,255,.035)}

/* The rebuilt voice page still carries the old ui0212 class for compatibility.
   Retire the legacy four-row voice-page geometry here so it cannot squash the
   new rvc-layout into the old 44px header row and leave a giant empty panel. */
.app-shell.rift-voice-experience .voice-view{background:var(--cleanup-main,#101218)!important}
.rvc-page.ui0212-voice-page,
.rvc-page.ui0212-voice-page.joined,
.rvc-page.ui0212-voice-page.empty{
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  grid-template-rows:none!important;
  grid-template-columns:none!important;
  background:var(--cleanup-main,#101218)!important;
  overflow:hidden!important;
}
.rvc-page.ui0212-voice-page>.rvc-layout{
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
}
.rvc-page .rvc-stage{
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  background:var(--cleanup-main,#101218)!important;
}
.rvc-page .rvc-grid{
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  justify-self:stretch!important;
  align-self:stretch!important;
}

/* Voice chat is a compact normal channel, not a second messaging design. */
.rvc-parity-message-list>.message{
  grid-template-columns:40px minmax(0,1fr)!important;
  gap:12px!important;
  padding:3px 14px!important;
}
.rvc-parity-message-list>.message>.avatar{
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  border-radius:13px!important;
  font-size:12px!important;
}
.rvc-parity-message-list .message-meta{gap:7px!important;margin-bottom:3px!important}
.rvc-parity-message-list .message-author{font-size:12px!important;font-weight:650!important}
.rvc-parity-message-list .message-time,.rvc-parity-message-list .rvc-edited{font-size:9px!important}
.rvc-parity-message-list .message-text{
  font-size:var(--rift-chat-text-size,13px)!important;
  line-height:1.5!important;
  white-space:pre-wrap!important;
  word-break:break-word!important;
  margin-top:0!important;
}
.rvc-parity-composer{
  grid-template-columns:36px minmax(0,1fr) auto!important;
  min-height:44px!important;
  margin:0 10px 10px!important;
  padding:4px 5px!important;
  border-radius:12px!important;
  background:var(--bg-4,#1d2129)!important;
}
.rvc-parity-composer textarea{
  min-height:34px!important;
  padding:7px 6px!important;
  font-size:13px!important;
  line-height:1.45!important;
}
.rvc-parity-composer .composer-action,.rvc-parity-tools button{width:32px!important;height:32px!important;min-width:32px!important}
.rvc-parity-composer .send-button{display:none!important}

/* Discord-style message grouping: one identity block for consecutive messages. */
.message.rift-message-continuation{padding-top:1px!important;padding-bottom:1px!important;min-height:24px}
.message.rift-message-continuation>.avatar{visibility:hidden!important;pointer-events:none!important}
.message.rift-message-continuation .message-meta{display:none!important}
.message.rift-message-continuation::before{
  content:attr(data-rift-continuation-time);
  position:absolute;
  left:4px;
  top:4px;
  width:50px;
  text-align:center;
  color:var(--muted-2,#606773);
  font-size:8px;
  opacity:0;
  pointer-events:none;
}
.message.rift-message-continuation:hover::before{opacity:1}
.rvc-parity-message-list>.message.rift-message-continuation{grid-template-columns:40px minmax(0,1fr)!important;padding-top:1px!important;padding-bottom:1px!important}
.rvc-parity-message-list>.message.rift-message-continuation::before{left:0;top:4px;width:52px}

/* Authoritative speaking state. Only actual VC participant surfaces receive it. */
.rvc-participant .rvc-avatar,.voice-member-row .voice-member-avatar,.voice-person-card .voice-person-avatar{transition:box-shadow .12s ease,outline-color .12s ease,transform .12s ease}
.rvc-participant.rift-speaking .rvc-avatar,
.voice-person-card.rift-speaking .voice-person-avatar{
  box-shadow:0 0 0 3px #23a55a,0 0 0 5px rgba(35,165,90,.16)!important;
}
.voice-member-row.rift-speaking .voice-member-avatar{
  box-shadow:0 0 0 2px #23a55a,0 0 0 4px rgba(35,165,90,.13)!important;
}
.rvc-participant.rift-speaking:has(.rvm-tile-media.camera){box-shadow:inset 0 0 0 2px #23a55a!important}
.rvc-participant.rift-speaking:has(.rvm-tile-media.camera) .rvm-tile-media.camera{outline:2px solid #23a55a;outline-offset:-2px}
.rvc-participant.rift-speaking:has(.rvm-tile-media.screen){box-shadow:none!important}
.rift-voice-live{
  margin-left:auto;
  flex:0 0 auto;
  padding:2px 4px;
  border-radius:4px;
  background:#da373c;
  color:#fff;
  font-size:8px;
  font-weight:800;
  letter-spacing:.04em;
}
.voice-member-row.rift-voice-reconnecting{opacity:.66}
.voice-member-row.rift-voice-reconnecting::after{content:'Reconnecting';margin-left:auto;color:#949ba5;font-size:8px}
#r021-voice-bar.rift-voice-reconnecting strong{color:#f0b232!important}
.rvc-participant.rift-voice-reconnecting{opacity:.72}

html[data-rift-effective-theme='light'] .rvc-header-chat.active{background:#dbe0e6!important;color:#20262d!important}
html[data-rift-effective-theme='light'] .rvc-participant:has(.rvm-tile-media.screen) .rvc-participant-footer,html[data-rift-effective-theme='light'] .rvc-participant:has(.rvm-tile-media.camera) .rvc-participant-footer{background:rgba(255,255,255,.82)}
html[data-rift-effective-theme='light'] .rvc-participant:has(.rvm-tile-media) .rvc-participant-footer strong{color:#20252c!important}
html[data-rift-effective-theme='light'] .app-shell.rift-voice-experience .voice-view,
html[data-rift-effective-theme='light'] .rvc-page.ui0212-voice-page,
html[data-rift-effective-theme='light'] .rvc-page .rvc-stage{background:#eef0f3!important}
html[data-rift-effective-theme='light'] .rvc-parity-composer{background:#fff!important}
html[data-rift-effective-theme='light'] .message.rift-message-continuation::before{color:#707986!important}
