/* Table Resizer Styles */
.table th {
    position: relative !important;
    /* Ensure header content is clipped properly */
    overflow: hidden;
    text-overflow: ellipsis;
}

.resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 15px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    touch-action: none;
    z-index: 9999 !important;
    /* Force on top of sort buttons */
    background-color: rgba(0, 0, 0, 0.05);
    /* Light gray for visibility */
    border-right: 1px solid var(--border-color);
    /* Divider line */
}

/* Hover state */
.resizer:hover,
.resizing {
    background-color: rgba(13, 110, 253, 0.2);
    /* Stronger highlight */
    border-right: 2px solid var(--primary-color);
}

/* Ensure tables handle fixed layout correctly */
table.resizable,
#customersTable,
#jobsTable {
    table-layout: fixed !important;
    min-width: 0 !important;
    /* Allow table to shrink */
    width: auto;
    border-collapse: collapse;
}

.table th {
    position: relative !important;
    overflow: hidden;
    text-overflow: ellipsis;
    display: table-cell !important;
    /* Ensure it behaves like a table cell */
}

/* When resizing, prevent text selection */
.resizing-active {
    user-select: none;
    cursor: col-resize;
}

/* Allow text truncation in cells when columns are narrow */
table.resizable td,
#customersTable td,
#jobsTable td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-wrap {
    white-space: normal !important;
}