/**
 * Runtime guard for wide tables in igoLounge pages.
 * Existing page-specific wrappers keep their visual design; this file only
 * normalizes horizontal scrolling and protects dynamically injected tables.
 */

:where(
    .igo-table-scroll-guard,
    [data-igo-table-scroll-guard],
    [class*="table-wrap"],
    [class*="table-scroll"]:not([class*="table-scrollbar"]),
    [class*="table-wrapper"],
    [class*="table-container"],
    [class*="table-shell"],
    [class*="table-area"],
    [class*="grid-scroll"]
) {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto !important;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

.igo-table-scroll-guard,
[data-igo-table-scroll-guard] {
    overflow-y: clip;
}

@supports not (overflow: clip) {
    .igo-table-scroll-guard,
    [data-igo-table-scroll-guard] {
        overflow-y: hidden;
    }
}

:where(
    .igo-table-scroll-guard,
    [data-igo-table-scroll-guard],
    [class*="table-wrap"],
    [class*="table-scroll"]:not([class*="table-scrollbar"]),
    [class*="table-wrapper"],
    [class*="table-container"],
    [class*="table-shell"],
    [class*="table-area"],
    [class*="grid-scroll"]
) > table {
    max-width: none;
}

.igo-table-scroll-guard > table,
[data-igo-table-scroll-guard] > table {
    width: max-content;
    min-width: 100%;
}

.igo-table-scroll-guard > table.igo-scroll-guard__table {
    box-sizing: border-box;
}

@supports not (width: max-content) {
    .igo-table-scroll-guard > table,
    [data-igo-table-scroll-guard] > table {
        width: auto;
    }
}
