﻿
.jexcel > tbody tr td,
.jexcel > thead tr td {
    white-space: normal !important;
    word-wrap: break-word;
    white-space: normal;
}

/* 1) Keep your sticky header as before… */
/*.jexcel > thead,
.jspreadsheet table > thead {
    position: sticky !important;
    top: 0 !important;
    z-index: 3 !important;*/ /* sit above everything else */
    /*background: #fff !important;
}*/

/* 2) …then nudge the whole table’s flow down by your header’s height */
/*.jspreadsheet .jexcel_content_table > table {*/
    /* adjust “32px” to the exact height of your header row */
    /*margin-top: 32px;
}*/

.jexcel_content { 
    scroll-behavior: smooth;
}

.jexcel_filter {
    position: absolute;
    top: 21px;
    right: 4px;
}

.pagination {
    --bs-pagination-active-bg: var(--theme-default) !important;
    --bs-pagination-active-border-color: none;
    --bs-pagination-color: rgb(63, 71, 90) !important;
}

.merged-cell {
    border: none !important;
}

/*SmartGrid*/
.vars[theme='default'] {
    /*--row-header-bg-color: var(--light2) !important;
    --col-header-bg-color: var(--light2) !important;*/
    /*  --row-header-bg-color: var(--light2) !important;
    --col-header-bg-color: var(--light2) !important;
    --row-header-foreground-color: black !important;
    --col-header-foreground-color: black !important;
    --sheet-foreground-color: black !important;
    --sheet-foreground-color: black !important;
    --sheet-font-family: 'IBM Plex Sans', system-ui, sans-serif !important;
    --sheet-border-style: 1px solid #efeded !important;*/


    --sheet-foreground-color: #1f2937 !important;
    --sheet-foreground-color-disabled: #9ca3af !important;
    --sheet-bg-color: #ffffff !important;
    --sheet-border-style: 1px solid #d9e1ec !important;
    --row-header-bg-color: #f8fafd !important;
    --col-header-bg-color: #f4f7fc !important;
    --head-selection-bg-color: #dbeafe !important;
    --row-header-foreground-color: #4b5563 !important;
    --col-header-foreground-color: #334155 !important;
    --icon-color: #000000 !important;
    --shadow-overlay-color: rgba(15, 23, 42, 0.24) !important;
    --invalid-cell-foreground-color: #dc2626 !important;
    --selection-bg-color: rgba(37, 99, 235, 0.14) !important;
    --selection-border-color: #2563eb !important;
    --cell-highlight-bg-color: #a9e5b6 !important;
    --num-highlight-color: #18688f !important;
    --string-highlight-color: #256b3e !important;
    --sheet-menu-bg-color: #fff !important;
    --sheet-menu-hover-color: #e6f0ff !important;
    --sheet-button-bg-color: #f8fafc !important;
    --sheet-button-bg-hover-color: #eef2f7 !important;
    --sheet-button-border: 1px solid #c5d0df !important;
    --highlight-color-1: red !important;
    --highlight-color-2: blue !important;
    --highlight-color-3: purple !important;
    --highlight-color-4: green !important;
    --highlight-color-5: brown !important;
    --frozen-border-color: rgba(100, 116, 139, 0.45) !important;
    --header-selected-bg-color: #1d4ed8 !important;
    --sheet-font-family: 'IBM Plex Sans', system-ui, sans-serif !important;
}

.vars[theme='dark'] { 
    --sheet-font-family: 'Roboto' !important;
}



/* bds select popup - editor*/
/* Individual dropdown items */
.bds-select-item {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    will-change: transform;
}

/* Overlay created by BlazorDatasheet */
.editor-overlay {
    position: absolute;
    z-index: 100; /* base layer, dropdown will go above */
}

/* Dropdown list */
.bds-select-list {
    position: fixed; /* 🔥 critical: escape sticky rows */
    max-height: 240px;
    overflow-y: auto;
    z-index: 10000; /* always above frozen rows */
    border-radius: 0;
    border: 1px solid var(--theme-default);
    background: var(--sheet-bg-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.merged-cell {
    border: var(--sheet-border-style) !IMPORTANT;
}



/* Open upward when needed */
.editor-overlay.open-up .bds-select-list {
    /* positioning handled by JS */
}

/* Active item */
.bds-select-item.active {
    background: var(--bs-primary-bg-subtle);
}

.smartgrid-header .pagination {
    --bs-pagination-padding-x: 0.65rem !important;
    --bs-pagination-padding-y: 0.250rem !important;
}
    /*-----------------------*/

#loader-wrapper-global {
    z-index: 2001 !important;
}


/*Grid loading*/
.grid-wait {
    position: fixed;
    inset: 0;
    display: none; /* toggled by waitClass */
    align-items: center;
    justify-content: center;
    background: #f1f0f033 !important;
    z-index: 2000 !important;
}

        .grid-wait.show {
            display: flex;
        }

    .grid-wait__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(20, 20, 20, 0.18);
        backdrop-filter: blur(6px);
    }

    .grid-wait__card {
        position: relative;
        z-index: 1;
        background: rgba(255, 255, 255, 0.92);
        border: 1px solid rgba(255, 255, 255, 0.55);
        border-radius: 16px;
        padding: 18px 18px;
        width: min(520px, calc(100vw - 32px));
    }

    .grid-wait__spinner .spinner-border {
        width: 2.25rem;
        height: 2.25rem;
    }

    .grid-amt-link {
        font-size: 12px;
        color: var(--theme-default);
    }
    /*Grid loading end*/

