/* Header usuário logado — estilo Mercado Livre mobile */

#menu:has(> a.entrar.usuario-nome) > a.logo {
  margin-right: auto;
}

#menu > a.entrar:not(.usuario-nome),
#menu .menu section a[href*="entrar"] {
  display: none !important;
}

#menu > a.entrar.usuario-nome {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  background: none !important;
  background-image: none !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  text-indent: 0 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  overflow: visible !important;
  font-size: inherit !important;
  line-height: 1 !important;
  color: inherit !important;
  text-decoration: none !important;
  cursor: pointer;
  pointer-events: auto;
}

#menu > a.entrar.usuario-nome::before,
#menu > a.entrar.usuario-nome::after {
  display: none !important;
  content: none !important;
}

.hdr-user {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 118px;
}

.hdr-user__avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  color: rgba(0, 0, 0, 0.9);
  font-family: var(--ml-font);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
}

#menu > a.entrar.usuario-nome .hdr-nome {
  display: block;
  font-family: var(--ml-font);
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.9);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 64px;
}

.hdr-user__chevron {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  color: rgba(0, 0, 0, 0.55);
  margin-left: -0.1rem;
}

#menu > a.hdr-contato {
  flex-shrink: 0;
  margin-left: 0.75rem;
  font-family: var(--ml-font);
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.9);
  text-decoration: none;
  white-space: nowrap;
}

#menu > a.hdr-contato:hover {
  color: rgba(0, 0, 0, 0.9);
}

@media (min-width: 768px) {
  .hdr-user {
    max-width: 150px;
  }

  #menu > a.entrar.usuario-nome .hdr-nome {
    max-width: 90px;
  }

  #menu > a.hdr-contato {
    margin-left: 1rem;
  }
}
