/* ============================================================
   Shared grid chrome — loaded globally (index.html) so EVERY grid
   family gets identical behavior from ONE place: Gantt, Procurement,
   the financial generic-grid, all ExcelGridBase modules, Meetings,
   Risk, Submittals, Documents.
   ============================================================ */

/* ------------------------------------------------------------
   C8 — column "⋮" menu trigger is HOVER-ONLY everywhere (spec §7.2).
   Decided 2026-06-12: the always-visible / smart-overlap variants were
   rejected in favor of the simpler Meetings/Risk pattern, generalized.

   Idle = hidden; the glyph is revealed only while its <th> is hovered,
   on a small opaque chip so it stays legible over column text on narrow
   columns.

   Ownership: this block OWNS opacity (the affordance behavior) for every
   grid. Sites that set position/right/font/color/padding *inline* win
   over the fallbacks here via normal cascade (inline > selector), so
   their geometry is unchanged — only the hide/reveal is centralized. The
   position/right fallbacks exist for the one site (Meetings) that sets no
   inline style at all.

   Exemptions (intentionally NOT affected):
   - Updates editor disables the feature with display:none, which beats
     opacity — its trigger stays hidden (updates.css / updates-grid-
     customizations.js). Do not unify.
   - Sort/applied-filter indicators convey STATE, not affordance, and stay
     always-visible (sort-manager.js injects them separately).
   ------------------------------------------------------------ */
th .column-menu-trigger {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    padding: 2px 6px;
    border-radius: 3px;
    line-height: 1;
    font-size: 14px;
    color: #6c757d;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease;
}

th:hover .column-menu-trigger {
    opacity: 1;
    /* Opaque chip (matches the header band / C9 token) keeps the glyph
       legible when it overlaps the column label on narrow columns. */
    background: var(--hdr-bg, #f8f9fa);
}

/* ------------------------------------------------------------
   C6 — data-scope selector. Shared by RFIs / Submittals / Documents
   (their per-module .{mod}-view-bar containers still own padding/border).
   Replaced the multi-button content-filter view bars: content filtering
   now lives in the per-column Advanced Filter, while server-only scopes
   that client-side filtering can't reach (Recycled = deleted rows;
   By Sheet Set = parent/child clustering) stay in this selector.
   ------------------------------------------------------------ */
.data-scope-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--tb-color, #6b7280);
}

.data-scope-select {
    padding: 4px 8px;
    border: 1px solid var(--tb-btn-border, #e5e7eb);
    border-radius: var(--btn-radius, 6px);
    background: var(--tb-btn-bg, #fff);
    color: var(--tb-btn-text, #374151);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.data-scope-select:hover {
    border-color: var(--tb-btn-border, #d1d5db);
}

/* ------------------------------------------------------------
   Header case — make live grid headers honor the --hdr-transform
   view-settings token. BOTH the hamburger ("Header case", per-grid,
   writes the var on the grid container) and the Theme Editor ("Header
   case" in the `th` group, per-theme, writes :root) set --hdr-transform;
   nothing live consumed it, so the control was inert everywhere.

   Why it lives here (not in a per-module sheet): the header cells are
   rendered with INLINE styles by each grid's renderer, and the inline
   `text-transform: var(--hdr-transform)` either was never emitted
   (shared ExcelGridBase `th.grid-header-cell`, excel-grid-base.js) or is
   stripped post-render by a later style rewrite (Procurement's custom
   `<th>`, procurement-grid.js). A stylesheet rule fills the gap and is
   immune to that rewrite (no inline text-transform survives to override).

   Specificity is deliberately LOW (bare `thead th`) so any module that
   sets its own header text-transform (e.g. .dir-grid thead th) still
   wins — no regression. Default `none` = today's look ⇒ Classic stays
   byte-identical; only an opted-in uppercase/none (per-grid or per-theme)
   changes anything. ------------------------------------------------------------ */
thead th {
    text-transform: var(--hdr-transform, none);
}
