/* P2PARTY UI-only patch — centered participant avatars.
   Layer this AFTER styles.css and voice-aura CSS.
   No WebRTC, audio, camera, crypto, or server behavior is changed.
*/

/* Any non-video avatars beneath a video wall remain centered horizontally. */
.room .stage > #avatarsStrip:not(.hidden) {
  width: 100%;
  min-width: 0;
  justify-content: center;
  align-items: center;
  align-content: center;
  gap: clamp(8px, 1.4vw, 18px);
}

/* When nobody has camera/screen enabled, this becomes the main stage.
   Override the mobile 'max-height:100px; flex:none' avatar strip rules too. */
.room .stage > #videos.empty + #avatarsStrip:not(.hidden) {
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  flex-wrap: wrap;
  justify-content: safe center;
  align-content: safe center;
  align-items: center;
}

/* On small screens, preserve the dock and use the available free space only.
   The stage already reserves room for controls via padding-bottom. */
@media (max-width:700px) {
  .room .stage > #videos.empty + #avatarsStrip:not(.hidden) {
    flex: 1 1 0;
    max-height: none;
  }
}
