﻿#skg-filter-popup {
    display: none;
    position: absolute;
    background: #fff;
    border: 1px solid #bfbfbf;
    box-shadow: 0 3px 8px rgba(0,0,0,.25);
    z-index: 99999;
    width: 280px;
    min-height: 250px;
    max-height: 430px;
    display: flex;
    flex-direction: column;
}
.skg-header {
    padding: 8px 10px;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
    background: #f3f3f3;
    flex-shrink: 0;
}

.skg-item {
    padding: 8px 12px;
    cursor: pointer;
}

    .skg-item:hover {
        background: #e8f2ff;
    }

.skg-search {
    padding: 8px;
    flex-shrink: 0;
}

    .skg-search input {
        width: 100%;
        height: 30px;
        padding: 4px 8px;
        box-sizing: border-box;
    }

#skg-value-list {
    flex: 1;
    min-height: 80px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.skg-check {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    cursor: pointer;
}

    .skg-check input {
        margin-right: 6px;
    }
.skg-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    padding: 8px;
    border-top: 1px solid #ddd;
    background: #fff;
}
.skg-active {
    background: #dbeeff !important;
    color: #000;
    font-weight: 600;
}
.skg-item:hover {
    background: #e8f2ff;
}
.skg-item.skg-active {
    background: #cfe8ff !important;
    color: #000;
    font-weight: 600;
}



.skg-check {
    display: block;
    padding: 4px 8px;
    white-space: nowrap;
}

    .skg-check input {
        margin-right: 6px;
    }

.skg-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.skg-divider {
    height: 1px;
    background: #ddd;
    margin: 4px 0;
}
.skg-filter-icon {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 10;
}
#tblTrackinghist thead th {
    position: relative;
    padding-right: 20px;
}

#skg-custom-popup {
    display: none;
    position: absolute;
    background: #fff;
    border: 1px solid #bfbfbf;
    box-shadow: 0 3px 8px rgba(0,0,0,.25);
    z-index: 100000;
    width: 260px;
}

    #skg-custom-popup .skg-body {
        padding: 12px;
    }

    #skg-custom-popup select,
    #skg-custom-popup input {
        width: 100%;
        margin-bottom: 10px;
        box-sizing: border-box;
        padding: 6px;
    }
/*==================================================
    Active Filter Bar
==================================================*/

.skg-active-filter-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    margin: 10px 0;
    background: #fafafa;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
}

.skg-filter-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.skg-title {
    font-weight: 600;
    color: #444;
    white-space: nowrap;
}

    .skg-title i {
        margin-right: 5px;
        color: #0078d4;
    }

.skg-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skg-filter-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 14px;
    background: #0078d4;
    color: #fff;
    font-size: 12px;
    line-height: 18px;
    white-space: nowrap;
}

    .skg-filter-tag b {
        margin-right: 4px;
        font-weight: 600;
    }

.skg-clear-all {
    flex-shrink: 0;
}

/*==================================================
    Filtered Header
==================================================*/

th.skg-filtered {
    border-bottom: 3px solid #0078d4 !important;
}

/*==================================================
    Active Filter Icon
==================================================*/

.skg-filter-icon.active {
    color: #0078d4 !important;
    font-weight: bold;
}

.skg-disabled {
    color: #999 !important;
    pointer-events: none;
    cursor: default;
    opacity: .6;
}
.skg-filter-info {
    margin-top: 8px;
    padding: 6px;
    font-size: 11px;
    color: #666;
    background: #f8f8f8;
    border-top: 1px solid #ddd;
}
.skg-empty {
    padding: 12px;
    text-align: center;
    color: #888;
    font-style: italic;
}

#skg-btn-filter:disabled {
    opacity: .5;
    cursor: not-allowed;
}