Typically women and men in Morocco wear the traditional all covered “Jelaba” . In addition, women typically wear scarves “Hijab” (to cover the hair) while older men wear hats. However, in the more metropolitan area’s western style clothing is the norm. Younger generations, professional women wear western suits in the business world, and transition to more western clothing (shirts/blouses, tank tops, jeans, shorts, skirts, etc) in a more relaxed environment. Similarly professional young men wear western style suits, shirts and jeans, shorts, etc. The choice of clothing depends largely on location (town/city) age, economic status and occupation of the individuals.
As a Surfer visiting a beach destination it is acceptable to wear a 1 or 2-piece bathing suit while at the beach. Local people who might get offended, do not often go to the beach.
Dress appropriately on tours of mosques, holy places and small, rural village .You should be respectful of local culture and will need to dress conservatively. If you don’t know, what’s appropriate, watch the locals.