/* =============================================================================
   gsi_tables.css — styles for GsiTable-generated tables
   ============================================================================= */

/* Wrapper around toolbar + table */
.gsi-table-wrapper {
    width: 100%;
}

/* Toolbar (search bar + export buttons) */
.gsi-table-toolbar {
    padding: 0.25rem 0;
}

.gsi-search-wrap {
    flex-shrink: 0;
}

/* Truncate cells — used with GsiColumn::truncate() */
.tabulator .gsi-truncate .tabulator-cell-value,
.tabulator .gsi-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

/* Badge cells — rendered by gsiBadge custom formatter */
.gsi-badge {
    display: inline-block;
}

/* Editable cell flash on successful save */
.tabulator-cell.cell-updated {
    background-color: rgba(25, 135, 84, 0.15) !important;
    transition: background-color 0.3s ease;
}

/* Export button spacing */
.gsi-export-btn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Row hover cursor when row-click is enabled */
.tabulator .tabulator-row[data-row-click="true"],
.tabulator-row.gsi-clickable-row {
    cursor: pointer;
}

/* Group header styling */
.tabulator .tabulator-group {
    font-weight: 600;
    background-color: #f0f4f8;
    border-left: 3px solid #0d6efd;
    padding-left: 0.75rem;
}

/* Striped rows — enabled with ->striped() */
.gsi-table-striped .tabulator-row.tabulator-row-even,
.gsi-table-striped .tabulator-row:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.035) !important;
}
.gsi-table-striped .tabulator-row.tabulator-row-even:hover,
.gsi-table-striped .tabulator-row:nth-child(even):hover {
    background-color: rgba(0, 0, 0, 0.07) !important;
}
