/* ============================================================
 * InSync365 Shared Controls
 * ------------------------------------------------------------
 * Neutral building blocks reused by every redesigned screen.
 * Per-screen stylesheets (redesign-*.css) only define cell-level
 * cosmetics; all sortable headers and filter pills go through
 * here so the visuals stay consistent across the app.
 *
 * Adopted by:
 *   - CompanyDocumentsV2 (cd-screen)
 * Pending migration:
 *   - EmployeesListV2 still uses .el-th / .el-pill (kept until
 *     a separate cleanup PR replaces them with these shared
 *     classes; do not duplicate the rules there in the meantime).
 * ============================================================ */

/* ── Table card shell — wraps the toolbar + table + pager into one
 * surface. Used by every redesigned list screen (Documents V2,
 * Approvals V2, …). `overflow: clip` lets the sticky thead pin
 * cleanly without trapping inside a scroll container.
 * ─────────────────────────────────────────────────────────────── */
.is-tablecard {
    background: var(--is-bg-surface);
    border: 1px solid var(--is-border-1);
    border-radius: var(--is-radius-md);
    box-shadow: var(--is-shadow-1);
    overflow: clip;
}

/* ── Sortable column header (used inside any sticky-thead table) ── */
.is-th { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; user-select: none; }
.is-th i { font-size: 9px; opacity: 0; transition: opacity .15s, color .15s; color: var(--is-fg-3); }
.is-th:hover i { opacity: .6; }
.is-th.is-sorted i { opacity: 1; color: var(--is-action-blue); }

/* ── Filter pill — chrome around an SfMultiSelect ────────────── */
.is-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--is-radius-sm);
    border: 1px solid var(--is-border-3);
    background: #fff;
    font: 600 12.5px var(--is-font-sans);
    color: var(--is-fg-2);
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
    box-sizing: border-box;
    vertical-align: middle;
}
.is-pill:hover { background: var(--is-bg-surface-3); color: var(--is-fg-1); }
.is-pill i.is-pill__chev { font-size: 9px; color: var(--is-fg-3); }
.is-pill.is-active { background: var(--is-brand-blue-100); border-color: var(--is-brand-blue-200); color: var(--is-brand-blue-700); }
.is-pill.is-active i { color: var(--is-brand-blue-700); }
.is-pill__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 16px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--is-brand-blue);
    color: #fff;
    font: 700 10px var(--is-font-sans);
    margin-left: 1px;
}

/* ── Syncfusion SfMultiSelect — restyled to live invisibly inside .is-pill
 * The pill chrome (label + count + chevron) is rendered by our wrapper.
 * The SfMultiSelect sits invisibly underneath providing the popup +
 * checkboxes. CSS hides its default visuals.
 * ─────────────────────────────────────────────────────────────── */
.is-sf-pill { position: relative; }
.is-sf-pill .e-multiselect,
.is-sf-pill .e-control-wrapper,
.is-sf-pill .e-input-group {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    opacity: 0;
}
.is-sf-pill .e-multi-select-wrapper {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    min-height: 36px !important;
    height: 36px !important;
    padding: 0 !important;
}
.is-sf-pill .e-multi-select-wrapper .e-chips-collection { display: none !important; }
.is-sf-pill .e-multi-select-wrapper input.e-control,
.is-sf-pill .e-multi-select-wrapper .e-input-filter,
.is-sf-pill .e-multi-select-wrapper .e-searcher {
    color: transparent !important;
    caret-color: transparent !important;
    cursor: pointer !important;
}
.is-sf-pill .e-multi-select-wrapper .e-ddl-icon,
.is-sf-pill .e-multi-select-wrapper .e-clear-icon { display: none !important; }
