/* Tabellen mit Stimulus-Controller "table" (assets/controllers/table_controller.js), Ersatz für DataTables */

table[data-controller~="table"] > thead > tr > th,
table[data-controller~="table"] > tbody > tr > td {
    padding: 0 10px;
}

/* Sortierung */
table[data-controller~="table"] th.dt-sortable {
    cursor: pointer;
    position: relative;
    padding-right: 22px;
    user-select: none;
}
table[data-controller~="table"] th.dt-sortable::after {
    content: "\2195"; /* ↕ */
    position: absolute;
    right: 6px;
    opacity: 0.35;
}
table[data-controller~="table"] th.dt-sorted-asc::after {
    content: "\25B2"; /* ▲ */
    opacity: 0.9;
}
table[data-controller~="table"] th.dt-sorted-desc::after {
    content: "\25BC"; /* ▼ */
    opacity: 0.9;
}

/* Zeilenwahl (wie DataTables Select) */
table[data-controller~="table"] > tbody > tr.dt-selected > td {
    background-color: #b0bed9;
}

/* Spalten verschieben / Breite ziehen */
table[data-controller~="table"] th[draggable="true"] {
    cursor: grab;
}
table[data-controller~="table"] th.dt-dragging {
    opacity: 0.5;
}
table[data-controller~="table"] th.dt-drop-target {
    box-shadow: inset 3px 0 0 #0d6efd;
}
table[data-controller~="table"] th.dt-resizable,
body.dt-resizing,
body.dt-resizing * {
    cursor: col-resize !important;
}

.dt-empty {
    text-align: center;
    padding: 8px !important;
}

.dt-filter-toggle {
    min-width: 160px;
}
.dt-filter-toggle.dt-filter-active {
    background-color: yellow;
}
