/* Sales / Purchase list tables — prevent action column overlap and clipped dropdowns */
.table-list-actions {
    position: relative;
}

.table-list-actions .rz-data-grid,
.table-list-actions .rz-grid-table-wrapper {
    overflow: visible !important;
}

/* Ensure the action column header and cells are properly pinned and completely opaque */
.table-list-actions .table-action-cell,
.table-action-cell,
.rz-grid-table td:last-child,
.table-list-actions .rz-grid-table td:last-child {
    white-space: nowrap;
    width: 96px;
    min-width: 96px;
    max-width: 120px;
    text-align: center;
    vertical-align: middle;
    position: sticky;
    right: 0;
    z-index: 2;
    overflow: visible;
    background-color: #ffffff;
    box-shadow: -2px 0 6px rgba(0, 0, 0, 0.04);
}

.table-list-actions .table-responsive {
    overflow-x: auto;
    overflow-y: visible;
}

/* Header sticky styling */
.table-list-actions .table thead th.table-action-cell,
.table thead th.table-action-cell,
.table thead th:last-child,
.table-list-actions .rz-grid-table thead th:last-child {
    position: sticky;
    right: 0;
    z-index: 4;
    background-color: #E6EAED !important;
    text-align: center;
    vertical-align: middle;
    box-shadow: -2px 0 6px rgba(0, 0, 0, 0.04);
}

/* Table zebra striping with 100% opaque backgrounds for sticky action cell */
.table-striped > tbody > tr:nth-of-type(odd) > td.table-action-cell,
.table-striped > tbody > tr:nth-of-type(odd) td:last-child,
.table-list-actions .rz-grid-table tbody tr:nth-child(odd) td:last-child {
    background-color: #f8f9fa !important;
}

.table-striped > tbody > tr:nth-of-type(even) > td.table-action-cell,
.table-striped > tbody > tr:nth-of-type(even) td:last-child,
.table-list-actions .rz-grid-table tbody tr:nth-child(even) td:last-child {
    background-color: #ffffff !important;
}

/* Table hover row sticky action cell */
.table-hover > tbody > tr:hover > td.table-action-cell,
.table-hover > tbody > tr:hover > td:last-child,
.table-list-actions .rz-grid-table tbody tr:hover td:last-child {
    background-color: #f1f5f9 !important;
}

/* Action Dropdown styling */
.table-action-dropdown {
    display: inline-flex;
    justify-content: center;
    position: relative;
}

.table-action-dropdown .dropdown-menu {
    min-width: 12rem;
    z-index: 1060;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 0;
}

.table-action-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    transition: background-color 0.12s ease;
}

.table-action-dropdown .dropdown-item:hover {
    background-color: #f1f5f9;
}

.table-action-dropdown.show,
.table-list-actions .dropdown.show {
    z-index: 1055;
}

.table-list-actions .table-action-icons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    white-space: nowrap;
}
