/* The look every list in the app shares: a bordered card, a quiet uppercase
   header and hairline row separators instead of stripes. */

.data-table-wrap {
    border: 1px solid var(--bs-border-color, #e0dee3);
    border-radius: 8px;
    overflow: auto;
}

/* Dashboard sections cap their height and scroll inside the border. */
.data-table-wrap.is-capped {
    max-height: 480px;
}

.data-table-wrap.is-sticky-head thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    /* A collapsed border on a sticky cell scrolls away with the rows, so the
       header keeps its bottom rule as a shadow instead. */
    border-bottom: 0;
    box-shadow: inset 0 -1px 0 var(--bs-border-color, #e0dee3);
}

.data-table {
    width: 100%;
    min-width: 640px;
    margin: 0;
    border-collapse: collapse;
}

.data-table.is-narrow {
    min-width: 420px;
}

.data-table.is-wide {
    min-width: 860px;
}

.data-table.is-compact {
    min-width: 0;
}

/* Percentage column widths only hold under a fixed layout, and a fixed layout
   needs the cells to clip: one long item URL would otherwise drag its column
   past the share it was given. It is also what the column resizer writes into.  */
.data-table.is-resizable {
    table-layout: fixed;
}

.data-table.is-resizable tbody td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-table thead th {
    /* The anchor for the column resizer's drag handle. */
    position: relative;
    padding: 11px 16px;
    background: #f6f7fb;
    border-bottom: 1px solid var(--bs-border-color, #e0dee3);
    color: var(--bs-gray-600, #827d8b);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
}

.data-table thead th a {
    color: inherit;
    text-decoration: none;
}

.data-table thead th a:hover {
    color: var(--bs-primary, #1e293b);
}

.data-table tbody td,
.data-table tbody th {
    padding: 12px 16px;
    vertical-align: middle;
}

.data-table tbody th {
    text-align: left;
}

.data-table tbody tr + tr td,
.data-table tbody tr + tr th {
    border-top: 1px solid #efeef1;
}

.data-table tbody tr:hover td,
.data-table tbody tr:hover th {
    background: #fafafc;
}

.data-table.is-compact thead th,
.data-table.is-compact tbody td,
.data-table.is-compact tbody th {
    padding: 8px 12px;
}

.data-table .data-col-end {
    text-align: right;
    white-space: nowrap;
}

.data-cell-main {
    line-height: 1.3;
}

.data-cell-sub {
    margin-top: 2px;
    color: var(--bs-gray-500, #97939e);
    font-size: 0.8rem;
}

.data-name-link {
    color: var(--bs-gray-900, #433c50);
    font-weight: 600;
    text-decoration: none;
}

.data-name-link:hover {
    color: var(--bs-primary, #1e293b);
    text-decoration: underline;
}

.data-action-link {
    color: var(--bs-primary, #1e293b);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.data-action-link:hover {
    text-decoration: underline;
}

.data-cell-link {
    color: inherit;
    text-decoration: none;
}

.data-cell-link:hover {
    color: var(--bs-primary, #1e293b);
    text-decoration: underline;
}

/* A row that carries nothing but the detail panel for the row above it. */
.data-table .data-row-detail {
    padding: 0;
}

.data-table tbody tr + tr .data-row-detail {
    border-top: 0;
}

.data-table tbody tr:hover .data-row-detail {
    background: transparent;
}

.data-table-export {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    color: var(--bs-gray-500, #97939e);
    font-size: 0.85rem;
    text-decoration: none;
}

.data-table-export:hover {
    background: rgba(30, 41, 59, 0.08);
    color: var(--bs-primary, #1e293b);
}

.data-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 14px;
}

.data-pagination-summary {
    color: #6c757d;
    font-size: 0.95rem;
}

.data-pagination .page-link {
    font-size: 1rem;
    min-width: 2.5rem;
    padding: 0.5rem 0.75rem;
    text-align: center;
}
