/* Dynamic Table: plain defaults. Table rules are wrapped in :where() so they carry no weight, and the
   theme's ".list table" styling (the widget sits in a "container list" div) always wins. */
.dt-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dt-table {
    width: 100%;
    border-collapse: collapse;
}

:where(.dt-table) th,
:where(.dt-table) td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #ddd;
}

:where(.dt-table) thead th {
    border-bottom-width: 2px;
    white-space: nowrap;
}

:where(.dt-table) .dt-group th {
    background: #f3f5f8;
    font-weight: 600;
}

.dt-count {
    font-weight: normal;
    opacity: 0.75;
}

.dt-empty {
    font-style: italic;
}

/* Sortable header buttons look like plain header text with an arrow. */
.dt-sort {
    all: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
}

.dt-sort::after {
    content: "\2195";
    opacity: 0.35;
    font-size: 0.85em;
}

th[aria-sort="ascending"] .dt-sort::after {
    content: "\2191";
    opacity: 1;
}

th[aria-sort="descending"] .dt-sort::after {
    content: "\2193";
    opacity: 1;
}

/* List cells: one entry per bag item. */
.dt-item-label {
    margin-right: 0.25em;
}

/* Group header rows inside the theme's list styling: keep them a plain band, not a striped or hover row. */
.list .dt-table tbody tr.dt-group,
.list .dt-table tbody tr.dt-group:hover {
    color: inherit;
    background-color: transparent;
}

.list .dt-table tr.dt-group th {
    padding-top: 1.5rem;
    font-size: 1.1em;
}
