/* ============================================================
   Table Column Resizer Styles  (used by table-resize-v2.js)
   Scoped only to targeted resizable tables —
   never touches tables on other pages.
   ============================================================ */

/* Scope position:relative only to resizable table headers */
table.resizable th,
#customersTable th,
#jobsTable th,
#leadsTable th {
    position: relative !important;
    overflow: hidden;
    text-overflow: ellipsis;
    display: table-cell !important;
}

/* ── Resizer handle ──────────────────────────────────────────
   Invisible by default — no visual noise / "notification dot".
   A subtle blue edge appears only on hover or while dragging. */
.resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    touch-action: none;
    z-index: 10;
    background-color: transparent;
}

.resizer:hover,
.resizing {
    background-color: rgba(13, 110, 253, 0.15);
    border-right: 2px solid var(--bs-primary, #2563eb);
}

/* Fixed table layout only for customers/jobs CSS-side.
   #leadsTable layout is set dynamically in JS AFTER capturing
   natural column widths — this prevents the first column from
   being crushed to equal-width by the browser. */
table.resizable,
#customersTable,
#jobsTable {
    table-layout: fixed !important;
    width: auto;
    border-collapse: collapse;
}

/* During an active drag, prevent text selection */
.resizing-active {
    user-select: none;
    cursor: col-resize;
}

/* Text truncation in resizable table cells — all columns except name */
table.resizable td,
#customersTable td,
#jobsTable td,
#leadsTable td:not(.col-name) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Name column: allow wrapping so full project names are always visible */
#leadsTable td.col-name {
    overflow: visible;
    white-space: normal;
}

/* Explicit override to allow wrapping where needed */
.text-wrap {
    white-space: normal !important;
}