div.dt-container {
    background-color: var(--background-secondary);
    border: 1px solid var(--border);
    display: flex;
    flex-flow: row wrap;
    align-items: center;
}

div.dt-container .dt-length {
    order: 2;
    padding: 5px 8px;
    margin-left: auto;
}

div.dt-container .dt-search {
    order: 1;
    padding: 5px 8px;
    display: flex;
    flex-grow: 1;
    text-align: left;
}

div.dt-container .dataTable {
    order: 3;
    width: 100%;
}

div.dt-container .dataTables_info {
    order: 4;
    flex-grow: 1;
    padding: 5px 8px;
}

div.dt-container .dt-paging {
    order: 5;
    padding: 5px 8px;
    margin-left: auto;
}

div.dt-container .dt-paging .dt-paging-button {
    min-width: 2rem;
    background: var(--background);
    padding: 5px 15px;
    margin: 0 4px;
    border: 1px solid #aaa;
    overflow: auto;
}

div.dt-container .dt-paging .dt-paging-button.current, div.dt-container .dt-paging .dt-paging-button:hover,
div.dt-container .dt-paging .dt-paging-button.current:hover {
    background: var(--primary);
    color: var(--on-primary) !important;
}

div.dt-container .dt-paging .dt-paging-button.disabled {
    display: none;
}

div.dt-container .dt-search input {
    margin: 0 0 0 0.5rem;
    background-color: var(--background);
    flex-grow: 1;
}

div.dt-container .dt-search label {
    line-height: 2.3;
    display: flex;
}

div.dt-container .dt-length select {
    background-color: var(--background);
}

table.dataTable {
    box-sizing: revert;
}

table.dataTable thead th[class^=sorting] {
    outline-offset: -4px;
    background-image: none;
}

.usos-ui table.dataTable thead .sorting {
    background-image: none;
}

.usos-ui table.dataTable thead :is([class^=sorting_asc], [class^=sorting_desc])::after {
    display: inline-block;
    position: relative;
    right: 0;
    top: 0.25rem;
    color: var(--background);
    font-family: 'Material Icons';
    font-size: 1.5rem;
    margin-left: 0.25rem;
    margin-top: -0.75rem;
}

.usos-ui table.dataTable thead [class^=sorting_asc]::after {
    content: 'arrow_drop_up';
}

.usos-ui table.dataTable thead [class^=sorting_desc]::after {
    content: 'arrow_drop_down';
}

.usos-ui table.dataTable thead .sorting_asc_disabled::after,
.usos-ui table.dataTable thead .sorting_desc_disabled::after {
    opacity: 0.5;
}

.usos-ui table.dataTable th.dt-type-numeric div.dt-column-header,
.usos-ui table.dataTable th.dt-type-date div.dt-column-header,
.usos-ui table.dataTable td.dt-type-numeric div.dt-column-header,
.usos-ui table.dataTable td.dt-type-date div.dt-column-header,
.usos-ui table.dataTable th.dt-right div.dt-column-header,
.usos-ui table.dataTable td.dt-right div.dt-column-header,
.usos-ui table.dataTable thead th.dt-head-right div.dt-column-header,
.usos-ui table.dataTable thead td.dt-head-right div.dt-column-header,
.usos-ui table.dataTable tfoot th.dt-head-right div.dt-column-header,
.usos-ui table.dataTable tfoot td.dt-head-right div.dt-column-header {
  flex-direction: row;
  text-align: left;
}

table.dataTable thead th.filterable input.column-filter {
    width: 90%;
    color: var(--font-color);;
    font-weight: normal;
}

table.dataTable thead th.filterable input.column-filter::placeholder {
    color: var(--grey);
}

table.dataTable th.min_width {
    white-space: nowrap;
    width: 1%;
}

/* Style dla responsywnego widoku stacked list */
div.dt-container.cards-view table.dataTable,
div.dt-container.cards-view table.dataTable > tbody,
div.dt-container.cards-view table.dataTable > tbody > tr,
div.dt-container.cards-view table.dataTable > tbody > tr > td {
    display: block;
    width: auto !important;
}

div.dt-container.cards-view table.dataTable {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.25rem;
}

div.dt-container.cards-view table.dataTable > colgroup {
    display: none;
}

div.dt-container.cards-view table.dataTable > thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

div.dt-container.cards-view table.dataTable > tbody > tr {
    border: none;
    margin: 0;
    padding: 0.5rem 0;
    background: transparent;
}

div.dt-container.cards-view table.dataTable > tbody > tr + tr {
    border-top: 1px solid var(--border);
}

div.dt-container.cards-view table.dataTable > tbody > tr > td {
    display: grid;
    grid-template-columns: minmax(6rem, 35%) minmax(0, 1fr);
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border: none;
    text-align: left;
    background: transparent;
    box-shadow: none;
}

/* etykieta tylko wizualna – alt text "" wyklucza ją z drzewa dostępności */
div.dt-container.cards-view table.dataTable > tbody > tr > td[data-label]::before {
    content: attr(data-label) ":" / "";
    font-weight: 600;
}

div.dt-container.cards-view table.dataTable > tbody > tr > td:not([data-label]) {
    display: block;
}

div.dt-container.cards-view table.dataTable > tbody > tr > td.card-title {
    font-weight: 600;
}

div.dt-container.cards-view table.dataTable > tbody > tr > td.card-hidden {
    display: none;
}


div.dt-container.cards-view table.dataTable,
div.dt-container.cards-view .dt-paging,
div.dt-container.cards-view .dt-info {
    flex: 0 0 100%;
}

div.dt-container.cards-view .dt-length {
    margin-left: auto;
}

div.dt-container.cards-view .dt-length {
    text-align: right;
    margin-bottom: 0.5rem;
}