﻿﻿
.select2-results__message {
    display: none;
}

.select2-results__message:has(.spinner-border),
.select2-results__message:contains("Searching") {
    display: flex !important;
    justify-content: center;
    align-items: center;
    background: #fcfcfc !important;
    padding: 20px !important;
}

.select2-results__message:not(:has(.spinner-border)) {
    animation: fadeIn 0.5s forwards;
    animation-delay: 1s;
}

@@keyframes fadeIn {
    from {
        opacity: 0;
        display: none;
    }

    to {
        opacity: 1
        display: block;
    }
}



ebit-calculation [data-fn] {
    color: #566a7f;
}





#selected-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 0.85rem;
    border-radius: 8px;
    padding: 4px 6px 4px 14px;
    color: #5f61e6;
    background-color: rgba(95, 97, 230, 0.12);
    font-weight: bolder;
    border: 1px solid rgba(95, 97, 230, 0.3);
}

.dark-style #selected-badge {
    gap: 12px !important;
}


#selected-badge span {
    white-space: nowrap;
}

#selected-badge .btn-close {
    font-size: 0.5rem;
    background-color: #ffffff !important;
    opacity: 1 !important;
    padding: 0.4rem;
    transition: all 0.2s ease-in-out;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='rgb(95, 97, 230)'%3E%3Cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3E%3C/svg%3E") !important;
    background-size: 0.5rem;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    cursor: pointer;
}

    #selected-badge .btn-close:hover {
        background-color: rgb(95, 97, 230) !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3E%3Cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3E%3C/svg%3E") !important;
    }


.group-container {
    background: rgba(113, 221, 55, 0.05);
    border-radius: 8px;
    border-left: 4px solid #71dd37;
}

/* --- ☀️ LIGHT THEME PILL (Green) --- */
.group-pill {
    background: #ffffff !important;
    color: #71dd37;
    padding: 6px 14px;
    border-radius: 50px;
    border: 1.2px solid #c3e6cb;
    font-weight: 700;
    font-size: 10px;
    display: flex;
    align-items: center;
}

/* --- 🌙 DARK THEME PILL (Green) --- */
.dark-style .group-pill {
    background: rgba(113, 221, 55, 0.16) !important;
    color: #e8fadf !important;
    border-color: rgba(113, 221, 55, 0.4) !important;
}

.dark-style .group-container {
    background: rgba(113, 221, 55, 0.1);
    border-left-color: #71dd37;
}

.light-style .group-container {
    background: #f1fcf0 !important;
    border: 1px solid #dcf6d8 !important;
    border-left: 5px solid #71dd37 !important;
    border-radius: 12px;
}

.light-style .group-pill,
.light-style #filterDetailModal .badge {
    background-color: #ffffff !important;
    color: #566a7f !important;
    border: 1px solid #d9dee3 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
}

    .light-style .group-pill:hover {
        border-color: #696cff !important;
        transform: translateY(-1px);
    }

    .light-style .group-pill i {
        color: #71dd37 !important;
    }


.favorite-item {
    border: none !important;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: all 0.2s ease-in-out;
    font-size: 0.85rem;
    color: #566a7f;
}

    .favorite-item:hover {
        background-color: #f5f5f9;
        color: #696cff;
    }

    .favorite-item i.bx-star {
        font-size: 1.1rem;
    }

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 4px 30px 4px 10px !important;
    color: #334155 !important;
    font-size: 13px !important;
    position: relative !important;
    display: inline-block !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    background-color: transparent !important;
    border: none !important;
    border-left: 1px solid #cbd5e1 !important;
    border-right: none !important;
    color: #64748b !important;
    font-size: 16px !important;
    font-weight: bold !important;
    position: absolute !important;
    right: 0 !important;
    left: auto !important;
    top: 0 !important;
    height: 100% !important;
    width: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    margin: 0 !important;
}

    .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
        background-color: #ef4444 !important;
        color: white !important;
        border-radius: 0 5px 5px 0 !important;
    }

.select2-container--default .select2-selection--multiple {
    border: 1px solid #dee2e6 !important;
    min-height: 42px !important;
    padding: 2px 5px !important;
    border-radius: 8px !important;
}

.select2-search__field {
    margin-top: 7px !important;
    padding-left: 10px !important;
}
/* Loader Overlay */
.dt-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

/* Spinner Animation */
.dt-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #5c6bc0; /* Aapka indigo blue color */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


    #createtransation .dataTables_length,
    #createtransation .dataTables_filter,
    #createtransation .dataTables_info,
    #createtransation .dataTables_paginate {
        display: none !important;
    }
  
    
[data-grid] tr td,
[data-grid] tr th {
    background-color: #ffffff;
    border-bottom: 1px solid #eaecf0 !important;
    padding-top: 10px;
    padding-bottom: 10px;
    color: #697a8d;
}

[data-grid] thead th {
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #d1d5db !important;
}



