.widget-div-table {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    display: table;
    width: 100%;
    border: 1px solid var(--color-border);
}

.widget-div-table-header {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    display: table-header-group;
    background: var(--color-table-header-bg);
}

.widget-div-table-row {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    display: table-row;
}

.widget-div-table-header .widget-div-table-row {
    display: table-row;
}

.widget-div-table-header-cell {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    display: table-cell;
    padding: 10px;
    border: 1px solid var(--color-border);
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget-div-table-body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    display: table-row-group;
}

.widget-div-table-body .widget-div-table-row {
    display: table-row;
}

.widget-div-table-body .widget-div-table-row:hover {
    background: var(--color-table-row-hover-bg);
}

.widget-div-table-cell {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    display: table-cell;
    padding: 10px;
    border: 1px solid var(--color-border);
    white-space: normal;
    word-wrap: break-word;
}

.widget-div-table-header .widget-div-table-cell {
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* VERPFLICHTEND: Mobile-Darstellung - Pro Zeile nur eine Spalte mit Spaltenname: Wert Format */
/* Regel 009 aus 011-ui-css-div-tables.mdc */
@media (max-width: 576px) {
    /* Header auf Mobile ausgeblendet */
    .widget-div-table-header {
        display: none;
    }
    
    /* Body-Zellen auf Mobile: volle Breite, Block-Display */
    .widget-div-table-body .widget-div-table-row {
        display: block;
        width: 100%;
        margin-bottom: 12px;
        border: 1px solid var(--color-border);
    }
    
    .widget-div-table-body .widget-div-table-cell {
        display: block;
        width: 100%;
        margin-bottom: 12px;
        border: none;
        border-bottom: 1px solid var(--color-border);
        padding: 8px 0;
    }
    
    /* Spaltenname als Label anzeigen (über data-label Attribut) */
    .widget-div-table-body .widget-div-table-cell::before {
        content: attr(data-label) ": ";
        font-weight: bold;
        display: block;
        margin-bottom: 4px;
    }
    
    /* Letzte Zelle einer Zeile: kein margin-bottom */
    .widget-div-table-body .widget-div-table-row .widget-div-table-cell:last-child {
        margin-bottom: 0;
        border-bottom: none;
    }
}
