﻿/* lightgrid.css */

/******************************
STICKY GRID CONFIGURATIONS
*******************************/

.lightgrid-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    scrollbar-gutter: stable;
    scrollbar-color: rgb(30, 62, 175);
    scrollbar-width: thin;
}

    .lightgrid-scroll::-webkit-scrollbar-track,
    .lightgrid-scroll::-webkit-scrollbar-track-piece {
        background-color: #27277C;
        border-radius: 5px;
    }

    .lightgrid-scroll::-webkit-scrollbar-thumb {
        background-color: rgb(30, 62, 175) !important;
        border: 0 !important;
        border-radius: 5px;
        box-shadow: none !important;
    }

        .lightgrid-scroll::-webkit-scrollbar-thumb:hover,
        .lightgrid-scroll::-webkit-scrollbar-thumb:active,
        .lightgrid-scroll::-webkit-scrollbar-thumb:window-inactive {
            background-color: rgb(30, 62, 175) !important;
        }

.lightgrid-table {
    width: 100%;
    min-width: max-content;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 1rem;
}

.lg-sticky-right {
    position: sticky;
    right: 0;
    z-index: 3;
    background: #fff;
    box-shadow: -8px 0 10px -10px rgba(0,0,0,.35);
}

.lg-sticky-right-header {
    position: sticky;
    right: 0;
    z-index: 4;
    background: #f8f9fa;
}

.lightgrid-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: rgba(255, 255, 255, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}

.fe-spin {
    animation: fe-spin 1.5s linear infinite;
}

@keyframes fe-spin {
    to {
        transform: rotate(360deg);
    }
}

/***************************************************************************
Sticky-right columns for BatchItemDetailCandidatesPanel
*****************************************************************************/

.cas-sticky-right {
    position: sticky;
    background: #fff;
    z-index: 3;
}

/* Keep header cells above body cells */
.cas-sticky-right-header {
    position: sticky;
    background: #f8f9fa;
    z-index: 5;
}

/* Rightmost: Actions */
.cas-sticky-actions {
    right: 0;
    width: 120px;
    min-width: 120px;
}

/* Middle: Selected checkbox (to the left of Actions) */
.cas-sticky-select {
    right: 120px;
    width: 44px;
    min-width: 44px;
    text-align: center;
}

/* Leftmost sticky: Amount (to the left of Select checkbox) */
.cas-sticky-amount {
    right: 164px;
    width: 160px;
    min-width: 160px;
}

/* Optional: add a subtle divider line where sticky region starts */
.cas-sticky-divider {
    box-shadow: 2px 0 0 rgba(0,0,0,.08);
}

/*********************************
Hide native horizontal scrollbar but keep scrolling enabled
*****************************************/

.cas-hide-native-hscroll {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge legacy */
}

    .cas-hide-native-hscroll::-webkit-scrollbar {
        height: 0; /* Chrome/Safari */
    }

/* Sticky bottom horizontal scrollbar (proxy) */
.cas-hscroll-sticky {
    position: sticky;
    bottom: 0;
    z-index: 1;
    background: #fff;
    border-top: 1px solid #dee2e6;
    height: 8px;
    overflow-x: auto;
    overflow-y: hidden;
}

/* The inner element controls the scrollable width */
.cas-hscroll-inner {
    height: 1px;
}

.cas-hscroll-sticky::-webkit-scrollbar {
    height: 12px;
}

.cas-hscroll-sticky::-webkit-scrollbar-track {
    background: #ddd;
    border-radius: 5px;
}

.cas-hscroll-sticky::-webkit-scrollbar-thumb {
    background: #222;
    border-color: #dee2e6;
    border-radius: 5px;
}

    .cas-hscroll-sticky::-webkit-scrollbar-thumb:hover {
        background: rgb(30, 62, 175);
    }

    .cas-hscroll-sticky::-webkit-scrollbar-thumb:active {
        background: rgb(30, 62, 175);
    }