/* 1. Default button ko customize karein */
#universalSearch::-webkit-search-cancel-button {
    -webkit-appearance: none;
    height: 22px;
    width: 22px;
    border-radius: 50%;
    background-color: #5A67D8;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cline x1='18' y1='6' x2='6' y2='18'%3e%3c/line%3e%3cline x1='6' y1='6' x2='18' y2='18'%3e%3c/line%3e%3c/svg%3e");
    background-size: 12px;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer !important;
    margin-right: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

    #universalSearch::-webkit-search-cancel-button:hover {
        background-color: #434190;
        transform: scale(1.1);
    }

    #universalSearch::-webkit-search-cancel-button:active {
        background-color: #ff4d4d;
    }


#btnCreate {
    transition: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
}

.modal {
    z-index: 1070 !important;
}

.modal-backdrop {
    z-index: 1060 !important;
}

ebit-header {
    z-index: 1001;
}

[data-grid] input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    cursor: pointer;
    margin: 5px;
}

/* Mobile par khas taur par touch target fix karne ke liye */
@media (max-width: 768px) {
    [data-grid] td:first-child,
    [data-grid] th:first-child {
        min-width: 44px !important;
        min-height: 44px !important;
    }
}

@media (max-width: 984px) {
    #selection-actions-menu.show {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 90% !important;
        max-width: 320px;
        margin: 0 auto;
        box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.4);
        z-index: 9999;
    }

    #actions-wrapper {
        margin-left: 0 !important;
        justify-content: flex-start;
    }

    #selection-actions-menu .dropdown-item {
        padding: 12px 16px;
        font-size: 1rem;
    }
}


table.table thead th::before,
table.table thead th::after {
    display: none !important;
}


table.bg-white,
table.bg-white tr td {
    background-color: #ffffff !important;
}

    table.bg-white thead tr th,
    table.bg-white thead tr td {
        background-color: #F9FAFB !important;
    }

.table-hover tbody tr:hover td {
    background-color: #f8f9fa !important;
    cursor: pointer;
}

.table-hover tbody tr td {
    transition: background-color 0.2s ease;
}


table.dataTable tbody td {
    pointer-events: auto !important;
}

.table-responsive-container {
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    display: block !important;
    -webkit-overflow-scrolling: touch;
}

.dataTables_scrollHead,
.dataTables_scrollBody,
.dataTables_scrollFoot {
    overflow: visible !important;
    width: auto !important;
}

[data-grid] {
    min-width: 1100px !important;
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
}


.dropdown-container-class {
    position: absolute !important;
    z-index: 9999 !important;
    overflow: visible !important;
}

[data-grid-detail], .wrap-table {
    overflow: visible !important;
}


ebit-calculation.totals {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.label-col, .value-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .label-col ebit-label,
    .value-col p {
        margin: 0 !important;
        line-height: 1.5;
        height: 24px;
        display: flex;
        align-items: center;
    }

    .value-col p {
        text-align: right;
        justify-content: flex-end;
        width: 100%;
        color: #566a7f;
    }



ebit-calculation.totals {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 20px;
    padding: 1rem 1.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.label-col {
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
}

.value-col {
    text-align: right;
    min-width: 100px;
    flex-shrink: 0;
}

/* Mobile responsive  */
@@media (max-width: 576px) {
    ebit-calculation .totals {
        gap: 10px;
        padding: 1rem 0.5rem;
    }
}

ebit-body {
    display: block;
    min-height: 100px;
    width: 100%;
}

ebit-row {
    display: flex !important;
    flex-wrap: wrap;
    width: 100% !important;
    min-height: 60px !important;
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
    padding-bottom: 10px;
}

ebit-table.no-hover {
    --bs-table-hover-bg: transparent !important;
    --bs-table-accent-bg: transparent !important;
}

    ebit-table.no-hover tr:hover {
        background-color: transparent !important;
    }


ebit-row {
    display: block !important;
    width: 100% !important;
    min-height: 50px !important;
    clear: both;
}

ebit-field[col="6"] {
    display: flex !important;
    align-items: center !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

ebit-field ebit-label {
    margin-top:7px !important;
    margin-bottom: 0 !important;
    margin-right: 10px !important;
    white-space: nowrap;
}

ebit-field ebit-section {
    flex: 1;
}

ebit-section[row="true"] {
    margin-left: -15px;
    margin-right: -15px;
}



.select2-container--default .select2-selection--single {
    height: 38px !important;
    border-bottom: 1px solid #ddd !important;
    display: flex;
    align-items: center;
}

    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 36px !important;
        top: 1px !important;
        display: block !important;
    }

[data-grid-detail] tbody tr {
    background-color: #ffffff !important;
    border-bottom: 1px solid #eee;
}
    ebit-row

{
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

ebit-bodycolumn {
    border: none !important;
    padding: 5px;
}

.wrap-table tr,
.wrap-table div[class*="ebit-row"] {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    gap: 0;
}

.wrap-table td,
.wrap-table div[class*="ebit-bodycolumn"] {
    display: block !important;
    flex-shrink: 0 !important;
}

.scroll-container {
    width: 100%;
    overflow-x: auto !important;
    display: block !important;
    -webkit-overflow-scrolling: touch;
}

/* --- SMALL SCREENS (Mobile/Tablets) --- */
@media screen and (max-width: 992px) {
    .responsive-content {
        width: 1100px !important;
        display: block !important;
    }

    .table-responsive-container {
        overflow-x: auto !important;
    }
}

/* --- LARGE SCREENS (Desktop/Laptops & Zoom Fix) 🎯 --- */
@media screen and (min-width: 993px) {
    .responsive-content {
        display: block;
        width: 100% !important;
    }

    .scroll-container {
        overflow-x: hidden !important;
    }

    .table-responsive-container {
        overflow-x: clip !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    [data-grid] {
        width: 100% !important;
        min-width: 1100px !important;
        table-layout: fixed !important;
    }

    .group-row,
    .group-footer-row,
    .database-addon-row,
    .group-row td,
    .group-footer-row td {
        box-sizing: border-box !important;
        max-width: 100% !important;
    }
}

@media screen and (min-width: 993px) and (max-width: 1120px) {
    .table-responsive-container {
        overflow-x: auto !important; 
    }
}



#searchbar.hide-search {
    display: none !important;
}

#customPagination.shifted-to-right {
    display: flex !important;
    align-items: center !important;
    margin-right: 15px !important; 
    visibility: visible !important;
    opacity: 1 !important;
}

#rightContainer, .right-toggles-container {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

/* Jab URL me /create ya koi deep record ID ho, toh un elements ko pehle se hi hide rakho */
body:has([href*="/create"]),
window-location-path-contains-edit {
    /* Yeh automatic server-side layout handling ka kaam karega */
}

/* Sabse asaan tareeqa: loading container background fix */
#createtransation.active {
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
/* Cross Icon Pointer */
.deselect-all-trigger, .btn-close.deselect-all-trigger, #clearSelectionBadge, .badge-cross-icon {
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: transform 0.15s ease-in-out, opacity 0.15s ease-in-out;
}

    .deselect-all-trigger:hover, .btn-close.deselect-all-trigger:hover, #clearSelectionBadge:hover, .badge-cross-icon:hover {
        transform: scale(1.15);
        opacity: 0.85;
    }

