.data-table-wrapper {
    position: relative;
    margin: 1rem 0;
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.bulk-actions {
    display: flex;
    gap: 0.5rem;
}

.table-settings {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.table-container {
    overflow-x: auto;
    position: relative;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
}

.table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    position: relative;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 0.75rem;
    text-align: left;
    white-space: nowrap;
}

.table td {
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
    white-space: nowrap;
}

.resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    cursor: col-resize;
}

.resize-handle:hover {
    background: #0d6efd;
}

.column-visibility-toggle {
    position: relative;
}

.column-list {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.5rem;
    min-width: 200px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.column-list label {
    display: block;
    padding: 0.25rem;
    margin: 0;
    cursor: pointer;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.page-info {
    min-width: 150px;
    text-align: center;
}

.table tr:hover {
    background-color: rgba(0,0,0,0.02);
}

.table tr.selected {
    background-color: rgba(13,110,253,0.1);
}

.table th.sortable {
    cursor: pointer;
}

.table th.sortable:hover {
    background-color: #e9ecef;
}

.table th.sorted-asc::after,
.table th.sorted-desc::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.5rem;
    vertical-align: middle;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

.table th.sorted-asc::after {
    border-bottom: 4px solid #000;
}

.table th.sorted-desc::after {
    border-top: 4px solid #000;
}

/* Loading state */
.table-container.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .table-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .bulk-actions,
    .table-settings {
        width: 100%;
        justify-content: space-between;
    }
}

/* Data Table Enhancements */

/* Sortable column styling */
.sortable {
    position: relative;
    user-select: none;
    transition: background-color 0.2s ease;
}

.sortable:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.sortable::after {
    content: '↕';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
    font-size: 12px;
}

.sortable.sort-asc::after {
    content: '↑';
    opacity: 1;
    color: #0d6efd;
}

.sortable.sort-desc::after {
    content: '↓';
    opacity: 1;
    color: #0d6efd;
}

/* Person list specific styling */
.person-avatar {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
}

.person-name {
    line-height: 1.2;
}

.person-job-title {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 2px;
}

/* Enhanced table styling */
.table-vcenter td {
    vertical-align: middle;
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Loading and error states */
.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-state {
    padding: 2rem;
    text-align: center;
}

.error-state .icon {
    color: #dc3545;
    margin-bottom: 1rem;
}

/* Status badges */
.badge {
    font-size: 0.75em;
    font-weight: 500;
}

/* Pagination styling */
.pagination-sm .page-link {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Search and filter styling */
.filter-row {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.search-highlight {
    background-color: #fff3cd;
    padding: 0.1rem 0.2rem;
    border-radius: 0.2rem;
}

/* Responsive table improvements */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.125rem 0.25rem;
        font-size: 0.6875rem;
    }
    
    .person-avatar {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }
}

/* Table Selectable Enhancements */
.table-selectable .table-selectable-check {
    margin: 0;
}

.table-selectable .on-checked {
    display: none;
}

.table-selectable .on-unchecked {
    display: block;
}

.table-selectable tr.selected .on-checked {
    display: block;
}

.table-selectable tr.selected .on-unchecked {
    display: none;
}

/* Table Sort Button Styling */
.table-sort {
    background: none;
    border: none;
    padding: 0;
    font-weight: inherit;
    color: inherit;
    cursor: pointer;
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-sort:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.table-sort::after {
    content: '↕';
    opacity: 0.3;
    font-size: 12px;
    margin-left: 4px;
}

.table-sort[data-sort*="sort-"]:hover::after {
    opacity: 0.7;
}

/* Pagination Enhancements */
.pagination .page-link.cursor-pointer {
    cursor: pointer;
}

.pagination .page-item.disabled .page-link {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Card Table Footer */
.card-footer .dropdown .btn {
    border: 1px solid #d1d7e0;
    background: #fff;
    color: #626976;
}

.card-footer .dropdown .btn:hover {
    background: #f8f9fa;
    border-color: #b1b7c1;
}

.card-footer .dropdown-menu {
    border: 1px solid #d1d7e0;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-footer .dropdown-item {
    padding: 0.5rem 1rem;
    color: #626976;
}

.card-footer .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #1e293b;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .card-footer .dropdown {
        align-self: flex-start;
    }
    
    .card-footer .pagination {
        align-self: center;
    }
} 