.hq-sync-dokumente {
    display: flex;
    flex-direction: column;
    gap: 100px;
}

.hq-sync-dokumente__gruppe {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hq-sync-dokumente__kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--wp--preset--color--tinte);
    padding: 12px 16px;
    border-radius: 0;
}

.hq-sync-dokumente__titel {
    margin: 0;
    font-size: 1.3em;
    color: var(--wp--preset--color--flaeche);
}

.hq-sync-dokumente__suche {
    min-width: 240px;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--wp--preset--color--linie);
    border-radius: 0;
    font-size: 0.95em;
    font-family: inherit;
}

.hq-sync-dokumente__aktionen {
    display: flex;
    gap: 8px;
}

.hq-sync-dokumente__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--wp--preset--color--signal);
    color: var(--wp--preset--color--flaeche);
    border-radius: 0;
    text-decoration: none;
    flex-shrink: 0;
}

/* !important + Eltern-Kontext (3 Klassen) noetig: Die Theme-Bruecke
   (assets/css/components.css, [class*="__button"]) erzwingt Hintergrund-
   /Rahmenfarbe per !important OHNE Ruecksicht auf :hover/:focus - ohne
   Gegen-!important blieb der Button beim Hovern optisch inaktiv (immer
   Vereinsrot, nie das vorgesehene Navy). */
.hq-sync-dokumente .hq-sync-dokumente__button:hover,
.hq-sync-dokumente .hq-sync-dokumente__button:focus {
    background: var(--wp--preset--color--tinte) !important;
    border-color: var(--wp--preset--color--tinte) !important;
    color: var(--wp--preset--color--flaeche) !important;
}

.hq-sync-dokumente__icon {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.hq-sync-dokumente__tabelle {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background: var(--wp--preset--color--flaeche);
}

.hq-sync-dokumente__tabelle th,
.hq-sync-dokumente__tabelle td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--wp--preset--color--linie-fein);
    overflow-wrap: break-word;
}

.hq-sync-dokumente__tabelle thead th {
    background: var(--wp--preset--color--flaeche);
    border-bottom: 2px solid var(--wp--preset--color--tinte);
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--wp--preset--color--text-leise);
}

/* Feste, ueber alle Kategorie-Tabellen identische Spaltenbreiten (nur
   oberhalb des Mobile-Breakpoints, siehe @media weiter unten) — sonst
   richtet sich die Breite je Tabelle nach deren eigenem laengsten Inhalt
   und Datum/Groesse/Aktionen stehen zwischen den Kategorien versetzt. */
@media (min-width: 641px) {
    .hq-sync-dokumente__tabelle th:nth-child(1),
    .hq-sync-dokumente__tabelle td:nth-child(1) {
        width: 55%;
    }

    .hq-sync-dokumente__tabelle th:nth-child(2),
    .hq-sync-dokumente__tabelle td:nth-child(2) {
        width: 16%;
    }

    .hq-sync-dokumente__tabelle th:nth-child(3),
    .hq-sync-dokumente__tabelle td:nth-child(3) {
        width: 14%;
    }

    .hq-sync-dokumente__tabelle th:nth-child(4),
    .hq-sync-dokumente__tabelle td:nth-child(4) {
        width: 15%;
    }
}

.hq-sync-dokumente__tabelle tbody tr:hover {
    background: var(--wp--preset--color--flaeche-gesenkt);
}

.hq-sync-hinweis {
    color: var(--wp--preset--color--text-leise);
}

@media (max-width: 640px) {
    .hq-sync-dokumente__tabelle thead {
        display: none;
    }

    .hq-sync-dokumente__tabelle,
    .hq-sync-dokumente__tabelle tbody,
    .hq-sync-dokumente__tabelle tr,
    .hq-sync-dokumente__tabelle td {
        display: block;
        width: 100%;
    }

    .hq-sync-dokumente__tabelle tr {
        margin-bottom: 12px;
        border: 1px solid var(--wp--preset--color--linie-fein);
        border-radius: 0;
        padding: 8px 12px;
    }

    .hq-sync-dokumente__tabelle td[data-label] .hq-sync-dokumente__aktionen {
        margin-top: 4px;
    }

    .hq-sync-dokumente__tabelle td {
        border-bottom: none;
        padding: 4px 0;
    }

    .hq-sync-dokumente__tabelle td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.75em;
        text-transform: uppercase;
        color: var(--wp--preset--color--text-leise);
    }
}
