/* Add CSS for fixed-left columns */
table.adminlist.fixed-column-action th.fixed-column,
table.adminlist.fixed-column-action td.fixed-column {
    position: sticky;
    background-color: inherit;
}

table.adminlist.fixed-column-action thead th.fixed-column {
    background-color: #fafae9;
    z-index: 1;
    /* Higher z-index for fixed columns in header */
    top: 0;
}

table.adminlist.fixed-column-action tbody td.fixed-column {
    background-color: #fafae9 !important;
}

/* Ensure proper background colors for different row types */
table.adminlist.fixed-column-action tbody tr.row0 td.fixed-column {
    background-color: #F9F9F9;
}

table.adminlist.fixed-column-action tbody tr.row1 td.fixed-column {
    background-color: #EAEAEA;
}

/* Ensure hover state maintains proper background */
table.adminlist.fixed-column-action tbody tr:hover td.fixed-column {
    background-color: #FFFFDD !important;
}

table.adminlist thead::before{
    content: "";
    position: absolute;
    left: 0;
    border-left: 1px solid #E7E7E7;
    height: 100%;
}
/* Thêm pseudo-element để tạo border giả khi scroll */
table.adminlist th::before {
    content: "";
    position: absolute;
    top: -2px;
    right: -1px;
    bottom: -1px;
    left: 0;
    border-bottom: 1px solid #999999;
    border-top: 2px solid #E7E7E7;
    border-right: 1px solid #E7E7E7;
    pointer-events: none; /* Cho phép click xuyên qua */
}
/* Thêm icon gim cột */
table.adminlist tbody tr.row0 td.fixed-column {
    background-color: #F9F9F9;
}

table.adminlist tbody tr.row1 td.fixed-column {
    background-color: #EAEAEA;
}

/* Ensure hover state maintains proper background */
table.adminlist tbody tr:hover td.fixed-column {
    background-color: #FFFFDD !important;
}

/* Pin button for fixed-column-action tables */
table.adminlist.fixed-column-action th .pin-button {
    cursor: pointer;
    display: none; /* Hide by default */
    width: 14px;
    height: 14px;
    vertical-align: middle;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    position: absolute;
    top: 0;
    right: 0;
}

table.adminlist.fixed-column-action th:hover .pin-button {
    display: inline-block; /* Show on th hover */
}

/* Keep pin-button visible if it's active, even without hover */
table.adminlist.fixed-column-action th .pin-button.active {
    display: inline-block;
}
table.adminlist.fixed-column-action th .pin-button:hover {
    opacity: 1;
}

table.adminlist.fixed-column-action th .pin-button:before {
    content: "\f08d"; /* Font Awesome pin icon */
    font-family: "FontAwesome";
    font-size: 14px;
    position: absolute;
    top: 0;
    left: 0;
    color: #666;
}

table.adminlist.fixed-column-action th .pin-button.active:before {
    color: var(--primary-color);
    opacity: 1;
}
