/*
 * VOXLY_PROFILE_VOICE_CONTROLS_0181821
 *
 * Compact icon controls inside the bottom user/profile box.
 */


/* Allow the footer to hold profile info + compact voice icons. */

.user-panel {
    position: relative;
}


/* Existing control group, relocated into profile footer. */

.user-panel
#voxlyCompactVoiceControls.voxly-profile-voice-controls {
    display: flex;

    flex: 0 0 auto;

    align-items: center;

    gap: 5px;

    width: auto;

    margin-left: auto;
    margin-right: 6px;

    padding: 0;

    background: transparent;

    border: 0;
}


/*
 * Override old large-button styles.
 */

.user-panel
#voxlyCompactVoiceControls.voxly-profile-voice-controls
.voice-button {

    position: relative;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    flex: 0 0 32px;

    width: 32px;
    height: 32px;

    min-width: 32px;
    min-height: 32px;

    padding: 0 !important;
    margin: 0 !important;

    border:
        1px solid
        var(--border) !important;

    border-radius: 8px;

    background:
        var(--panel-2) !important;

    color:
        var(--text) !important;

    /*
     * Hide the changing text label without changing
     * textContent. voice.js can continue using its labels
     * exactly as before.
     */
    font-size: 0 !important;

    cursor: pointer;
}


/* Icons are CSS generated, so voice.js can keep changing text. */

.user-panel
#voxlyCompactVoiceControls
[data-voxly-voice-role="mute"]::before {
    content: "🎙";

    font-size: 15px;
    line-height: 1;
}


.user-panel
#voxlyCompactVoiceControls
[data-voxly-voice-role="screen"]::before {
    content: "▣";

    font-size: 17px;
    line-height: 1;
}


.user-panel
#voxlyCompactVoiceControls
[data-voxly-voice-role="leave"]::before {
    content: "↪";

    font-size: 18px;
    line-height: 1;
}


/* Hover follows current server theme. */

.user-panel
#voxlyCompactVoiceControls.voxly-profile-voice-controls
.voice-button:hover:not(:disabled) {

    background:
        var(--panel-3) !important;

    border-color:
        var(--accent) !important;

    color:
        var(--accent) !important;
}


/* Leave gets a danger hint on hover. */

.user-panel
#voxlyCompactVoiceControls
[data-voxly-voice-role="leave"]:hover:not(:disabled) {

    border-color:
        var(--danger) !important;

    color:
        var(--danger) !important;
}


/* Disabled states remain subtle. */

.user-panel
#voxlyCompactVoiceControls.voxly-profile-voice-controls
.voice-button:disabled {

    opacity: .35;

    cursor: default;
}


/*
 * Cancel old two-column / full-width voice sidebar layout.
 */

.user-panel
#voxlyCompactVoiceControls[style*="display: flex"]
.voice-button {

    width: 32px !important;
    flex: 0 0 32px !important;
}


/*
 * The relocated buttons should never consume a second row
 * individually.
 */

.user-panel
#voxlyCompactVoiceControls
.voice-button {

    grid-column: auto !important;
}


/* Small screens: keep controls compact. */

@media (max-width: 900px) {

    .user-panel
    #voxlyCompactVoiceControls.voxly-profile-voice-controls {

        gap: 3px;

        margin-right: 3px;
    }


    .user-panel
    #voxlyCompactVoiceControls.voxly-profile-voice-controls
    .voice-button {

        width: 30px;
        height: 30px;

        min-width: 30px;
        min-height: 30px;

        flex-basis: 30px;
    }
}
