/* USER DROPDOWN - SOLUZIONE ROBUSTA */
.user-dropdown-wrapper {
    position: relative;
    display: inline-block;
    z-index: 10;
}

.username-link {
    cursor: pointer;
    font-weight: 600;
    color: #333;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background 0.2s;
}

    .username-link:hover {
        background: rgba(0, 0, 0, 0.05);
    }

    .username-link.moderator {
        color: #e74c3c !important;
        font-weight: bold;
    }

        .username-link.moderator:hover {
            background: rgba(231, 76, 60, 0.1);
        }

/* Dropdown */
.user-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 6px;
    background: white;
    min-width: 200px;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #e1e1e1;
    z-index: 9999;
    animation: dropdownFade 0.2s ease;
}

    .user-dropdown-content.show {
        display: block;
    }

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Freccia */
.user-dropdown-content::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 12px;
    border: 8px solid transparent;
    border-bottom-color: white;
    filter: drop-shadow(0 -1px 1px rgba(0,0,0,0.1));
}

/* Header */
.user-dropdown-header {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    background: #f8f9fa;
}

    .user-dropdown-header .username {
        font-weight: 600;
        color: #2c3e50;
        font-size: 1em;
    }

    .user-dropdown-header .user-role {
        font-size: 0.8em;
        color: #7f8c8d;
        margin-top: 2px;
    }

/* Items */
.user-dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    color: #2c3e50;
    font-size: 0.9em;
    transition: background 0.2s;
}

    .user-dropdown-item:hover {
        background: #f0f7ff;
        color: #3498db;
    }

    .user-dropdown-item i {
        width: 18px;
        margin-right: 8px;
        text-align: center;
        font-size: 0.95em;
    }

    .user-dropdown-item.follow-btn {
        color: #3498db;
        font-weight: 500;
    }

    .user-dropdown-item.promote-btn {
        color: #e74c3c;
        font-weight: 500;
    }

    .user-dropdown-item:disabled {
        color: #bdc3c7;
        cursor: not-allowed;
    }

        .user-dropdown-item:disabled:hover {
            background: none;
            color: #bdc3c7;
        }
