/* SPDX-License-Identifier: LicenseRef-Highcharts */

/**
 * @license Highcharts Grid Lite v3.1.0
 *
 * (c) 2009-2025 Highsoft AS
 *
 * A commercial license may be required depending on use.
 * See www.highcharts.com/license
 */

.hcg-container,
.highcharts-light .hcg-container {
    --ig-default-color: #000000;
    --ig-default-background: #ffffff;
    --ig-negative-default-color: #c10008;
    --ig-negative-default-border-color: #e7000b;
    --ig-negative-default-background: #fef3f2;
    --ig-neutral-default-color: #884b00;
    --ig-neutral-default-border-color: #d18700;
    --ig-neutral-default-background: #fefce8;
    --ig-positive-default-color: #008236;
    --ig-positive-default-border-color: #00a63e;
    --ig-positive-default-background: #effdf4;
    --ig-highlight-color-5: #f3f6fe;
}

@media (prefers-color-scheme: dark) {
    .hcg-container {
        --ig-default-color: #ffffff;
        --ig-default-background: #000000;
        --ig-negative-default-color: #ffb3b3;
        --ig-negative-default-border-color: #7a1e1e;
        --ig-negative-default-background: #3d0e0b;
        --ig-neutral-default-color: #ffe8c1;
        --ig-neutral-default-border-color: #7d5c20;
        --ig-neutral-default-background: #3b2a11;
        --ig-positive-default-color: #a6f8c1;
        --ig-positive-default-border-color: #1e6f3e;
        --ig-positive-default-background: #0a3e1a;
        --ig-highlight-color-5: #202124;
    }
}

.highcharts-dark .hcg-container {
    --ig-default-color: #ffffff;
    --ig-default-background: #000000;
    --ig-negative-default-color: #ffb3b3;
    --ig-negative-default-border-color: #7a1e1e;
    --ig-negative-default-background: #3d0e0b;
    --ig-neutral-default-color: #ffe8c1;
    --ig-neutral-default-border-color: #7d5c20;
    --ig-neutral-default-background: #3b2a11;
    --ig-positive-default-color: #a6f8c1;
    --ig-positive-default-border-color: #1e6f3e;
    --ig-positive-default-background: #0a3e1a;
    --ig-highlight-color-5: #202124;
}

/*  ==== End Grid Color Scheme  ==== */

/*  ==== Start Highcharts Variables  ==== */
:root,
.highcharts-light {
    --highcharts-background-color: #ffffff;
    --highcharts-neutral-color-100: #000000;
}

/* Concrete values (:root:root beats the light-dark() Highcharts injects on
   :root) so the page stays dark even when the embedder forces color-scheme. */
@media (prefers-color-scheme: dark) {
    :root:root {
        --highcharts-background-color: #141414;
        --highcharts-neutral-color-100: #ffffff;
    }
}

.highcharts-dark {
    --highcharts-background-color: #141414;
    --highcharts-neutral-color-100: #ffffff;
}

/* Restore light-dark() on the chart itself, so a forced scheme
   (.highcharts-light / .highcharts-dark) still overrides the values above. */
