/*
 * Compact data tables for every Filament panel.
 * Default Filament rows are ~57px tall (16px vertical cell padding) which
 * makes long lists feel huge; this brings rows to ~38px and tightens the
 * header, toolbar and the Actions column (icon buttons) while keeping text
 * at a readable size.
 */

/* Header row */
.fi-ta-table > thead > tr > th {
    padding-block: 0.5rem;
    padding-inline: 0.625rem;
    font-size: 0.75rem;
}

/* Body cells: text, badges, icons all share this wrapper padding */
.fi-ta-table .fi-ta-text {
    padding-block: 0.3125rem;
    padding-inline: 0.625rem;
}

.fi-ta-table .fi-ta-icon,
.fi-ta-table .fi-ta-color,
.fi-ta-table .fi-ta-image {
    padding-block: 0.25rem;
    padding-inline: 0.625rem;
}

/* Smaller table body text (default is 14px) */
.fi-ta-table .fi-ta-text-item,
.fi-ta-table .fi-ta-text-item.fi-size-sm,
.fi-ta-table .fi-ta-text-item.fi-size-md {
    font-size: 0.8125rem;
    line-height: 1.25rem;
}

.fi-ta-table .fi-ta-text-item.fi-size-xs {
    font-size: 0.6875rem;
    line-height: 1rem;
}

/* Checkbox (selection) column */
.fi-ta-table > tbody > tr > td.fi-ta-selection-cell,
.fi-ta-table > thead > tr > th.fi-ta-selection-cell {
    padding-block: 0.375rem;
    padding-inline: 0.75rem 0.25rem;
}

/* Actions column: icon buttons, packed tightly, never wrapping */
.fi-ta-table > tbody > tr > td:last-child:has(> .fi-ta-actions) {
    padding-block: 0.125rem;
    padding-inline: 0.25rem 0.75rem;
    white-space: nowrap;
}

.fi-ta-table .fi-ta-actions {
    gap: 0.125rem;
    flex-wrap: nowrap;
}

/* Header toolbar (search / filters / column manager) */
.fi-ta-header-toolbar {
    padding-block: 0.5rem;
}

/* Pagination footer */
.fi-ta-ctn .fi-pagination,
.fi-ta-ctn > .fi-ta-footer {
    padding-block: 0.5rem;
}

/*
 * Column widths: free-text columns are capped so long values wrap onto two
 * lines (line-clamp is set on the column) instead of widening the table.
 * Short values (ids, numbers, dates, status) still shrink to their content.
 */
.fi-ta-table .fi-ta-text {
    max-width: 15rem;
}

/* Audit column ("date · person"): one line, never wraps. */
.fi-ta-table .fi-ta-text.fi-audit-col {
    white-space: nowrap;
    max-width: none;
}

/* Headers and icon/badge cells never wrap; they take only the width they need. */
.fi-ta-table > thead > tr > th {
    white-space: nowrap;
}

.fi-ta-table .fi-ta-icon,
.fi-ta-table .fi-badge {
    white-space: nowrap;
}
