
@keyframes pulse-logo {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-pulse {
    animation: pulse-logo 1.5s infinite ease-in-out;
}


/* Theme Icon */
/* When in Light Mode (default) */
[data-bs-theme="light"] .mode-icon-light {
    display: none !important;
    
}

[data-bs-theme="light"] .mode-icon-dark {
    display: block !important;
}

/* When in Dark Mode */
[data-bs-theme="dark"] .mode-icon-light {
    display: block !important;
}

[data-bs-theme="dark"] .mode-icon-dark {
    display: none !important;
}




/*Datepicket*/
.flatpickr-wrapper
{
    width:100%;
}

.steex-datepicker-container {
    width: 100% !important;
    position: relative;
    display: block;
}

/* Ensure the Flatpickr calendar sits correctly inside the dropdown */
    .steex-datepicker-container .flatpickr-input[type="hidden"] + input,
    .steex-datepicker-container .form-control {
        width: 100% !important;
        display: block !important;
    }

    /* 3. Ensure the 'X' button stays inside the padded area */
    .steex-datepicker-container .btn-clear {
        position: absolute;
        right: 5px; /* Adjust based on your preference */
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
        background: transparent;
        border: none;
    }

    /* 4. Optical Fix: prevent text from going under the X button */
    .steex-datepicker-container input.form-control {
        padding-right: 35px !important;
    }



/*Auto COMPLETE*/
/* --- Steex AutoComplete Dropdown Fix --- */

.steex-autocomplete-wrapper {
    position: relative;
    /* Ensure the wrapper itself can show overflowing content */
    overflow: visible !important;
}

    .steex-autocomplete-wrapper .dropdown-menu.show {
        display: block !important;
        opacity: 1 !important;
        /* THE FIX: Use Steex solid background variables */
        background-color: var(--tb-secondary-bg) !important;
        /* Ensure borders are visible */
        border: 1px solid var(--tb-border-color) !important;
        /* High Z-Index to beat tables, modals, and sticky headers */
        z-index: 2000 !important;
        /* Add a deep shadow to make it look 'raised' */
        box-shadow: 0 10px 25px rgba(0,0,0,0.2) !important;
        margin-top: 4px;
        padding: 5px 0;
    }




/* --- Steex Combo Grid Styling --- */

/* --- Steex Combo Grid Solid Background Fix --- */

.steex-combo-wrapper {
    position: relative;
    width: 100%;
    /* Ensure this wrapper stays above other table rows when active */
    z-index: 1;
}

    /* When the dropdown is open, elevate the whole wrapper's stacking context */
    .steex-combo-wrapper:focus-within,
    .steex-combo-wrapper:active {
        z-index: 1090 !important;
    }

.combo-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 2px;
    /* THE FIX: Explicit Solid Background for Light Mode */
    background-color: #ffffff !important;
    /* THE FIX: Explicit Solid Background for Dark Mode */
    border: 1px solid var(--tb-border-color);
    border-radius: 0.4rem;
    /* High Z-Index to clear sticky headers (1020) and table cells */
    z-index: 1078 !important;
    /* Heavy shadow to make it 'pop' and look solid */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden;
    opacity: 1 !important;
    display: block;
}
/* DARK MODE OVERRIDE */
[data-bs-theme="dark"] .combo-dropdown {
    background-color: #15171A !important; /* Steex Dark Gray */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}
.combo-dropdown.is-open {
    z-index: 9978 !important;
}




/*// data grid*/
/* --- Row Hover Action Slide Effect (Fixed Solid Background) --- */

.action-container {
    position: relative;
    /* Ensure the cell doesn't grow when the overlay is hidden */
    overflow: hidden;
}

.row-action-overlay {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: max-content !important;
    min-width: max-content;
    z-index: 1000 !important;
    /* 1. SOLID BACKGROUND: Uses Steex variable for current theme bg */
    background-color: var(--tb-custom-white) !important;
    /* 2. SLIDE LOGIC: Start completely off-screen to the right */
    transform: translateX(102%);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    /* 3. DEPTH: Add a shadow to the left edge so it doesn't look flat */
    border-left: 1px solid var(--tb-border-color);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    padding: 0 5px;
}

/* 4. SELECTION SYNC: If the row is selected, the overlay must match the color */
.grid-row-selected .row-action-overlay {
    background-color: var(--tb-primary-bg-subtle) !important;
}

/* 5. SHOW ON HOVER: Slide to 0 */
tr:hover .row-action-overlay {
    transform: translateX(0);
    background-color: var(--tb-light) !important;
}

/* Optional: Make the buttons look clean inside the overlay */
.row-action-overlay .btn {
    padding: 4px 8px !important;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.grid-row-selected .row-action-overlay {
    background-color: var(--tb-primary-bg-subtle) !important;
}

/* DARK MODE SPECIFIC FIX */
[data-bs-theme="dark"] .row-action-overlay {
    background-color: #212529 !important; /* Steex Dark cell color */
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
}

.grid-row-selected.card {
    border-color: var(--tb-primary) !important;
    background-color: var(--tb-primary-bg-subtle) !important;
}
/* --- Steex DataGrid Condensed Mode --- */

/* 1. Header Squeeze */
.grid-condensed thead th {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    font-size: 11px !important; /* Smaller header text */
}

/* 2. Body Cell Squeeze */
.grid-condensed tbody td {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    font-size: 12.5px !important; /* Slightly smaller row text */
}

/* 3. Group Header Squeeze */
.grid-condensed .group-header-content {
    padding: 6px 16px !important; /* Reduced vertical padding */
}

    .grid-condensed .group-header-content .avatar-xs {
        width: 24px;
        height: 24px; /* Smaller icons in group headers */
    }

/* 4. Footer Aggregate Squeeze */
.grid-condensed tfoot td {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

.grid-condensed tfoot span {
    font-size: 12px !important;
}

/* 5. Selection Column (Checkbox) alignment */
.grid-condensed .form-check-input {
    width: 14px;
    height: 14px;
    margin-top: 0;
}

/* 6. Action Overlay Adjustments */
/* Ensure buttons inside the slide-out menu are smaller in condensed mode */
.grid-condensed .row-action-overlay .btn-sm {
    padding: 2px 5px !important;
    font-size: 11px !important;
}

/* 7. Sticky Column alignment sync */
.grid-condensed .sticky-col {
    padding-left: 16px !important; /* Keep left alignment consistent */
}

.pagination-separated .page-item .page-link {
    border-radius: 0.3rem !important;
    margin-left: 3px;
    margin-right: 3px;
    border: 1px solid var(--tb-border-color);
    background-color: var(--tb-card-bg-custom);
    color: var(--tb-body-color);
    padding: 0.4rem 0.75rem;
    font-size: 13px;
    transition: all 0.2s ease;
}

.pagination-separated .page-item.active .page-link {
    background-color: var(--tb-primary);
    border-color: var(--tb-primary);
    color: #fff;
    box-shadow: var(--tb-box-shadow-primary);
}

.pagination-separated .page-item.disabled .page-link {
    cursor: default;
    pointer-events: none;
    border: none;
    color: var(--tb-muted);
    background: transparent !important;
}

.pagination-separated .page-item .page-link:hover:not(.active) {
    background-color: var(--tb-light);
    color: var(--tb-primary);
}

.pagination-separated .page-link i {
    line-height: 1;
    vertical-align: middle;
}

td.bg-primary-subtle {
    color: var(--tb-primary);
    font-weight: 500;
}

.custom-filter .dropdown-menu {
    z-index: 1060 !important; /* Higher than Bootstrap's default (1000) and sticky columns */
    position: absolute !important;
    /* Prevent the popup from moving when the table scrolls */
    margin-top: 5px !important;
}

/* 5. Ensure the Card doesn't clip the popup if the table is small */
.card-body {
    position: relative;
    z-index: 1;
}
/* Filter Button Styling */
.custom-filter .btn-icon {
    width: 24px;
    height: 24px;
}

/* Hide the arrow on the filter dropdown button */
.custom-filter .dropdown-toggle::after {
    display: none;
}

/* Ensure the dropdown menu doesn't get cut off by table-responsive */
.table-responsive {
    overflow: visible !important;
}

/* Style for the filter inputs */
.dropdown-menu .form-control-sm {
    font-size: 12px;
}

.dropdown-header {
    background-color: var(--tb-light);
    border-radius: 4px;
    margin: -8px -8px 8px -8px;
}
/* Sticky Column Logic for Steex */
.sticky-col {
    position: sticky !important;
    left: 0;
    z-index: 10; /* Lower than dropdowns but higher than other cells */
    background-color: var(--tb-card-bg-custom) !important;
    border-right: 1px solid var(--tb-border-color) !important;
}

/* Ensure header sticky stays above body sticky */
thead .sticky-col {
    z-index: 11;
    background-color: var(--tb-light) !important;
}

/* Fix for horizontal scrolling inside Steex cards */
.table-responsive {
    overflow-x: auto !important;
}
    /* Sticky Footer Logic */
    .table-responsive tfoot {
        position: sticky;
        bottom: 0;
        z-index: 5;
        background-color: var(--tb-light) !important;
        border-top: 2px solid var(--tb-border-color);
    }

/* Ensure sticky columns in footer also work */
tfoot .sticky-col {
    z-index: 6 !important;
    bottom: 0;
    background-color: var(--tb-light) !important;
}

/* Visual spacing for aggregate cells */
tfoot td {
    padding: 10px 15px !important;
    vertical-align: middle;
}
/* Smooth Rotation for Group Arrows */
.transition-all {
    transition: transform 0.2s ease-in-out;
    display: inline-block;
}

.rotate-90 {
    transform: rotate(90deg);
}

/* Optional: Highlight the group header on hover */
.table-light:hover {
    filter: brightness(0.95);
}
/* 1. Smooth Rotate for the Arrow */
.group-toggle-icon {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.is-collapsed .group-toggle-icon {
    transform: rotate(0deg);
}

.is-expanded .group-toggle-icon {
    transform: rotate(90deg);
}

/* 2. Row Entrance Animation */
@keyframes rowFadeInSlide {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.steex-grid-row {
    /* This ensures rows slide in smoothly when the group is expanded */
    animation: rowFadeInSlide 0.3s ease-out forwards;
}

/* 3. Subtle hover effect on the group header */
.group-header-row {
    transition: background-color 0.2s ease;
}

    .group-header-row:hover {
        background-color: var(--tb-light) !important;
    }

/* --- Steex Grid Alignment Fix --- */

/* 1. Force identical padding on all cells (Header, Body, Footer) */
.table-card .table thead th,
.table-card .table tbody td,
.table-card .table tfoot td {
    padding-left: 10px !important; /* Standard Steex horizontal spacing */
    padding-right: 10px !important;
}
.table-card tbody td[colspan] {
    background-color: transparent !important;
}

/* 2. Fix the Group Header alignment */
/* We remove the padding from the TD and put it on the inner container */
.group-header-row td {
    padding: 0 !important;
}

.group-header-content {
    /* This must match the 16px padding-left of the standard cells */
    padding: 10px 16px !important;
    display: flex;
    align-items: center;
}

/* 3. Adjust the Group Toggle Icon so it doesn't push the text too far */
.group-toggle-icon {
    margin-left: -4px; /* Pulls the arrow slightly left to align the text better */
    margin-right: 8px;
}

/* 4. Fix for Sticky Columns */
/* Sticky columns often reset padding. We force it back. */
.sticky-col {
    padding-left: 16px !important;
}

/* 5. Ensure the table is flush with the card */
.table-card {
    margin: 0 !important;
}

/* Highlight the selected row */
.table tr.table-active td {
    background-color: var(--tb-light) !important; /* Subtle highlight */
    border-top: 1px solid var(--tb-primary-bg-subtle);
    border-bottom: 1px solid var(--tb-primary-bg-subtle);
}

/* Make the checkbox align with the Steex style */
.form-check-input:checked {
    background-color: var(--tb-primary);
    border-color: var(--tb-primary);
}

/* Ensure row cursor changes if selection is enabled */
.table-hover tbody tr {
    cursor: pointer;
}

/* --- Steex Grid Selection Styling --- */

/* 1. Target the cells of the selected row */
.grid-row-selected td {
    background-blend-mode: overlay;
    background-color: var(--tb-primary-bg-subtle) !important;
    color: var(--tb-primary) !important; /* Change text color to Primary */
    border-top: 1px solid rgba(var(--tb-primary-rgb), 0.1);
    border-bottom: 1px solid rgba(var(--tb-primary-rgb), 0.1);
}

    /* 2. IMPORTANT: Fix for Sticky (Fixed) Columns */
    /* Sticky columns have their own background to hide text scrolling behind. 
   We must update it to match the selection color. */
    .grid-row-selected td.sticky-col {
        background-color: var(--tb-primary-bg-subtle) !important;
    }

    /* 3. Add a visual indicator "Bar" on the left of the selected row */
    .grid-row-selected td:first-child {
        box-shadow: inset 3px 0 0 var(--tb-primary);
    }

/* 4. Optional: Style the checkbox when the row is selected */
.grid-row-selected .form-check-input {
    border-color: var(--tb-primary);
}

/* 5. Hover state for selected rows (darken slightly) */
.table-hover tbody tr.grid-row-selected:hover td {
    background-color: var(--tb-primary-item-bg-hover) !important;
}




/*steex popove*/
/** --- Steex Balloon Popover Precision Alignment --- */*/

.steex-popover-wrapper {
    position: relative;
    /* Use inline-flex to shrink-wrap the trigger icon/button */
    display: inline-flex;
    vertical-align: middle;
    z-index: 5000;
}

.steex-balloon {
    position: absolute;
    z-index: 1080;
    min-width: 240px;
    background-color: var(--tb-secondary-bg) !important;
    color: var(--tb-body-color) !important;
    opacity: 1 !important;
    border-radius: 0.4rem;
    box-shadow: var(--tb-box-shadow-lg);
    border: 1px solid var(--tb-border-color);
    /* Prevents the balloon from shrinking too much */
    width: max-content;
}

/* Arrow/Pointer Base */
.popover-arrow-pointer {
    position: absolute;
    width: 10px;
    height: 10px;
    transform: rotate(45deg);
    /* Match border of the balloon */
    border: 1px solid var(--tb-border-color);
}

/* --- PRECISION POSITIONING --- */

/* TOP: Balloon above target */
.popover-top {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
}

    .popover-top .popover-arrow-pointer {
        bottom: -5px; /* Half of height to intersect border */
        left: calc(50% - 5px);
        background-color: var(--tb-secondary-bg) !important;
        border-top: none;
        border-left: none;
    }

/* BOTTOM: Balloon below target */
.popover-bottom {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
}

    .popover-bottom .popover-arrow-pointer {
        top: -5px;
        left: calc(50% - 5px);
        /* Background color is set dynamically in Razor to match header */
        border-bottom: none;
        border-right: none;
        z-index: 1; /* Sit on top of header */
    }

/* LEFT: Balloon to the left of target */
.popover-left {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 10px;
}

    .popover-left .popover-arrow-pointer {
        right: -5px;
        top: calc(50% - 5px);
        background-color: var(--tb-secondary-bg) !important;
        border-bottom: none;
        border-left: none;
    }

/* RIGHT: Balloon to the right of target */
.popover-right {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 10px;
}

    .popover-right .popover-arrow-pointer {
        left: -5px;
        top: calc(50% - 5px);
        background-color: var(--tb-secondary-bg) !important;
        border-top: none;
        border-right: none;
    }
/* Allow the balloon to fly outside the table cell */
td .steex-popover-wrapper {
    position: relative;
    overflow: visible !important;
}



/* --- CHOICES.JS STEEX THEME FIX --- */

/* 1. Force the outer container to match Steex input height */
.choices {
    margin-bottom: 0;
    font-family: 'Poppins', sans-serif;
    overflow: visible !important;
}

.choices__inner {
    display: flex !important;
    align-items: center !important;
    min-height: 38px !important; /* EXACT STEEX HEIGHT */
    height: 38px !important;
    padding: 0 12px !important; /* Removes vertical padding that causes extra height */
    background-color: var(--tb-custom-white) !important;
    border: 1px solid var(--tb-border-color) !important;
    border-radius: 0.25rem !important;
    font-size: 13px !important;
    position: relative;
    z-index: 1; /* Keeps the input below the dropdown */
    overflow: visible !important;
}

/* 2. Remove internal padding from the list */
.choices__list--single {
    padding: 0 !important;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

/* 3. Style the Down Arrow to match Steex (Remix Icon) */
.choices[data-type*="select-one"]::after {
    content: "\ea4e" !important; /* ri-arrow-down-s-line */
    font-family: 'remixicon' !important;
    border: none !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin-top: 0 !important;
    font-size: 16px;
    color: gray;
    transition: all 0.5s ease-in-out; /* Smooth transition */
    pointer-events: none;
    z-index: 1;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 4. Style the "X" (Clear) Button */
.choices__list--single .choices__button {
    display: block !important;
    opacity: 1 !important;
    background-image: none !important; 
    width: 20px !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    right: 25px !important;  
    margin: 0 !important;
    border: none !important;
    background-color: transparent !important;
    cursor: pointer;
    z-index: 10;
}

    .choices__list--single .choices__button::before {
        content: "\eb99"; /* ri-close-line */
        font-family: 'remixicon';
        font-size: 14px;
        color: var(--tb-danger);
        font-style: normal;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

/* 5. Dropdown Menu Styling */
.choices__list--dropdown {
    /* background-color: var(--tb-choices-bg) !important;*/
    border: 1px solid var(--tb-border-color) !important;
    box-shadow: var(--tb-box-shadow-lg) !important;
    border-radius: 0.25rem !important;
    padding: 5px 15px 25px 10px !important;
    line-height: 1.8;
    z-index: 9050 !important; /* Higher than Bootstrap Modals (1040) */
}

    .choices__list--dropdown .choices__item--selectable.is-highlighted {
        background-color: var(--tb-light) !important;
        color: var(--tb-primary) !important;
        font-weight: bold !important;
        line-height: 1.8;
    }

.choices.is-open {
    z-index: 9051 !important;
}



    .choices.is-open[data-type*="select-one"]::after {
        content: "\ea78" !important; /* Remix Icon: ri-arrow-up-s-line */
        color: var(--tb-primary) !important; /* Optional: change color when open */
        font-style: normal;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

.choices__list--single .choices__button {
    right: 32px !important;
    z-index: 2;
}

/* 4. Small adjustment for the text area to prevent overlap */
.choices__list--single {
    padding-right: 48px !important;
}





/*ventor map tooltip*/
/* Steex Style Map Tooltip */
.jvm-tooltip {
    background: var(--tb-choices-bg) !important;
    border: 1px solid var(--tb-border-color) !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    box-shadow: var(--tb-box-shadow-lg) !important;
    color: var(--tb-body-color) !important;
    z-index:999999;
}

    .jvm-tooltip h5 {
        font-size: 15px;
        margin-bottom: 3px;
        font-weight: 600;
    }

    .jvm-tooltip p {
        font-size: 15px;
    }

/* Ensure the map doesn't look 'stuck' in dark mode */
.jvm-container {
    background-color: transparent !important;
}
[data-bs-theme="dark"] .jvm-tooltip {
    background-color: #212529 !important; /* Steex Dark cell color */
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
}

.counter-value {
    display: inline-block;
    /* Prevent layout shift while loading */
    min-width: 20px;
}





.image-preview-wrapper {
    transition: all 0.3s ease;
    position: relative;
    border: 2px dashed var(--tb-border-color) !important;
}

    .image-preview-wrapper:hover {
        border-color: var(--tb-primary) !important;
        background-color: var(--tb-primary-bg-subtle) !important;
    }

.btn-icon.shadow {
    box-shadow: 0 4px 10px rgba(0,0,0,0.15) !important;
}

.object-fit-cover {
    object-fit: cover;
}