/* ------------------------------------------------------------- */
/* 🚀 Dynamic Search vs Selection Center Smooth Slide Animation */
/* ------------------------------------------------------------- */

/* Searchbar & Selection Center Smooth Base Rules */
#searchbar, .search-container, .input-group, #selectionCenterPlacement {
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s ease-in-out !important;
    will-change: transform, opacity, visibility;
}

/* Hide Search Bar Smoothly */
.hide-search {
    opacity: 0 !important;
    transform: translateY(-8px) scale(0.98) !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
}

/* Show Search Bar Smoothly */
.show-search {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: relative !important;
}

/* Selection Center Hidden State */
#selectionCenterPlacement:not(.show-actions) {
    opacity: 0 !important;
    transform: translateY(-8px) scale(0.98) !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
}

/* Selection Center Visible State (Smooth Slide In) */
#selectionCenterPlacement.show-actions {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: relative !important;
}

/* Attractive Dropdown Menu Customization */
.styled-dropdown-menu {
    border-radius: 10px !important;
    box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.12) !important;
    padding: 6px 4px !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

    .styled-dropdown-menu .dropdown-item {
        border-radius: 6px;
        font-size: 13.5px;
        transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
    }

        .styled-dropdown-menu .dropdown-item:hover {
            background-color: #f1f5f9 !important;
            color: #0f172a !important;
        }

    @media (max-width: 576px) {
      

        #headerSelectionMenu, .styled-dropdown-menu {
            max-width: 85vw !important;
            right: 20vw !important;
            left: auto !important;
            top: 50% !important;
        }

            #headerSelectionMenu.show,
            .selection-menu-scoped.show {
                position: absolute !important;
                top: 100% !important;
                z-index: 10 !important;
            }
    }

ebit-calculation.totals {
    display: flex;
    flex-direction: column;
    width: max-content;
    margin-left: auto;
    padding: 10px;
}


ebit-calculation .total-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important; 
}

    ebit-calculation .total-row ebit-label {
        font-weight: 600;
    }

    ebit-calculation .total-row .value-col {
        font-weight: bold;
    }
/* Container Box */
.date-picker-container {
    position: relative; /* Extremely Important */
    display: inline-block;
}

/* Button Styling */
.date-trigger {
    padding: 10px 16px;
    background: #ffffff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

.arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

/* Dropdown styling - Default hidden */
.date-dropdown {
    display: none; /* By default hidden */
    position: absolute;
    top: calc(100% + 4px); /* Directly below button */
    left: 0;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid #ddd;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    padding: 12px;
    z-index: 999999; /* Higher z-index */
}

    /* ACTIVE/SHOW CLASS - Is class se dropdown visible hoga */
    .date-dropdown.show {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

/* Active Arrow Rotation */
.date-trigger.active .arrow {
    transform: rotate(180deg);
}