﻿.members-dropdown-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

    /* Fondo del trigger cuando el dropdown está visible */
    .members-dropdown-wrapper .members-trigger {
        height: 27px;
        border-radius: 34px;
        gap: 5px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        transition: background 0.2s ease;
    }

    .members-dropdown--visible ~ .members-trigger,
    .members-dropdown-wrapper:has(.members-dropdown--visible) .members-trigger {
        background: rgba(50, 50, 50, 0.1);
    }


.members-dropdown {
    position: absolute;
    top: calc(100% + 9px);
    left: -19px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    width: 240px; /* ancho FIJO en lugar de min-width */
    z-index: 100;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    isolation: isolate;
    will-change: opacity, transform; /* optimización GPU */
}

.members-dropdown--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.members-list {
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
    padding-top: 12px;
    padding-bottom: 12px;
}

@media (min-height: 960px) {
    /* height MUST be in px for MudVirtualize to work */
    .members-list {
        height: 204px;
    }
}

@media (max-height: 960px) {
    .members-list {
        height: 560px;
    }
}

@media (min-height: 880px) and (max-height: 929.98px) {
    .members-list {
        height: 530px;
    }
}

@media (min-height: 820px) and (max-height: 879.98px) {
    .members-list {
        height: 500px;
    }
}

@media (min-height: 750px) and (max-height: 819.98px) {
    .members-list {
        height: 450px;
    }
}

@media (max-height: 749.98px) {
    .members-list {
        height: 400px;
    }
}

.member-row {
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* avatar a la derecha, nombre a la izquierda */
    padding: 0 15px;
    gap: 10px;
    box-sizing: border-box;
}

.member-name {
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.members-dropdown .mud-avatar.mud-avatar-small {
    width: 33px;
    height: 33px;
}

    .members-dropdown .mud-avatar.mud-avatar-small .mud-image {
        width: 33px;
        height: 33px;
    }
