﻿/* Expose layout variables */
:root {
    --top-row-height: 3.5rem; /* set to whatever your top row uses */
    --sidebar-width: 15.5rem; /* if your sidebar has a fixed width */
    --action-bar-height: 3.5rem;
}

.powerbi-container {
    height: calc(100vh - var(--top-row-height));
    width: 100%;
    max-width: 2000px;
    overflow: hidden;
}

.powerbi-outer {
    margin-left: -2rem; /* cancels px-4 from MainLayout */
}

.gccBaseLayoutPage {
    height: calc(100vh - var(--top-row-height));
    overflow-y: auto; /* or scroll */
    overflow-x: hidden;
    padding: 0;
    margin-top: -1.1rem;
}

.main-top-bar p {
    margin-top: revert;
}

.table-wrapper {
    width: 100%;
    max-height: calc(100vh - var(--action-bar-height) - var(--top-row-height)); /* adjust as needed */
    overflow-x: auto;
    overflow-y: auto;
}

/* Make table header sticky */
.table-wrapper thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: white; /* or your theme background */
    box-shadow: 0 2px 3px rgba(0,0,0,0.1);
}

.actions-bar {
    overflow: hidden;
    top: calc(var(--top-row-height, --action-bar-height)); /* space to account for fixed top bar */
    z-index: 1020; /* above table content, below top-row if top-row uses higher z-index */
    background: var(--bs-body-bg, #fff);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 0.5rem 1rem;
}

.main-top-bar {
    position: sticky;
    overflow: hidden;
    top: 0; /* space for the fixed top-row */
}

/* smaller vertical spacing for the actions bar on small screens */
@media (max-width: 767px) {
    .actions-bar {
        padding: 0.5rem;
    }
}

.page .main {
    /*flex: 1 1 auto;
        box-sizing: border-box;
    */
    min-width: 0; /* critical: allow children to shrink below their content width */
    overflow-x: hidden;
    /* hide any layout overflow; let inner container handle scrolling */
}

/* fixed table that fits the container */
.fixed-table {
    table-layout: fixed;
    width: 100%;
}

.body-top-row {
    
    position: sticky;
    top: 0;
    overflow: hidden;
    align-items: center;
    border-bottom: 1px solid #ddd;
    background: #fff; /* Optional: ensures it looks fixed */
    z-index: 10;
}


.qbo-table-container {
    width: 100%;/* hide any tiny overflow; content will truncate instead */
}

/* truncate most cells to avoid horizontal growth */
.fixed-table td,
.fixed-table th {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* reduce padding for dense rows (optional) */
.fixed-table .form-control-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}