from bs4 import BeautifulSoup

def find_elements_by_css_class(html: str, target_class: str) -> list:
    soup = BeautifulSoup(html or "", "html.parser")
    results = []

    for tag in soup.find_all(class_=target_class):
        tag_name = tag.name
        attributes = {k: v for k, v in tag.attrs.items() if k.startswith("data-")}
        class_list = tag.get("class", [])
        results.append({
            "tag": tag_name,
            "data_attrs": attributes,
            "class": class_list,
            "full_html": str(tag)[:500] + "..."  # limit dla czytelności
        })

    return results
