/* =========================================================
   VOXLY VOICE PRESENCE v0.8.2
   ========================================================= */

.voxly-server-voice-roster {
    margin: 2px 8px 8px 29px;
    font-size: 11px;
    color: var(--muted);
}

.voxly-server-voice-user {
    padding: 3px 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voxly-live-badge {
    margin-left: 5px;
    font-size: 9px;
    font-weight: 800;
    color: #ff5c72;
}


/* Fix crowded bottom-left controls */

#voxlyCompactVoiceControls {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 5px !important;
}

#voxlyCompactVoiceControls .voice-button {
    width: 100% !important;
    min-width: 0 !important;
}

#voxlyCompactVoiceControls
#voxlyCompactShareButton {
    grid-column: 1 / -1;
}


/* =========================================================
   VOXLY SAFE SIDEBAR v0.8.4
   ========================================================= */

/*
 * Server-backed presence is now authoritative.
 * Never show the older local LiveKit roster.
 */
#voxlyVoiceParticipants {
    display: none !important;
}

/*
 * IMPORTANT: the actual voice JS sets this container to
 * display:none or display:flex depending on connection state.
 * These selectors preserve that state instead of overriding it.
 */
#voxlyCompactVoiceControls[style*="display: none"] {
    display: none !important;
}

#voxlyCompactVoiceControls[style*="display: flex"] {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 7px !important;
    width: 100% !important;
    margin: 0 !important;
}

#voxlyCompactVoiceControls[style*="display: flex"] .voice-button {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 8px 5px !important;
    font-size: 10px !important;
}

/* Share Screen gets its own full-width second row. */
#voxlyCompactVoiceControls[style*="display: flex"] #voxlyCompactShareButton {
    grid-column: 1 / -1 !important;
}

/*
 * When disconnected, the original Join Voice button is the
 * only control that should be visible.
 */
.voice-sidebar-panel .voice-card > .voice-button {
    width: 100% !important;
    margin: 0 !important;
    padding: 8px 6px !important;
    font-size: 10px !important;
}

/* Cleaner server-backed users beneath Lounge. */
.voxly-server-voice-roster {
    margin: 3px 8px 9px 29px !important;
    padding: 0 !important;
}

.voxly-server-voice-user {
    padding: 4px 2px !important;
    line-height: 1.25 !important;
}