@supports (color: light-dark(#fff, #000)) {
    .highcharts-container {
        --highcharts-background-color: light-dark(#ffffff, #141414);
        --highcharts-neutral-color-100: light-dark(#000000, #ffffff);
    }
}

/*  ==== End Highcharts Variables  ==== */

/* ==== Start Grid Variables ==== */
.hcg-container {
    --ig-hover-opacity: var(--hcg-hover-opacity, 100%);
    --ig-sync-opacity: var(--hcg-sync-opacity, var(--ig-hover-opacity));

    /* Global fonts — neutral fallbacks when no theme / --hcg-* tokens */
    --ig-default-font-family: -apple-system, "BlinkMacSystemFont", "Segoe UI", "Roboto", "Helvetica", "Arial", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    --ig-font-weight: var(--hcg-font-weight, normal);
    --ig-font-size: var(--hcg-font-size, 1em);
    --ig-font-family: var(--hcg-font-family, var(--ig-default-font-family));
    --ig-color: var(--hcg-color, inherit);
    --ig-font: var(--ig-font-weight) var(--ig-font-size) var(--ig-font-family);
    --ig-text-align: var(--hcg-text-align, inherit);

    /* Default padding */
    --ig-horizontal-padding: var(--hcg-horizontal-padding, var(--hcg-padding, 0));
    --ig-vertical-padding: var(--hcg-vertical-padding, var(--hcg-padding, 0));
    --ig-padding: var(--ig-vertical-padding) var(--ig-horizontal-padding);

    /* Loading indicator */
    --ig-loader-color: var(--hcg-loader-color, var(--hcg-color));

    /* Default backgrounds and colors */
    --ig-background: var(--hcg-background, transparent);

    /* Accessibility */
    --ig-focus-ring-color: var(--hcg-focus-ring-color, var(--ig-color));
    --ig-focus-ring-width: var(--hcg-focus-ring-width, 2px);
    --ig-focus-ring: 0 0 0 var(--ig-focus-ring-width) var(--ig-focus-ring-color);

    /* CSS helpers */
    --ig-highlight-border-size: var(--hcg-highlight-border-size, 1px);

    /* Negative colors */
    --ig-negative-border-color: var(--hcg-negative-border-color, var(--ig-negative-default-border-color));
    --ig-negative-border-size: var(--hcg-negative-border-size, var(--ig-highlight-border-size));
    --ig-negative-background: var(--hcg-negative-background, var(--ig-negative-default-background));
    --ig-negative-color: var(--hcg-negative-color, var(--ig-color));

    /* Neutral colors */
    --ig-neutral-border-color: var(--hcg-neutral-border-color, var(--ig-neutral-default-border-color));
    --ig-neutral-border-size: var(--hcg-neutral-border-size, var(--ig-highlight-border-size));
    --ig-neutral-background: var(--hcg-neutral-background, var(--ig-neutral-default-background));
    --ig-neutral-color: var(--hcg-neutral-color, var(--ig-color));

    /* Positive colors */
    --ig-positive-border-color: var(--hcg-positive-border-color, var(--ig-positive-default-border-color));
    --ig-positive-border-size: var(--hcg-positive-border-size, var(--ig-highlight-border-size));
    --ig-positive-background: var(--hcg-positive-background, var(--ig-positive-default-background));
    --ig-positive-color: var(--hcg-positive-color, var(--ig-color));

    /* Container font: set via className / inheritance. --hcg-font-* still feed cells. */
}

/* Popup shell tokens — application always-on; visual defaults live in theme.
 * Content/header padding keep non-zero fallbacks so unthemed grids
 * (`theme: ''`) stay usable without setting tokens. */
.hcg-container .hcg-popup,
.highcharts-light .hcg-container .hcg-popup {
    --ig-popup-color: var(--hcg-popup-color, inherit);
    --ig-popup-background: var(--hcg-popup-background, transparent);
    --ig-popup-border-color: var(--hcg-popup-border-color, transparent);
    --ig-popup-border-radius: var(--hcg-popup-border-radius, 0);
    --ig-popup-box-shadow: var(--hcg-popup-box-shadow, none);
    --ig-popup-content-padding: var(--hcg-popup-content-padding, 5px);
    --ig-popup-header-font-size: var(--hcg-popup-header-font-size, inherit);
    --ig-popup-header-padding: var(--hcg-popup-header-padding, 3px);
}

.hcg-container .hcg-popup {
    color: var(--ig-popup-color);
    background: var(--ig-popup-background);
    border-color: var(--ig-popup-border-color);
    border-radius: var(--ig-popup-border-radius);
    box-shadow: var(--ig-popup-box-shadow);

    .hcg-popup-content {
        padding: var(--ig-popup-content-padding);
    }

    .hcg-menu-header {
        font-size: var(--ig-popup-header-font-size);
        padding: var(--ig-popup-header-padding);
    }
}

/* Menu tokens — application always-on; visual defaults live in theme. */
.hcg-container .hcg-menu-container,
.highcharts-light .hcg-container .hcg-menu-container {
    --ig-menu-item-hover-background: var(--hcg-menu-item-hover-background, transparent);
    --ig-menu-item-hover-border-color: var(--hcg-menu-item-hover-border-color, transparent);
    --ig-menu-item-active-background: var(--hcg-menu-item-active-background, transparent);
    --ig-menu-item-active-border-color: var(--hcg-menu-item-active-border-color, transparent);
    --ig-menu-item-divider-color: var(--hcg-menu-item-divider-color, transparent);
    --ig-menu-item-padding: var(--hcg-menu-item-padding, 0);
    --ig-menu-item-font-size: var(--hcg-menu-item-font-size, inherit);
    --ig-menu-item-font-weight: var(--hcg-menu-item-font-weight, inherit);
    --ig-menu-item-border-radius: var(--hcg-menu-item-border-radius, 0);
    --ig-menu-item-min-height: var(--hcg-menu-item-min-height, 0);
    --ig-menu-row-gap: var(--hcg-menu-row-gap, 0);
}

.hcg-container .hcg-menu-container {
    row-gap: var(--ig-menu-row-gap);

    .hcg-menu-item {
        padding: var(--ig-menu-item-padding);
        font-size: var(--ig-menu-item-font-size);
        font-weight: var(--ig-menu-item-font-weight);
        border-radius: var(--ig-menu-item-border-radius);
        min-height: var(--ig-menu-item-min-height);
    }

    .hcg-menu-item:focus-visible {
        box-shadow: var(--ig-focus-ring);
    }

    .hcg-menu-item:focus-visible,
    .hcg-menu-item:not(:disabled):hover,
    .hcg-menu-item.highlighted {
        background: var(--ig-menu-item-hover-background);
        border-color: var(--ig-menu-item-hover-border-color);
    }

    .hcg-menu-item.active,
    .hcg-menu-item.active:hover,
    .hcg-menu-item.active.highlighted {
        background: var(--ig-menu-item-active-background);
        border-color: var(--ig-menu-item-active-border-color);
    }

    .hcg-menu-divider {
        border-top-color: var(--ig-menu-item-divider-color);
    }
}

.hcg-container {
    --ig-link-color: var(--hcg-link-color, inherit);
    --ig-link-text-decoration: var(--hcg-link-text-decoration, underline);
    --ig-link-hovered-color: var(--hcg-link-hovered-color, var(--ig-link-color));
    --ig-link-hovered-text-decoration: var(--hcg-link-hovered-text-decoration, none);
    --ig-link-font-weight: var(--hcg-link-font-weight, inherit);

    a {
        color: var(--ig-link-color);
        text-decoration: var(--ig-link-text-decoration);
        font-weight: var(--ig-link-font-weight);
    }

    a:hover {
        color: var(--ig-link-hovered-color);
        text-decoration: var(--ig-link-hovered-text-decoration);
    }
}

.hcg-container {
    /* -------------------------------------------------------------
     Defaults (internal base tokens)
     ------------------------------------------------------------- */
    --ig-input-padding-base: var(--hcg-input-padding, 0);
    --ig-input-color-base: var(--hcg-input-color, inherit);
    --ig-input-text-align-base: var(--hcg-input-text-align, var(--ig-text-align));
    --ig-input-border-radius-base: var(--hcg-input-border-radius, 0);
    --ig-input-border-width-base: var(--hcg-input-border-width, 1px);
    --ig-input-border-style-base: var(--hcg-input-border-style, solid);
    --ig-input-border-color-base: var(--hcg-input-border-color, currentColor);
    --ig-input-background-base: var(--hcg-input-background, transparent);
    --ig-input-hover-color-base: var(--hcg-input-hover-color, var(--ig-input-color-base));
    --ig-input-hover-background-base: var(--hcg-input-hover-background, var(--ig-input-background-base));
    --ig-input-hover-border-color-base: var(--hcg-input-hover-border-color, var(--ig-input-border-color-base));

    /* -------------------------------------------------------------
     Public theme overrides (external hcg tokens)
     ------------------------------------------------------------- */
    --ig-input-padding: var(--hcg-input-padding, var(--ig-input-padding-base));
    --ig-input-font-weight: var(--hcg-input-font-weight, inherit);
    --ig-input-font-size: var(--hcg-input-font-size, inherit);
    --ig-input-font-family: var(--hcg-input-font-family, inherit);
    --ig-input-color: var(--hcg-input-color, var(--ig-input-color-base));
    --ig-input-text-align: var(--hcg-input-text-align, var(--ig-input-text-align-base));
    --ig-input-border-radius: var(--hcg-input-border-radius, var(--ig-input-border-radius-base));
    --ig-input-border-width: var(--hcg-input-border-width, var(--ig-input-border-width-base));
    --ig-input-border-style: var(--hcg-input-border-style, var(--ig-input-border-style-base));
    --ig-input-border-color: var(--hcg-input-border-color, var(--ig-input-border-color-base));
    --ig-input-background: var(--hcg-input-background, var(--ig-input-background-base));
    --ig-input-hover-color: var(--hcg-input-hover-color, var(--ig-input-hover-color-base));
    --ig-input-hover-background: var(--hcg-input-hover-background, var(--ig-input-hover-background-base));
    --ig-input-hover-border-color: var(--hcg-input-hover-border-color, var(--ig-input-hover-border-color-base));
    --ig-input-focus-ring: 0 0 0 var(--ig-focus-ring-width) var(--ig-focus-ring-color);

    thead th {
        --ig-input-padding: var(--hcg-header-input-padding, var(--ig-input-padding-base));
        --ig-input-font-weight: var(--hcg-header-input-font-weight, var(--hcg-input-font-weight, inherit));
        --ig-input-font-size: var(--hcg-header-input-font-size, var(--hcg-input-font-size, inherit));
        --ig-input-font-family: var(--hcg-header-input-font-family, var(--hcg-input-font-family, inherit));
        --ig-input-color: var(--hcg-header-input-color, var(--ig-input-color-base));
        --ig-input-text-align: var(--hcg-header-input-text-align, var(--ig-input-text-align-base));
        --ig-input-border-radius: var(--hcg-header-input-border-radius, var(--ig-input-border-radius-base));
        --ig-input-border-width: var(--hcg-header-input-border-width, var(--ig-input-border-width-base));
        --ig-input-border-style: var(--hcg-header-input-border-style, var(--ig-input-border-style-base));
        --ig-input-border-color: var(--hcg-header-input-border-color, var(--ig-input-border-color-base));
        --ig-input-background: var(--hcg-header-input-background, var(--ig-input-background-base));
        --ig-input-hover-color: var(--hcg-header-input-hover-color, var(--hcg-input-hover-color, var(--hcg-header-input-color, var(--ig-input-color-base))));
        --ig-input-hover-background: var(--hcg-header-input-hover-background, var(--hcg-input-hover-background, var(--hcg-header-input-background, var(--ig-input-background-base))));
        --ig-input-hover-border-color: var(--hcg-header-input-hover-border-color, var(--hcg-input-hover-border-color, var(--hcg-header-input-border-color, var(--ig-input-border-color-base))));
    }

    tbody :where(.hcg-cell) {
        --ig-input-padding: var(--hcg-cell-input-padding, var(--ig-input-padding-base));
        --ig-input-font-weight: var(--hcg-cell-input-font-weight, var(--hcg-input-font-weight, inherit));
        --ig-input-font-size: var(--hcg-cell-input-font-size, var(--hcg-input-font-size, inherit));
        --ig-input-font-family: var(--hcg-cell-input-font-family, var(--hcg-input-font-family, inherit));
        --ig-input-color: var(--hcg-cell-input-color, var(--ig-input-color-base));
        --ig-input-text-align: var(--hcg-cell-input-text-align, var(--ig-input-text-align-base));
        --ig-input-border-radius: var(--hcg-cell-input-border-radius, var(--ig-input-border-radius-base));
        --ig-input-border-width: var(--hcg-cell-input-border-width, var(--ig-input-border-width-base));
        --ig-input-border-style: var(--hcg-cell-input-border-style, var(--ig-input-border-style-base));
        --ig-input-border-color: var(--hcg-cell-input-border-color, var(--ig-input-border-color-base));
        --ig-input-background: var(--hcg-cell-input-background, var(--ig-input-background-base));
        --ig-input-hover-color: var(--hcg-cell-input-hover-color, var(--hcg-input-hover-color, var(--hcg-cell-input-color, var(--ig-input-color-base))));
        --ig-input-hover-background: var(--hcg-cell-input-hover-background, var(--hcg-input-hover-background, var(--hcg-cell-input-background, var(--ig-input-background-base))));
        --ig-input-hover-border-color: var(--hcg-cell-input-hover-border-color, var(--hcg-input-hover-border-color, var(--hcg-cell-input-border-color, var(--ig-input-border-color-base))));
    }

    .hcg-pagination {
        --ig-input-padding: var(--hcg-pagination-input-padding, var(--ig-input-padding-base));
        --ig-input-font-weight: var(--hcg-pagination-input-font-weight, var(--hcg-input-font-weight, inherit));
        --ig-input-font-size: var(--hcg-pagination-input-font-size, var(--hcg-input-font-size, inherit));
        --ig-input-font-family: var(--hcg-pagination-input-font-family, var(--hcg-input-font-family, inherit));
        --ig-input-color: var(--hcg-pagination-input-color, var(--ig-input-color-base));
        --ig-input-text-align: var(--hcg-pagination-input-text-align, var(--ig-input-text-align-base));
        --ig-input-border-radius: var(--hcg-pagination-input-border-radius, var(--ig-input-border-radius-base));
        --ig-input-border-width: var(--hcg-pagination-input-border-width, var(--ig-input-border-width-base));
        --ig-input-border-style: var(--hcg-pagination-input-border-style, var(--ig-input-border-style-base));
        --ig-input-border-color: var(--hcg-pagination-input-border-color, var(--ig-input-border-color-base));
        --ig-input-background: var(--hcg-pagination-input-background, var(--ig-input-background-base));
        --ig-input-hover-color: var(--hcg-pagination-input-hover-color, var(--hcg-input-hover-color, var(--hcg-pagination-input-color, var(--ig-input-color-base))));
        --ig-input-hover-background: var(--hcg-pagination-input-hover-background, var(--hcg-input-hover-background, var(--hcg-pagination-input-background, var(--ig-input-background-base))));
        --ig-input-hover-border-color: var(--hcg-pagination-input-hover-border-color, var(--hcg-input-hover-border-color, var(--hcg-pagination-input-border-color, var(--ig-input-border-color-base))));
    }
}

/* Surface application only when themed — utilities win with theme: ''. */
.hcg-themed {
    :where(.hcg-input) {
        font-weight: var(--ig-input-font-weight);
        font-size: var(--ig-input-font-size);
        font-family: var(--ig-input-font-family);
        text-align: var(--ig-input-text-align);
        background: var(--ig-input-background);
        color: var(--ig-input-color);
        border-width: var(--ig-input-border-width);
        border-style: var(--ig-input-border-style);
        border-color: var(--ig-input-border-color);
        border-radius: var(--ig-input-border-radius);
        padding: var(--ig-input-padding);

        &:hover:not(:disabled) {
            color: var(--ig-input-hover-color);
            background: var(--ig-input-hover-background);
            border-color: var(--ig-input-hover-border-color);
        }

        &:focus-visible {
            box-shadow: var(--ig-input-focus-ring);
            border-color: transparent;
        }

        &[type="checkbox"]:checked::before {
            background-color: currentColor;
        }
    }
}

.hcg-container {
    /* ─────────────────────────────────────────────────────────────
     Defaults (internal base tokens)
     ───────────────────────────────────────────────────────────── */
    --ig-button-border-width-base: var(--hcg-button-border-width, 1px);
    --ig-button-border-style-base: var(--hcg-button-border-style, solid);
    --ig-button-border-color-base: var(--hcg-button-border-color, currentColor);
    --ig-button-border-radius-base: var(--hcg-button-border-radius, 0);
    --ig-button-background-base: var(--hcg-button-background, transparent);
    --ig-button-padding-base: var(--hcg-button-padding, 6px);
    --ig-button-color-base: var(--hcg-button-color, inherit);
    --ig-button-hover-color-base: var(--hcg-button-hover-color, inherit);
    --ig-button-hover-background-base: var(--hcg-button-hover-background, transparent);
    --ig-button-hover-border-color-base: var(--hcg-button-hover-border-color, var(--ig-button-border-color-base));
    --ig-button-selected-color-base: var(--hcg-button-selected-color, inherit);
    --ig-button-selected-background-base: var(--hcg-button-selected-background, transparent);
    --ig-button-selected-border-color-base: var(--hcg-button-selected-border-color, var(--ig-button-border-color));

    /* ─────────────────────────────────────────────────────────────
     Public theme overrides (external hcg tokens)
     ───────────────────────────────────────────────────────────── */
    --ig-button-border-width: var(--hcg-button-border-width, var(--ig-button-border-width-base));
    --ig-button-border-style: var(--hcg-button-border-style, var(--ig-button-border-style-base));
    --ig-button-border-color: var(--hcg-button-border-color, var(--ig-button-border-color-base));
    --ig-button-border-radius: var(--hcg-button-border-radius, var(--ig-button-border-radius-base));
    --ig-button-background: var(--hcg-button-background, var(--ig-button-background-base));
    --ig-button-padding: var(--hcg-button-padding, var(--ig-button-padding-base));
    --ig-button-font-weight: var(--hcg-button-font-weight, inherit);
    --ig-button-font-size: var(--hcg-button-font-size, inherit);
    --ig-button-font-family: var(--hcg-button-font-family, inherit);
    --ig-button-color: var(--hcg-button-color, var(--ig-button-color-base));
    --ig-button-hover-color: var(--hcg-button-hover-color, var(--ig-button-hover-color-base));
    --ig-button-hover-background: var(--hcg-button-hover-background, var(--ig-button-hover-background-base));
    --ig-button-hover-border-color: var(--hcg-button-hover-border-color, var(--ig-button-hover-border-color-base));
    --ig-button-selected-color: var(--hcg-button-selected-color, var(--ig-button-selected-color-base));
    --ig-button-selected-background: var(--hcg-button-selected-background, var(--ig-button-selected-background-base));
    --ig-button-selected-border-color: var(--hcg-button-selected-border-color, var(--ig-button-selected-border-color-base));
    --ig-button-focus-ring: 0 0 0 var(--ig-focus-ring-width) var(--ig-focus-ring-color);

    tbody :where(.hcg-cell) {
        --ig-button-background: var(--hcg-cell-button-background, var(--ig-button-background-base));
        --ig-button-color: var(--hcg-cell-button-color, var(--ig-button-color-base));
        --ig-button-border-width: var(--hcg-cell-button-border-width, var(--ig-button-border-width-base));
        --ig-button-border-style: var(--hcg-cell-button-border-style, var(--ig-button-border-style-base));
        --ig-button-border-color: var(--hcg-cell-button-border-color, var(--ig-button-border-color-base));
        --ig-button-border-radius: var(--hcg-cell-button-border-radius, var(--ig-button-border-radius-base));
        --ig-button-padding: var(--hcg-cell-button-padding, var(--ig-button-padding-base));
        --ig-button-font-weight: var(--hcg-cell-button-font-weight, var(--hcg-button-font-weight, inherit));
        --ig-button-font-size: var(--hcg-cell-button-font-size, var(--hcg-button-font-size, inherit));
        --ig-button-font-family: var(--hcg-cell-button-font-family, var(--hcg-button-font-family, inherit));
        --ig-button-hover-color: var(--hcg-cell-button-hover-color, var(--hcg-button-hover-color, var(--hcg-cell-button-color, var(--ig-button-hover-color-base))));
        --ig-button-hover-background: var(--hcg-cell-button-hover-background, var(--hcg-button-hover-background, var(--hcg-cell-button-background, var(--ig-button-hover-background-base))));
        --ig-button-hover-border-color: var(--hcg-cell-button-hover-border-color, var(--hcg-button-hover-border-color, var(--hcg-cell-button-border-color, var(--ig-button-hover-border-color-base))));
        --ig-button-selected-color: var(--hcg-cell-button-selected-color, var(--ig-button-selected-color-base));
        --ig-button-selected-background: var(--hcg-cell-button-selected-background, var(--ig-button-selected-background-base));
        --ig-button-selected-border-color: var(--hcg-cell-button-selected-border-color, var(--ig-button-selected-border-color-base));
    }

    .hcg-pagination {
        --ig-button-background: var(--hcg-pagination-button-background, var(--ig-button-background-base));
        --ig-button-color: var(--hcg-pagination-button-color, var(--ig-button-color-base));
        --ig-button-border-width: var(--hcg-pagination-button-border-width, var(--ig-button-border-width-base));
        --ig-button-border-style: var(--hcg-pagination-button-border-style, var(--ig-button-border-style-base));
        --ig-button-border-color: var(--hcg-pagination-button-border-color, var(--ig-button-border-color-base));
        --ig-button-border-radius: var(--hcg-pagination-button-border-radius, var(--ig-button-border-radius-base));
        --ig-button-padding: var(--hcg-pagination-button-padding, var(--ig-button-padding-base));
        --ig-button-font-weight: var(--hcg-pagination-button-font-weight, var(--hcg-button-font-weight, inherit));
        --ig-button-font-size: var(--hcg-pagination-button-font-size, var(--hcg-button-font-size, inherit));
        --ig-button-font-family: var(--hcg-pagination-button-font-family, var(--hcg-button-font-family, inherit));
        --ig-button-hover-color: var(--hcg-pagination-button-hover-color, var(--hcg-button-hover-color, var(--hcg-pagination-button-color, var(--ig-button-hover-color-base))));
        --ig-button-hover-background: var(--hcg-pagination-button-hover-background, var(--hcg-button-hover-background, var(--hcg-pagination-button-background, var(--ig-button-hover-background-base))));
        --ig-button-hover-border-color: var(--hcg-pagination-button-hover-border-color, var(--hcg-button-hover-border-color, var(--hcg-pagination-button-border-color, var(--ig-button-hover-border-color-base))));
        --ig-button-selected-color: var(--hcg-pagination-button-selected-color, var(--ig-button-selected-color-base));
        --ig-button-selected-background: var(--hcg-pagination-button-selected-background, var(--ig-button-selected-background-base));
        --ig-button-selected-border-color: var(--hcg-pagination-button-selected-border-color, var(--ig-button-selected-border-color-base));
    }
}

/* Surface application only when themed — utilities win with theme: ''. */
.hcg-themed {
    :where(.hcg-button) {
        font-weight: var(--ig-button-font-weight);
        font-size: var(--ig-button-font-size);
        font-family: var(--ig-button-font-family);
        color: var(--ig-button-color);
        background: var(--ig-button-background);
        padding-block: var(--ig-button-padding);
        padding-inline: var(--ig-button-padding);
        min-height: calc(1em + (2 * var(--ig-button-padding)));
        border-width: var(--ig-button-border-width);
        border-style: var(--ig-button-border-style);
        border-color: var(--ig-button-border-color);
        border-radius: var(--ig-button-border-radius);

        &.hcg-button-selected,
        &.hcg-button-selected:hover:not(thead th *) {
            color: var(--ig-button-selected-color);
            background: var(--ig-button-selected-background);
            border-color: var(--ig-button-selected-border-color);
        }

        &.hcg-button-selected::after {
            background: var(--ig-button-selected-color);
        }

        &.hcg-button-selected:hover::after {
            background: var(--ig-button-hover-color);
        }

        &:hover:not(:disabled) {
            color: var(--ig-button-hover-color);
            background: var(--ig-button-hover-background);
            border-color: var(--ig-button-hover-border-color);
        }

        &:focus-visible {
            box-shadow: var(--ig-button-focus-ring);
            border-color: transparent;
        }
    }
}

.hcg-container {
    /* ─────────────────────────────────────────────────────────────
     Defaults (internal base tokens)
     ───────────────────────────────────────────────────────────── */
    --ig-icon-border-width-base: var(--hcg-icon-border-width, 1px);
    --ig-icon-border-style-base: var(--hcg-icon-border-style, solid);
    --ig-icon-border-color-base: var(--hcg-icon-border-color, transparent);
    --ig-icon-border-radius-base: var(--hcg-icon-border-radius, 0);
    --ig-icon-padding-base: var(--hcg-icon-padding, 6px);
    --ig-icon-font-weight-base: var(--hcg-icon-font-weight, inherit);
    --ig-icon-font-size-base: var(--hcg-icon-font-size, inherit);
    --ig-icon-font-family-base: var(--hcg-icon-font-family, inherit);
    --ig-icon-background-base: var(--hcg-icon-background, transparent);
    --ig-icon-color-base: var(--hcg-icon-color, inherit);
    --ig-icon-hover-color-base: var(--hcg-icon-hover-color, var(--ig-icon-color-base));
    --ig-icon-hover-background-source-base: var(--hcg-icon-hover-background, var(--ig-default-color));
    --ig-icon-hover-background-base: color-mix(in srgb, var(--ig-icon-hover-background-source-base) 12%, transparent);
    --ig-icon-hover-border-color-base: var(--hcg-icon-hover-border-color, var(--ig-icon-border-color-base));
    --ig-icon-focus-ring: inset 0 0 0 var(--ig-focus-ring-width) var(--ig-focus-ring-color);

    /* ─────────────────────────────────────────────────────────────
     Public theme overrides (external hcg tokens)
     ───────────────────────────────────────────────────────────── */
    --ig-icon-border-width: var(--hcg-icon-border-width, var(--ig-icon-border-width-base));
    --ig-icon-border-style: var(--hcg-icon-border-style, var(--ig-icon-border-style-base));
    --ig-icon-border-color: var(--hcg-icon-border-color, var(--ig-icon-border-color-base));
    --ig-icon-border-radius: var(--hcg-icon-border-radius, var(--ig-icon-border-radius-base));
    --ig-icon-padding: var(--hcg-icon-padding, var(--ig-icon-padding-base));
    --ig-icon-font-weight: var(--hcg-icon-font-weight, var(--ig-icon-font-weight-base));
    --ig-icon-font-size: var(--hcg-icon-font-size, var(--ig-icon-font-size-base));
    --ig-icon-font-family: var(--hcg-icon-font-family, var(--ig-icon-font-family-base));
    --ig-icon-background: var(--hcg-icon-background, var(--ig-icon-background-base));
    --ig-icon-color: var(--hcg-icon-color, var(--ig-icon-color-base));
    --ig-icon-hover-color: var(--hcg-icon-hover-color, var(--ig-icon-hover-color-base));
    --ig-icon-hover-background-source: var(--hcg-icon-hover-background, var(--ig-icon-hover-background-source-base));
    --ig-icon-hover-background: color-mix(in srgb, var(--ig-icon-hover-background-source) 12%, transparent);
    --ig-icon-hover-border-color: var(--hcg-icon-hover-border-color, var(--ig-icon-hover-border-color-base));

    thead th {
        --ig-icon-background: var(--hcg-header-icon-background, var(--ig-icon-background-base));
        --ig-icon-color: var(--hcg-header-icon-color, var(--ig-icon-color-base));
        --ig-icon-border-width: var(--hcg-header-icon-border-width, var(--ig-icon-border-width-base));
        --ig-icon-border-style: var(--hcg-header-icon-border-style, var(--ig-icon-border-style-base));
        --ig-icon-border-color: var(--hcg-header-icon-border-color, var(--ig-icon-border-color-base));
        --ig-icon-border-radius: var(--hcg-header-icon-border-radius, var(--ig-icon-border-radius-base));
        --ig-icon-padding: var(--hcg-header-icon-padding, var(--ig-icon-padding-base));
        --ig-icon-font-weight: var(--hcg-header-icon-font-weight, var(--ig-icon-font-weight-base));
        --ig-icon-font-size: var(--hcg-header-icon-font-size, var(--ig-icon-font-size-base));
        --ig-icon-font-family: var(--hcg-header-icon-font-family, var(--ig-icon-font-family-base));
        --ig-icon-hover-color: var(--hcg-header-icon-hover-color, var(--hcg-icon-hover-color, var(--hcg-header-icon-color, var(--ig-icon-hover-color-base))));
        --ig-icon-hover-background-source: var(--hcg-header-icon-hover-background, var(--hcg-icon-hover-background, var(--ig-icon-hover-background-source-base)));
        --ig-icon-hover-background: color-mix(in srgb, var(--ig-icon-hover-background-source) 12%, transparent);
        --ig-icon-hover-border-color: var(--hcg-header-icon-hover-border-color, var(--hcg-icon-hover-border-color, var(--hcg-header-icon-border-color, var(--ig-icon-hover-border-color-base))));
    }

    tbody :where(.hcg-cell) {
        --ig-icon-background: var(--hcg-cell-icon-background, var(--ig-icon-background-base));
        --ig-icon-color: var(--hcg-cell-icon-color, var(--ig-icon-color-base));
        --ig-icon-border-width: var(--hcg-cell-icon-border-width, var(--ig-icon-border-width-base));
        --ig-icon-border-style: var(--hcg-cell-icon-border-style, var(--ig-icon-border-style-base));
        --ig-icon-border-color: var(--hcg-cell-icon-border-color, var(--ig-icon-border-color-base));
        --ig-icon-border-radius: var(--hcg-cell-icon-border-radius, var(--ig-icon-border-radius-base));
        --ig-icon-padding: var(--hcg-cell-icon-padding, var(--ig-icon-padding-base));
        --ig-icon-font-weight: var(--hcg-cell-icon-font-weight, var(--ig-icon-font-weight-base));
        --ig-icon-font-size: var(--hcg-cell-icon-font-size, var(--ig-icon-font-size-base));
        --ig-icon-font-family: var(--hcg-cell-icon-font-family, var(--ig-icon-font-family-base));
        --ig-icon-hover-color: var(--hcg-cell-icon-hover-color, var(--hcg-icon-hover-color, var(--hcg-cell-icon-color, var(--ig-icon-hover-color-base))));
        --ig-icon-hover-background-source: var(--hcg-cell-icon-hover-background, var(--hcg-icon-hover-background, var(--ig-icon-hover-background-source-base)));
        --ig-icon-hover-background: color-mix(in srgb, var(--ig-icon-hover-background-source) 12%, transparent);
        --ig-icon-hover-border-color: var(--hcg-cell-icon-hover-border-color, var(--hcg-icon-hover-border-color, var(--hcg-cell-icon-border-color, var(--ig-icon-hover-border-color-base))));
    }

    :where(.hcg-icon) {
        font-weight: var(--ig-icon-font-weight);
        font-size: var(--ig-icon-font-size);
        font-family: var(--ig-icon-font-family);
        color: var(--ig-icon-color);
        background: var(--ig-icon-background);
        padding-block: var(--ig-icon-padding);
        padding-inline: var(--ig-icon-padding);
        min-height: calc(1em + (2 * var(--ig-icon-padding)));
        border-width: var(--ig-icon-border-width);
        border-style: var(--ig-icon-border-style);
        border-color: var(--ig-icon-border-color);
        border-radius: var(--ig-icon-border-radius);

        &:hover:not(:disabled),
        &.hcg-icon-highlighted {
            color: var(--ig-icon-hover-color);
            background: var(--ig-icon-hover-background);
            border-color: var(--ig-icon-hover-border-color);
        }

        &:focus-visible {
            box-shadow: var(--ig-icon-focus-ring);
        }
    }
}

/*
 * Caption surface applies under `.hcg-themed`. With `theme: ''`, utility
 * classNames on `caption.className` win without `!important`.
 */
.hcg-themed .hcg-caption {
    color: var(--hcg-caption-color, var(--ig-color));
    font-weight: var(--hcg-caption-font-weight, var(--ig-font-weight));
    font-size: var(--hcg-caption-font-size, var(--ig-font-size));
    font-family: var(--hcg-caption-font-family, var(--ig-font-family));
    text-align: var(--hcg-caption-text-align, var(--ig-text-align));
    padding-top: 0;
    padding-right: var(--hcg-caption-horizontal-padding, var(--hcg-caption-padding, var(--ig-horizontal-padding)));
    padding-bottom: var(--hcg-caption-vertical-padding, var(--hcg-caption-padding, var(--ig-vertical-padding)));
    padding-left: var(--hcg-caption-horizontal-padding, var(--hcg-caption-padding, var(--ig-horizontal-padding)));
}

/*
 * Description surface applies under `.hcg-themed`. With `theme: ''`, utility
 * classNames on `description.className` win without `!important`.
 */
.hcg-themed .hcg-description {
    color: var(--hcg-description-color, var(--ig-color));
    font-weight: var(--hcg-description-font-weight, var(--ig-font-weight));
    font-size: var(--hcg-description-font-size, var(--ig-font-size));
    font-family: var(--hcg-description-font-family, var(--ig-font-family));
    text-align: var(--hcg-description-text-align, var(--ig-text-align));
    padding-top: var(--hcg-description-vertical-padding, var(--hcg-description-padding, var(--ig-vertical-padding)));
    padding-right: var(--hcg-description-horizontal-padding, var(--hcg-description-padding, var(--ig-horizontal-padding)));
    padding-bottom: 0;
    padding-left: var(--hcg-description-horizontal-padding, var(--hcg-description-padding, var(--ig-horizontal-padding)));
}

.hcg-themed .hcg-pagination {
    background: var(--hcg-pagination-background, transparent);
    color: var(--hcg-pagination-color, var(--ig-color));
    font-weight: var(--hcg-pagination-font-weight, var(--ig-font-weight));
    font-size: var(--hcg-pagination-font-size, var(--ig-font-size));
    font-family: var(--hcg-pagination-font-family, var(--ig-font-family));
    text-align: var(--hcg-pagination-text-align, var(--ig-text-align));
    padding-top: var(--hcg-pagination-vertical-padding, var(--hcg-pagination-padding, var(--ig-vertical-padding)));
    padding-right: var(--hcg-pagination-horizontal-padding, var(--hcg-pagination-padding, var(--ig-horizontal-padding)));
    padding-bottom: var(--hcg-pagination-vertical-padding, var(--hcg-pagination-padding, var(--ig-vertical-padding)));
    padding-left: var(--hcg-pagination-horizontal-padding, var(--hcg-pagination-padding, var(--ig-horizontal-padding)));
    gap: var(--hcg-pagination-gap, 0.75rem);

    .hcg-pagination-controls,
    .hcg-pagination-pages {
        gap: 2px;
    }

    .hcg-pagination-pages .hcg-button {
        min-width: 30px;
    }

    .hcg-pagination-pages span {
        min-width: 20px;
    }

    .hcg-pagination-page-size {
        text-align: right;

        select.hcg-input {
            width: 60px;
            margin-left: 8px;
        }
    }
}

.hcg-themed {
    .hcg-table {
        /* Row borders */
        --ig-row-border-width: var(--hcg-row-border-width, var(--hcg-border-width));
        --ig-row-border-style: var(--hcg-row-border-style, var(--hcg-border-style, solid));
        --ig-row-border-color: var(--hcg-row-border-color, var(--hcg-border-color));
        --ig-row-border: var(--ig-row-border-width) var(--ig-row-border-style) var(--ig-row-border-color);

        /* Header row borders */
        --ig-header-row-border-width: var(--hcg-header-row-border-width, var(--ig-row-border-width));
        --ig-header-row-border-style: var(--hcg-header-row-border-style, var(--ig-row-border-style));
        --ig-header-row-border-color: var(--hcg-header-row-border-color, var(--ig-row-border-color));
        --ig-header-row-border: var(--ig-header-row-border-width) var(--ig-header-row-border-style) var(--ig-header-row-border-color);

        /* Column borders */
        --ig-column-border-width: var(--hcg-column-border-width, var(--hcg-border-width));
        --ig-column-border-style: var(--hcg-column-border-style, var(--hcg-border-style, solid));
        --ig-column-border-color: var(--hcg-column-border-color, var(--hcg-border-color));
        --ig-column-border: var(--ig-column-border-width) var(--ig-column-border-style) var(--ig-column-border-color);

        /* Header column borders */
        --ig-header-column-border-width: var(--hcg-header-column-border-width, var(--ig-column-border-width));
        --ig-header-column-border-style: var(--hcg-header-column-border-style, var(--ig-column-border-style));
        --ig-header-column-border-color: var(--hcg-header-column-border-color, var(--ig-column-border-color));
        --ig-header-column-border: var(--ig-header-column-border-width) var(--ig-header-column-border-style) var(--ig-header-column-border-color);
        --ig-table-border: var(--hcg-border-width) var(--hcg-border-style, solid) var(--hcg-border-color);

        border: var(--ig-table-border);
        background: var(--hcg-background);
        border-radius: var(--hcg-border-radius);
    }

    .hcg-table thead th {
        --ig-header-column-background: var(--hcg-column-background);
        --ig-header-background: var(--hcg-header-background, var(--hcg-cell-background, var(--ig-header-column-background, transparent)));
        --ig-header-column-color: var(--hcg-column-color, var(--hcg-cell-color, var(--hcg-color, inherit)));
        --ig-header-base-color: var(--hcg-header-color, var(--ig-header-column-color));
        --ig-header-current-color: var(--ig-header-base-color);

        /* soft weight/family; size without fallback gates the font shorthand */
        --ig-header-column-font-weight: var(--hcg-column-font-weight, var(--hcg-cell-font-weight, var(--hcg-font-weight, normal)));
        --ig-header-base-font-weight: var(--hcg-header-font-weight, var(--ig-header-column-font-weight));
        --ig-header-current-font-weight: var(--ig-header-base-font-weight);
        --ig-header-column-font-size: var(--hcg-column-font-size, var(--hcg-cell-font-size, var(--hcg-font-size)));
        --ig-header-base-font-size: var(--hcg-header-font-size, var(--ig-header-column-font-size));
        --ig-header-current-font-size: var(--ig-header-base-font-size);
        --ig-header-column-font-family: var(--hcg-column-font-family, var(--hcg-cell-font-family, var(--hcg-font-family, var(--ig-default-font-family))));
        --ig-header-base-font-family: var(--hcg-header-font-family, var(--ig-header-column-font-family));
        --ig-header-current-font-family: var(--ig-header-base-font-family);
        --ig-header-hover-opacity: var(--hcg-header-hover-opacity, var(--hcg-column-hover-header-opacity, var(--hcg-column-hover-opacity, var(--ig-hover-opacity))));

        border-right: var(--ig-header-column-border);
        border-bottom: var(--ig-header-row-border);
        background: var(--ig-header-background);
        color: var(--ig-header-current-color);
        --ig-header-applied-font: var(--ig-header-current-font-weight) var(--ig-header-current-font-size) var(--ig-header-current-font-family);

        font: var(--ig-header-applied-font);
        padding-top: var(--hcg-header-vertical-padding, var(--hcg-header-padding, var(--hcg-vertical-padding, var(--hcg-padding))));
        padding-right: var(--hcg-header-horizontal-padding, var(--hcg-header-padding, var(--hcg-horizontal-padding, var(--hcg-padding))));
        padding-bottom: var(--hcg-header-vertical-padding, var(--hcg-header-padding, var(--hcg-vertical-padding, var(--hcg-padding))));
        padding-left: var(--hcg-header-horizontal-padding, var(--hcg-header-padding, var(--hcg-horizontal-padding, var(--hcg-padding))));
    }

    .hcg-table thead th:nth-child(even) {
        --ig-header-column-background: var(--hcg-column-even-background, var(--hcg-column-background));
        --ig-header-background: var(--hcg-header-even-background, var(--hcg-header-background, var(--hcg-cell-background, var(--ig-header-column-background, transparent))));
        --ig-header-column-color: var(--hcg-column-even-color, var(--hcg-column-color, var(--hcg-cell-color, var(--hcg-color, inherit))));
        --ig-header-base-color: var(--hcg-header-even-color, var(--hcg-header-color, var(--ig-header-column-color)));
        --ig-header-current-color: var(--ig-header-base-color);
        --ig-header-column-font-weight: var(--hcg-column-even-font-weight, var(--hcg-column-font-weight, var(--hcg-cell-font-weight, var(--hcg-font-weight, normal))));
        --ig-header-base-font-weight: var(--hcg-header-even-font-weight, var(--hcg-header-font-weight, var(--ig-header-column-font-weight)));
        --ig-header-current-font-weight: var(--ig-header-base-font-weight);
        --ig-header-column-font-size: var(--hcg-column-even-font-size, var(--hcg-column-font-size, var(--hcg-cell-font-size, var(--hcg-font-size))));
        --ig-header-base-font-size: var(--hcg-header-even-font-size, var(--hcg-header-font-size, var(--ig-header-column-font-size)));
        --ig-header-current-font-size: var(--ig-header-base-font-size);
        --ig-header-column-font-family: var(--hcg-column-even-font-family, var(--hcg-column-font-family, var(--hcg-cell-font-family, var(--hcg-font-family, var(--ig-default-font-family)))));
        --ig-header-base-font-family: var(--hcg-header-even-font-family, var(--hcg-header-font-family, var(--ig-header-column-font-family)));
        --ig-header-current-font-family: var(--ig-header-base-font-family);
    }

    .hcg-table thead th .hcg-header-cell-content {
        --ig-header-font-weight: var(--ig-header-current-font-weight);
        --ig-header-font-size: var(--ig-header-current-font-size);
        --ig-header-font-family: var(--ig-header-current-font-family);
        --ig-header-font: var(--ig-header-font-weight) var(--ig-header-font-size) var(--ig-header-font-family);
        --ig-header-text-align: var(--hcg-header-text-align, var(--hcg-cell-text-align, var(--hcg-text-align)));

        font: var(--ig-header-font);
        text-align: var(--ig-header-text-align);
    }

    .hcg-table thead tr:first-of-type th:first-child {
        border-top-left-radius: var(--hcg-border-radius);
    }

    .hcg-table thead tr:first-of-type th:last-child {
        border-top-right-radius: var(--hcg-border-radius);
    }

    .hcg-table thead th:focus-visible {
        outline: none;
        box-shadow: inset var(--ig-focus-ring);
    }

    /* Start header hover & sync */
    .hcg-table thead th:hover {
        --ig-header-hover-background:
            color-mix(
                in srgb,
                var(--hcg-header-hovered-background, var(--hcg-header-hover-background, var(--hcg-column-hover-header-background, var(--hcg-column-hover-background, var(--ig-header-background))))) var(--ig-header-hover-opacity),
                var(--ig-header-background) calc(100% - var(--ig-header-hover-opacity))
            );

        background: var(--ig-header-hover-background);
        --ig-header-color:
            var(
                --hcg-header-hovered-color,
                var(
                    --hcg-header-hover-color,
                    var(--hcg-column-hover-header-color, var(--hcg-column-hover-color, var(--ig-header-base-color)))
                )
            );
        --ig-header-current-color: var(--ig-header-color);

        color: var(--ig-header-current-color);
    }

    /* End header hover & sync */

    /* <tbody> */
    .hcg-table > tbody:last-of-type > tr:last-of-type > :where(.hcg-cell):first-child {
        border-bottom-left-radius: var(--hcg-border-radius);
    }

    .hcg-table > tbody:last-of-type > tr:last-of-type > :where(.hcg-cell):last-child {
        border-bottom-right-radius: var(--hcg-border-radius);
    }

    .hcg-table > tbody:last-of-type {
        border-bottom-left-radius: var(--hcg-border-radius);
        border-bottom-right-radius: var(--hcg-border-radius);
    }

    .hcg-table tbody tr {
        --ig-row-background-current: var(--hcg-row-background);
        --ig-row-color-current: var(--hcg-row-color);
        --ig-row-font-weight-current: var(--hcg-row-font-weight);
        --ig-row-font-size-current: var(--hcg-row-font-size);
        --ig-row-font-family-current: var(--hcg-row-font-family);
    }

    .hcg-table tbody tr.hcg-row-even {
        --ig-row-background-current: var(--hcg-row-even-background, var(--hcg-row-background));
        --ig-row-color-current: var(--hcg-row-even-color, var(--hcg-row-color));
        --ig-row-font-weight-current: var(--hcg-row-even-font-weight, var(--hcg-row-font-weight));
        --ig-row-font-size-current: var(--hcg-row-even-font-size, var(--hcg-row-font-size));
        --ig-row-font-family-current: var(--hcg-row-even-font-family, var(--hcg-row-font-family));
    }

    .hcg-table tbody tr > :where(.hcg-cell) {
        --ig-cell-column-background: var(--hcg-column-background);
        --ig-cell-column-color: var(--hcg-column-color);
        --ig-cell-column-font-weight: var(--hcg-column-font-weight);
        --ig-cell-column-font-size: var(--hcg-column-font-size);
        --ig-cell-column-font-family: var(--hcg-column-font-family);
        --ig-cell-base-background: var(--hcg-cell-background, var(--ig-row-background-current, var(--ig-cell-column-background, transparent)));
        --ig-column-layer: var(--ig-cell-base-background);
        --ig-cell-hover-background-helper: var(--hcg-cell-hovered-background, var(--hcg-cell-hover-background));
        --ig-cell-hover-background: var(--ig-cell-hover-background-helper, var(--ig-row-hover-color, var(--ig-column-layer)));
        --ig-cell-hover-opacity-helper: var(--hcg-cell-hover-opacity);
        --ig-cell-hover-opacity: var(--ig-cell-hover-opacity-helper, var(--ig-hover-opacity));
        --ig-cell-active-opacity: var(--ig-cell-hover-opacity);
        --ig-cell-sync-opacity: var(--hcg-cell-sync-opacity, var(--hcg-sync-opacity, var(--ig-cell-hover-opacity)));
        --ig-cell-base-color: var(--hcg-cell-color, var(--ig-row-color-current, var(--ig-cell-column-color, var(--hcg-color, inherit))));
        --ig-column-text-layer: var(--ig-cell-base-color);
        --ig-row-hover-text-color: var(--ig-column-text-layer);
        --ig-cell-hover-text-color: var(--ig-row-hover-text-color);
        --ig-cell-base-font-weight: var(--hcg-cell-font-weight, var(--ig-row-font-weight-current, var(--ig-cell-column-font-weight, var(--hcg-font-weight, normal))));
        --ig-cell-font-weight: var(--ig-cell-base-font-weight);
        --ig-cell-base-font-size: var(--hcg-cell-font-size, var(--ig-row-font-size-current, var(--ig-cell-column-font-size, var(--hcg-font-size))));
        --ig-cell-font-size: var(--ig-cell-base-font-size);
        --ig-cell-base-font-family: var(--hcg-cell-font-family, var(--ig-row-font-family-current, var(--ig-cell-column-font-family, var(--hcg-font-family, var(--ig-default-font-family)))));
        --ig-cell-font-family: var(--ig-cell-base-font-family);
        --ig-cell-font: var(--ig-cell-font-weight) var(--ig-cell-font-size) var(--ig-cell-font-family);
        --ig-cell-text-align: var(--hcg-cell-text-align, var(--hcg-text-align));

        background: var(--ig-column-layer);
        color: var(--ig-cell-hover-text-color);
        border-right: var(--ig-column-border);
        border-bottom: var(--ig-row-border);
        --ig-cell-applied-padding: var(--hcg-vertical-padding, var(--hcg-padding)) var(--hcg-horizontal-padding, var(--hcg-padding));

        padding: var(--ig-cell-applied-padding);
        font: var(--ig-cell-font);
        text-align: var(--ig-cell-text-align);
    }

    .hcg-table tbody tr > :where(.hcg-cell):nth-child(even) {
        --ig-cell-column-background: var(--hcg-column-even-background, var(--hcg-column-background));
        --ig-cell-column-color: var(--hcg-column-even-color, var(--hcg-column-color));
        --ig-cell-column-font-weight: var(--hcg-column-even-font-weight, var(--hcg-column-font-weight));
        --ig-cell-column-font-size: var(--hcg-column-even-font-size, var(--hcg-column-font-size));
        --ig-cell-column-font-family: var(--hcg-column-even-font-family, var(--hcg-column-font-family));
    }

    .hcg-table tbody :where(.hcg-cell):focus {
        box-shadow: inset var(--ig-focus-ring);
    }

    /* Start column hover & sync */
    .hcg-table tbody :where(.hcg-cell).hcg-hovered-column {
        --ig-column-layer:
            color-mix(
                in srgb,
                var(--hcg-cell-hovered-column-background, var(--hcg-column-hover-background, var(--ig-cell-base-background))) var(--hcg-column-hover-opacity, var(--ig-hover-opacity)),
                var(--ig-cell-base-background) calc(100% - var(--hcg-column-hover-opacity, var(--ig-hover-opacity)))
            );
        --ig-column-text-layer: var(--hcg-cell-hovered-column-color, var(--hcg-column-hover-color, var(--ig-cell-base-color)));
    }

    .hcg-table tbody :where(.hcg-cell).hcg-synced-column {
        --ig-column-layer:
            color-mix(
                in srgb,
                var(
                    --hcg-cell-synced-column-background,
                    var(--hcg-cell-hovered-column-background, var(--hcg-column-sync-background, var(--hcg-column-hover-background, var(--ig-cell-base-background))))
                ) var(--hcg-column-sync-opacity, var(--hcg-sync-opacity, var(--hcg-column-hover-opacity, var(--ig-hover-opacity)))),
                var(--ig-cell-base-background)
                calc(100% - var(--hcg-column-sync-opacity, var(--hcg-sync-opacity, var(--hcg-column-hover-opacity, var(--ig-hover-opacity)))))
            );
        --ig-column-text-layer:
            var(
                --hcg-cell-synced-column-color,
                var(--hcg-cell-hovered-column-color, var(--hcg-column-sync-color, var(--hcg-column-hover-color, var(--ig-cell-base-color))))
            );
    }

    .hcg-table thead th.hcg-hovered-column:not(:hover) {
        --ig-header-column-hover-color:
            color-mix(
                in srgb,
                var(--hcg-cell-hovered-header-background, var(--hcg-column-hover-header-background, var(--hcg-column-hover-background, var(--ig-header-background)))) var(--hcg-column-hover-header-opacity, var(--hcg-column-hover-opacity, var(--ig-hover-opacity))),
                var(--ig-header-background) calc(100% - var(--hcg-column-hover-header-opacity, var(--hcg-column-hover-opacity, var(--ig-hover-opacity))))
            );
        --ig-header-color: var(--hcg-cell-hovered-header-color, var(--hcg-column-hover-header-color, var(--hcg-column-hover-color, var(--ig-header-base-color))));
        --ig-header-current-color: var(--ig-header-color);

        background: var(--ig-header-column-hover-color);
        color: var(--ig-header-current-color);
    }

    .hcg-table thead th.hcg-synced-column:not(:hover) {
        --ig-header-sync-opacity:
            var(
                --hcg-header-sync-opacity,
                var(
                    --hcg-column-sync-header-opacity,
                    var(--hcg-sync-opacity, var(--hcg-column-hover-header-opacity, var(--hcg-column-hover-opacity, var(--ig-hover-opacity))))
                )
            );
        --ig-header-column-hover-color:
            color-mix(
                in srgb,
                var(
                    --hcg-cell-synced-header-background,
                    var(
                        --hcg-cell-hovered-header-background,
                        var(
                            --hcg-column-sync-header-background,
                            var(--hcg-column-hover-header-background, var(--hcg-column-hover-background, var(--ig-header-background)))
                        )
                    )
                ) var(--ig-header-sync-opacity),
                var(--ig-header-background)
                calc(
                    100% - var(
                        --ig-header-sync-opacity
                    )
                )
            );
        --ig-header-color:
            var(
                --hcg-cell-synced-header-color,
                var(
                    --hcg-cell-hovered-header-color,
                    var(--hcg-column-sync-header-color, var(--hcg-column-hover-header-color, var(--hcg-column-hover-color, var(--ig-header-base-color))))
                )
            );
        --ig-header-current-color: var(--ig-header-color);

        background: var(--ig-header-column-hover-color);
        color: var(--ig-header-current-color);
    }

    /* End column hover & sync */

    /* Start row hover & sync */
    .hcg-table tbody tr:hover > :where(.hcg-cell) {
        --ig-row-hover-color:
            color-mix(
                in srgb,
                var(--hcg-cell-hovered-row-background, var(--hcg-row-hover-background, var(--ig-column-layer))) var(--hcg-row-hover-opacity, var(--ig-hover-opacity)),
                var(--ig-column-layer) calc(100% - var(--hcg-row-hover-opacity, var(--ig-hover-opacity)))
            );
        --ig-row-hover-text-color: var(--hcg-cell-hovered-row-color, var(--hcg-row-hover-color, var(--ig-column-text-layer)));
        --ig-cell-hover-text-color: var(--ig-row-hover-text-color);

        background: var(--ig-row-hover-color);
        color: var(--ig-cell-hover-text-color);
    }

    .hcg-table tbody tr.hcg-synced-row > :where(.hcg-cell) {
        --ig-row-hover-color:
            color-mix(
                in srgb,
                var(
                    --hcg-cell-synced-row-background,
                    var(--hcg-cell-hovered-row-background, var(--hcg-row-sync-background, var(--hcg-row-hover-background, var(--ig-column-layer))))
                )
                var(--hcg-row-sync-opacity, var(--hcg-sync-opacity, var(--hcg-row-hover-opacity, var(--ig-hover-opacity)))),
                var(--ig-column-layer)
                calc(100% - var(--hcg-row-sync-opacity, var(--hcg-sync-opacity, var(--hcg-row-hover-opacity, var(--ig-hover-opacity)))))
            );
        --ig-row-hover-text-color:
            var(
                --hcg-cell-synced-row-color,
                var(--hcg-cell-hovered-row-color, var(--hcg-row-sync-color, var(--hcg-row-hover-color, var(--ig-column-text-layer))))
            );
        --ig-cell-hover-text-color: var(--ig-row-hover-text-color);

        background: var(--ig-row-hover-color);
        color: var(--ig-cell-hover-text-color);
    }

    /* End row hover & sync */

    /* Start cell hover & sync */
    .hcg-table tbody :where(.hcg-cell):hover,
    .hcg-table tbody tr:hover > :where(.hcg-cell):hover,
    .hcg-table tbody :where(.hcg-cell).hcg-hovered-column:hover {
        --ig-cell-hover-layer:
            color-mix(
                in srgb,
                var(--ig-cell-hover-background) var(--ig-cell-hover-opacity),
                var(--ig-row-hover-color, var(--ig-column-layer)) calc(100% - var(--ig-cell-hover-opacity))
            );
        --ig-cell-hover-text-color: var(--hcg-cell-hovered-color, var(--hcg-cell-hover-color, var(--ig-row-hover-text-color)));

        background: var(--ig-cell-hover-layer);
        color: var(--ig-cell-hover-text-color);
    }

    .hcg-table tbody tr.hcg-synced-row > :where(.hcg-cell).hcg-synced-column {
        --ig-cell-hover-layer:
            color-mix(
                in srgb,
                var(
                    --hcg-cell-synced-background,
                    var(
                        --hcg-cell-hovered-background,
                        var(--hcg-cell-sync-background, var(--hcg-cell-hover-background, var(--ig-row-hover-color, var(--ig-column-layer))))
                    )
                ) var(--hcg-cell-synced-opacity, var(--hcg-cell-sync-opacity, var(--hcg-sync-opacity, var(--hcg-cell-hover-opacity, var(--ig-cell-hover-opacity))))),
                var(--ig-row-hover-color, var(--ig-column-layer))
                calc(100% - var(--hcg-cell-synced-opacity, var(--hcg-cell-sync-opacity, var(--hcg-sync-opacity, var(--hcg-cell-hover-opacity, var(--ig-cell-hover-opacity))))))
            );
        --ig-cell-hover-text-color:
            var(
                --hcg-cell-synced-color,
                var(--hcg-cell-hovered-color, var(--hcg-cell-sync-color, var(--hcg-cell-hover-color, var(--ig-row-hover-text-color))))
            );

        background: var(--ig-cell-hover-layer);
        color: var(--ig-cell-hover-text-color);
    }

    /* End cell hover & sync */

    .hcg-table tfoot td {
        border-top: var(--ig-row-border);
    }
}

.hcg-theme-default,
.highcharts-light .hcg-theme-default {
    --hcg-color: var(--highcharts-neutral-color-100);
    --hcg-background: var(--highcharts-background-color);
    --hcg-border-radius: 5px;
    --hcg-border-width: 1px;
    --hcg-font-size: 15px;
    --hcg-text-align: left;
    --hcg-caption-font-size: 18px;
    --hcg-padding: 15px;
    --hcg-header-vertical-padding: 10px;
    --hcg-pagination-vertical-padding: 10px;
    --hcg-focus-ring-color: #626bd0;
    --hcg-input-border-radius: 6px;
    --hcg-input-border-color: #d1d1d1;
    --hcg-input-hover-border-color: #9d9d9d;
    --hcg-input-background: var(--highcharts-background-color);
    --hcg-input-padding: 5px;
    --hcg-button-border-radius: 6px;
    --hcg-button-hover-color: #000000;
    --hcg-button-hover-background: #e8e8e8;
    --hcg-button-border-color: transparent;
    --hcg-button-selected-color: #ffffff;
    --hcg-button-selected-background: #000000;
    --hcg-cell-button-border-color: #d1d1d1;
    --hcg-button-color: #141414;
    --hcg-icon-border-radius: 6px;
    --hcg-pagination-button-selected-background: #000000;
    --hcg-pagination-button-selected-color: #ffffff;
    --hcg-loader-color: light-dark(#000000, #ffffff);

    /* Popup */
    --hcg-popup-color: var(--hcg-color);
    --hcg-popup-background: #f6f6f6;
    --hcg-popup-border-color: #e8e8e8;
    --hcg-popup-border-radius: 6px;
    --hcg-popup-box-shadow:
        0 2px 4px 0 rgba(0, 0, 0, 0.08),
        0 7px 7px 0 rgba(0, 0, 0, 0.07),
        0 17px 10px 0 rgba(0, 0, 0, 0.04),
        0 30px 12px 0 rgba(0, 0, 0, 0.01);
    --hcg-popup-content-padding: 5px;
    --hcg-popup-header-font-size: 0.75rem;
    --hcg-popup-header-padding: 3px;
    --hcg-menu-item-hover-background: #ffffff;
    --hcg-menu-item-hover-border-color: #e8e8e8;
    --hcg-menu-item-active-background: #e1e3ff;
    --hcg-menu-item-active-border-color: #c3c8ff;
    --hcg-menu-item-divider-color: #e8e8e8;
    --hcg-menu-item-padding: 8px 8px 8px 12px;
    --hcg-menu-item-font-size: 0.75rem;
    --hcg-menu-item-font-weight: 600;
    --hcg-menu-item-border-radius: 5px;
    --hcg-menu-item-min-height: 2rem;
    --hcg-menu-row-gap: 5px;

    /* Grid Pro: editing / notifications */
    --hcg-cell-editable-background: #dbeaff;
    --hcg-notification-box-shadow: 0 0 15px 1px #00000030;
}

@media (prefers-color-scheme: dark) {
    .hcg-theme-default {
        --hcg-input-border-color: #4f4f4f;
        --hcg-input-hover-border-color: #646464;
        --hcg-button-color: #ffffff;
        --hcg-button-hover-color: #ffffff;
        --hcg-button-hover-background: #3f3f3f;
        --hcg-button-selected-color: #000000;
        --hcg-button-selected-background: #ffffff;
        --hcg-cell-button-border-color: #646464;
        --hcg-pagination-button-selected-background: #ffffff;
        --hcg-pagination-button-selected-color: #000000;
        --hcg-popup-background: #272727;
        --hcg-popup-border-color: #4f4f4f;
        --hcg-menu-item-hover-background: #3b3b3b;
        --hcg-menu-item-hover-border-color: #4f4f4f;
        --hcg-menu-item-active-background: #3f4699;
        --hcg-menu-item-active-border-color: #4a55c9;
        --hcg-menu-item-divider-color: #4f4f4f;
        --hcg-cell-editable-background: #2d415e;
    }
}

.highcharts-dark .hcg-theme-default {
    --hcg-input-border-color: #4f4f4f;
    --hcg-input-hover-border-color: #646464;
    --hcg-button-color: #ffffff;
    --hcg-button-hover-color: #ffffff;
    --hcg-button-hover-background: #3f3f3f;
    --hcg-button-selected-color: #000000;
    --hcg-button-selected-background: #ffffff;
    --hcg-cell-button-border-color: #646464;
    --hcg-pagination-button-selected-background: #ffffff;
    --hcg-pagination-button-selected-color: #000000;
    --hcg-popup-background: #272727;
    --hcg-popup-border-color: #4f4f4f;
    --hcg-menu-item-hover-background: #3b3b3b;
    --hcg-menu-item-hover-border-color: #4f4f4f;
    --hcg-menu-item-active-background: #3f4699;
    --hcg-menu-item-active-border-color: #4a55c9;
    --hcg-menu-item-divider-color: #4f4f4f;
    --hcg-cell-editable-background: #2d415e;
}

.hcg-theme-default {
    --hcg-border-color: var(--highcharts-neutral-color-20, color-mix(in srgb, var(--hcg-color, #000000) 10%, var(--hcg-background, #ffffff)));
    --hcg-row-hover-background: var(--ig-highlight-color-5, color-mix(in srgb, var(--hcg-color, #000000) 3%, var(--hcg-background, #ffffff)));
    --hcg-row-even-background: var(--highcharts-neutral-color-3, color-mix(in srgb, var(--hcg-color, #000000) 2%, var(--hcg-background, #ffffff)));
}

/* SPDX-License-Identifier: LicenseRef-Highcharts */

/**
 * @license Highcharts Grid Lite v3.1.0
 *
 * (c) 2009-2025 Highsoft AS
 *
 * A commercial license may be required depending on use.
 * See www.highcharts.com/license
 */

/* Grid container */
.hcg-container {
    container-type: inline-size;
    container-name: hcg;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
    color-scheme: light dark;
    max-height: inherit;
}

.highcharts-light .hcg-container {
    color-scheme: light;
}

.highcharts-dark .hcg-container {
    color-scheme: dark;
}

.hcg-container * {
    box-sizing: border-box;
}

.hcg-container:has(.hcg-no-data) {
    justify-content: center;
    align-items: center;
}

/* ----------------------------------------------------------
  INPUT ELEMENTS
------------------------------------------------------------ */

.hcg-container .hcg-input {
    width: 100%;

    &:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

    &::placeholder {
        color: #767676;
    }

    &:focus-visible {
        outline: none;
    }

    &[type="checkbox"] {
        --ig-input-checkbox-size: 1.333em;

        appearance: none;
        width: var(--ig-input-checkbox-size);
        height: var(--ig-input-checkbox-size);
        cursor: pointer;
        position: relative;

        &:checked::before {
            content: "";
            position: absolute;
            inset: 0;
            margin: 0.05em;
            mask: center/contain no-repeat;
            mask-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%273%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M5 13l4 4L19 7%27/%3E%3C/svg%3E");
        }
    }

    select& {
        appearance: none;
        background-image: url("data:image/svg+xml,%3csvg width=%2712%27 height=%2712%27 viewBox=%270 0 12 12%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3e%3cpath d=%27M3.5 7.5L6 10L8.5 7.5M3.5 4.5L6 2L8.5 4.5%27 stroke=%27%23767676%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 5px center;

        /* Reserve space for the chevron (functional shell, not theme). */
        padding-inline-end: 1.25rem;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
}

/* ----------------------------------------------------------
  BUTTON ELEMENT
------------------------------------------------------------ */

.hcg-container :is(.hcg-button, .hcg-icon) {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    line-height: 1;
    gap: 2px;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;

    svg {
        width: 0.9em;
        height: 0.9em;
        display: block;
    }

    span {
        display: inline-block;
        line-height: 1;
    }

    span:empty {
        display: none;
    }

    &.reverse {
        flex-direction: row-reverse;
    }

    &:focus-visible {
        outline: none;
    }

    &:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }
}

/* ----------------------------------------------------------
  TABLE ELEMENTS
------------------------------------------------------------ */

/* <table> */
.hcg-container .hcg-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    table-layout: fixed;
    flex: 1;

    &.hcg-scrollable-content {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    /* <thead> */
    &.hcg-virtualization thead {
        display: block;
    }

    &.hcg-column-virtualization thead tr {
        display: block;
        overflow: visible;
    }

    &.hcg-column-virtualization thead th .hcg-header-cell-container {
        height: 100%;
    }

    thead th {
        position: relative;
    }

    /* <tbody> */
    &.hcg-scrollable-content > tbody {
        height: 100%;
        overflow: auto;
        min-height: 0;
        flex: 1;
    }

    &.hcg-virtualization > tbody {
        display: block;
        position: relative;
    }

    > tbody > tr {
        overflow: hidden;
        width: 100%;
    }

    > tbody > tr > :where(.hcg-cell) {
        position: relative;
        line-height: 1em;
        overflow: hidden;
    }

    > tbody > tr.hcg-mocked-row > :where(.hcg-cell) {
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .hcg-last-header-cell-in-row,
    tbody tr > :where(.hcg-cell):last-child {
        border-right: none;
    }

    tbody tr:last-of-type > :where(.hcg-cell) {
        border-bottom: none;
    }

    &.hcg-scrollable-content > tbody > tr {
        display: block;
    }

    &.hcg-column-virtualization :is(thead tr, tbody tr) > :where(.hcg-cell, .hcg-header-cell) {
        display: inline-block;
        vertical-align: top;
    }

    &.hcg-virtualization > tbody > tr {
        position: absolute;
    }

    > tbody.hcg-rows-content-nowrap > tr > :where(.hcg-cell) {
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    > tbody > tr > :where(.hcg-cell):focus {
        outline: none;
    }
}

/* ----------------------------------------------------------
  HEADER ELEMENTS
------------------------------------------------------------ */
.hcg-container thead th {
    .hcg-header-cell-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .hcg-header-cell-content {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hcg-header-cell-container.hcg-no-width .hcg-header-cell-content {
        visibility: hidden;
        transition: none;
    }

    .hcg-header-cell-icons {
        display: flex;
        overflow: hidden;
        align-items: center;
        max-width: 0;
        opacity: 0;
        z-index: 11;
        cursor: pointer;
        transition: max-width 0.3s ease, opacity 0.3s ease;
    }

    .hcg-header-cell-icons .hcg-icon.hcg-icon-selected::after {
        content: "";
        position: absolute;
        top: 2px;
        right: 2px;
        width: 0.3em;
        height: 0.3em;
        border-radius: 50%;
        background: currentColor;
    }

    :is(:hover, :focus-visible) .hcg-header-cell-icons,
    .hcg-header-cell-icons:has(.hcg-button:focus-visible, .hcg-icon:focus-visible, .hcg-button.hcg-button-selected, .hcg-icon.hcg-icon-highlighted, .hcg-icon.hcg-icon-selected),
    .hcg-header-cell-container.hcg-no-width .hcg-header-cell-icons {
        max-width: 100px;
        opacity: 1;
    }

    .hcg-header-cell-container.hcg-no-width .hcg-header-cell-menu-icon {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin-left: 0;
    }

    .hcg-header-cell-icons .hcg-header-cell-menu-icon .hcg-icon {
        padding-inline: 3px;
    }

    .hcg-header-cell-icons > :first-child {
        margin-left: 5px;
    }

    .hcg-column-resizer {
        position: absolute;
        display: flex;
        align-items: center;
        justify-content: center;
        top: 0;
        width: 9px;
        right: -5px;
        height: 100%;
        user-select: none;
        touch-action: none;
        z-index: 10;
        cursor: col-resize;
    }

    .hcg-column-resizer.hovered::after {
        content: "";
        height: 100%;
        width: max(3px, calc(var(--hcg-header-column-border-width, var(--hcg-border-width, 1px)) + 2px));
        background: var(--hcg-header-color, var(--hcg-color, currentColor));
    }
}

/* ----------------------------------------------------------
  PAGINATION ELEMENTS
------------------------------------------------------------ */

.hcg-container .hcg-pagination {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;

    > * {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        align-items: center;
    }

    .hcg-pagination-info {
        justify-content: flex-start;
    }

    .hcg-pagination-controls {
        justify-content: center;

        .hcg-pagination-pages {
            display: flex;
            flex-wrap: nowrap;

            .hcg-button {
                display: inline-flex;
                align-items: center;
                justify-content: center;
            }

            span {
                display: inline-flex;
                align-items: center;
                justify-content: center;
            }
        }
    }

    .hcg-pagination-page-size {
        justify-content: flex-end;

        /* Override global `.hcg-input { width: 100% }` — themed sets explicit width. */
        select.hcg-input {
            width: auto;
        }
    }

    /* .hcg-pagination-nav-dropdown {
        display: none;
        min-width: 200px;
    } */

    &.hcg-pagination-left,
    &.hcg-pagination-center,
    &.hcg-pagination-right {
        > * {
            flex: 0 0 auto;
            min-width: auto;
        }
    }

    &.hcg-pagination-left { justify-content: flex-start; }
    &.hcg-pagination-center { justify-content: center; }
    &.hcg-pagination-right { justify-content: flex-end; }

    &:not(:has(.hcg-pagination-info)) .hcg-pagination-controls {
        justify-content: flex-start;
    }

    &:not(:has(.hcg-pagination-page-size)) .hcg-pagination-controls {
        justify-content: flex-end;
    }
}

@container hcg (max-width: 800px) {
    .hcg-container .hcg-pagination {
        flex-direction: column;
        align-items: stretch;

        /* Row gap when stacked — honor theme token when set. */
        gap: var(--hcg-pagination-gap, 0.5rem);
        --ig-pagination-stacked-align: center;

        &.hcg-pagination-left { --ig-pagination-stacked-align: flex-start; }
        &.hcg-pagination-right { --ig-pagination-stacked-align: flex-end; }

        > * {
            flex: 0 0 auto;
            justify-content: var(--ig-pagination-stacked-align);
        }

        .hcg-pagination-info,
        .hcg-pagination-controls,
        .hcg-pagination-page-size {
            justify-content: var(--ig-pagination-stacked-align);
        }

        .hcg-pagination-controls {
            /* Keep one row; scroll if controls still overflow. */
            flex-wrap: nowrap;
            max-width: 100%;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        .hcg-pagination-pages {
            flex-wrap: nowrap;
        }

        .hcg-pagination-page-size {
            text-align: center;
            flex-wrap: wrap;
            gap: 0.5rem;
        }
        &.hcg-pagination-left .hcg-pagination-page-size { text-align: left; }
        &.hcg-pagination-right .hcg-pagination-page-size { text-align: right; }

        &:not(:has(.hcg-pagination-page-size)) .hcg-pagination-controls,
        &:not(:has(.hcg-pagination-info)) .hcg-pagination-controls {
            justify-content: var(--ig-pagination-stacked-align);
        }
    }
}

/* ----------------------------------------------------------
  CREDITS ELEMENT
------------------------------------------------------------ */

.hcg-credits,
.highcharts-light .hcg-credits {
    display: block;
    width: 114px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-image:
        image-set(
            /* stylelint-disable-next-line function-comma-newline-after */
            url("https://assets.highcharts.com/grid/logo_light.png") 1x,
            url("https://assets.highcharts.com/grid/logo_lightx2.png") 2x
        );
}

@media (prefers-color-scheme: dark) {
    .hcg-credits {
        background-image:
            image-set(
                /* stylelint-disable-next-line function-comma-newline-after */
                url("https://assets.highcharts.com/grid/logo_dark.png") 1x,
                url("https://assets.highcharts.com/grid/logo_darkx2.png") 2x
            );
    }
}

.highcharts-dark .hcg-credits {
    background-image:
        image-set(
            /* stylelint-disable-next-line function-comma-newline-after */
            url("https://assets.highcharts.com/grid/logo_dark.png") 1x,
            url("https://assets.highcharts.com/grid/logo_darkx2.png") 2x
        );
}

/* ----------------------------------------------------------
  POPUP ELEMENTS
------------------------------------------------------------ */
.hcg-container .hcg-popup {
    position: absolute;
    z-index: 1000;
    min-width: 200px;
    overflow: auto;
    border-width: 1px;
    border-style: solid;

    .hcg-menu-header {
        margin-bottom: 5px;
    }

    .hcg-menu-header-category {
        opacity: 0.5;
        user-select: none;
    }
}

/* ----------------------------------------------------------
  MENU ELEMENTS
------------------------------------------------------------ */

.hcg-container .hcg-menu-container {
    margin: 0;
    display: flex;
    flex-direction: column;
    list-style: none;
    padding: 0;

    .hcg-menu-item {
        display: flex;
        align-items: center;
        gap: 2px;
        width: 100%;
        min-width: 185px;
        background-color: transparent;
        border: 1px solid transparent;
    }

    .hcg-menu-item:not(:disabled) {
        cursor: pointer;
    }

    .hcg-menu-item:focus-visible {
        outline: none;
    }

    .hcg-menu-item-icon {
        --icon-size: 16px;

        flex: 0 0 var(--icon-size);
        width: var(--icon-size);
        height: var(--icon-size);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        opacity: 0.6;
    }

    .hcg-menu-item.active .hcg-menu-item-icon,
    .hcg-menu-item.highlighted .hcg-menu-item-icon,
    .hcg-menu-item:not(:disabled):hover .hcg-menu-item-icon {
        opacity: 1;
    }

    .hcg-menu-item-label {
        flex: 1 1 auto;
        min-width: 0;
        text-align: left;
        padding-left: 0.75rem;
    }

    .hcg-menu-divider {
        border-top-width: 1px;
        border-top-style: solid;
        height: 0;
    }
}

/* ----------------------------------------------------------
  FILTERING ELEMENTS
------------------------------------------------------------ */

.hcg-header-cell:has(.hcg-column-filter-wrapper) {
    overflow: hidden;
}

.hcg-column-filter-wrapper {
    width: 100%;
    display: flex;
    flex-flow: column;
    row-gap: 5px;
    min-width: 50px;
}

.hcg-column-filter-operator-spacer {
    visibility: hidden;
    pointer-events: none;
    user-select: none;
}

.hcg-clear-filter-button {
    appearance: none;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    display: inline;
    vertical-align: baseline;
    font: inherit;
    font-size: 0.625rem;
    white-space: nowrap;
    font-weight: normal;
    align-self: end;
}

.hcg-clear-filter-button:hover {
    text-decoration: underline;
    cursor: pointer;
}

.hcg-clear-filter-button:disabled,
.hcg-clear-filter-button:disabled:hover {
    opacity: 0.5;
    text-decoration: none;
    cursor: default;
}

/* ----------------------------------------------------------
  OTHER ELEMENTS
------------------------------------------------------------ */

/* Sorting */
.hcg-table thead th.hcg-column-sortable {
    cursor: pointer;
}

/* Accessibility */
.hcg-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    white-space: nowrap;
    clip: rect(1px, 1px, 1px, 1px);
    margin-top: -3px;
    opacity: 0.01;
}

.hcg-container.hcg-caption * {
    font: inherit;
    margin: 0;
}

/* Loader */
.hcg-loading-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    width: 100%;
    height: 100%;
    gap: 10px;
    color: var(--ig-loader-color);
}

.hcg-loading-wrapper .hcg-spinner {
    border-top-width: 5px;
    border-top-style: solid;
    border-top-color: var(--ig-loader-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Start Grid CSS Helpers Classes */

.hcg-table thead tr th.hcg-right .hcg-header-cell-content,
.hcg-table tbody tr > :where(.hcg-cell).hcg-right {
    text-align: right;
}

.hcg-table thead tr th.hcg-center .hcg-header-cell-content,
.hcg-table tbody tr > :where(.hcg-cell).hcg-center {
    text-align: center;
}

.hcg-table thead tr th.hcg-left .hcg-header-cell-content,
.hcg-table tbody tr > :where(.hcg-cell).hcg-left {
    text-align: left;
}

/* End Grid CSS Helpers Classes */

