/* Scrollable table wrapper with sticky header and scroll indicators */
.table-scroll-wrapper {
    position: relative;
}

.table-scroll-wrapper .table-responsive {
    overflow: auto;
}

/* Scroll shadow indicators */
.table-scroll-wrapper::before,
.table-scroll-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.table-scroll-wrapper::before {
    left: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
}

.table-scroll-wrapper::after {
    right: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
}

.table-scroll-wrapper.can-scroll-left::before {
    opacity: 1;
}

.table-scroll-wrapper.can-scroll-right::after {
    opacity: 1;
}

/* Make scrollbar more visible */
.table-scroll-wrapper .table-responsive::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.table-scroll-wrapper .table-responsive::-webkit-scrollbar-track {
    background: #343a40;
    border-radius: 5px;
}

.table-scroll-wrapper .table-responsive::-webkit-scrollbar-thumb {
    background: #6c757d;
    border-radius: 5px;
}

.table-scroll-wrapper .table-responsive::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Sticky table header */
.table-scroll-wrapper table {
    border-collapse: separate;
    border-spacing: 0;
}

.table-scroll-wrapper thead th {
    position: sticky;
    top: 0;
    background: #171a1f;
    z-index: 5;
    border-top: none !important;
    border-bottom: 2px solid #2d3138 !important;
}

/* Prevent double borders with border-collapse: separate */
.table-scroll-wrapper tbody td {
    border-top: none !important;
}

.table-scroll-wrapper tbody tr {
    border-bottom: 1px solid var(--border-subtle, #2d3138);
}
