/* TabulatorJS - Bootstrap-compatible styling */

/* Main table container */
.tabulator {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    font-size: 0.95rem;
}

/* Header styling */
.tabulator .tabulator-header {
    background-color: #343a40;
    color: #ffffff;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.tabulator .tabulator-header .tabulator-col {
    background-color: #343a40;
    border-right: 1px solid #495057;
    padding: 12px 10px;
}

.tabulator .tabulator-header .tabulator-col:hover {
    background-color: #495057;
}

.tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover {
    cursor: pointer;
    background-color: #495057;
}

/* Sort arrows */
.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter {
    color: #ffffff;
}

.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title {
    padding-right: 20px;
}

/* Row styling */
.tabulator .tabulator-tableholder .tabulator-table {
    background-color: #ffffff;
}

.tabulator .tabulator-row {
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
    min-height: 45px;
}

.tabulator .tabulator-row:hover {
    background-color: #f8f9fa !important;
}

.tabulator .tabulator-row.tabulator-selectable:hover {
    background-color: #f8f9fa !important;
    cursor: pointer;
}

/* Alternating row colors */
.tabulator .tabulator-row:nth-child(even) {
    background-color: #f8f9fa;
}

.tabulator .tabulator-row:nth-child(even):hover {
    background-color: #e9ecef !important;
}

/* Cell styling */
.tabulator .tabulator-row .tabulator-cell {
    padding: 10px;
    border-right: 1px solid #dee2e6;
}

.tabulator .tabulator-row .tabulator-cell:last-child {
    border-right: none;
}

/* Pagination styling */
.tabulator .tabulator-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 10px;
}

.tabulator .tabulator-footer .tabulator-pages {
    margin: 0 10px;
}

.tabulator .tabulator-footer .tabulator-page {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    color: #0d6efd;
    padding: 6px 12px;
    margin: 0 2px;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.tabulator .tabulator-footer .tabulator-page:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.tabulator .tabulator-footer .tabulator-page.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #ffffff;
}

.tabulator .tabulator-footer .tabulator-page:disabled {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
}

/* Page size selector */
.tabulator .tabulator-footer .tabulator-page-size {
    padding: 6px 10px;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    background-color: #ffffff;
    color: #212529;
    font-size: 0.9rem;
}

/* Loading overlay */
.tabulator .tabulator-loader {
    background-color: rgba(255, 255, 255, 0.9);
}

.tabulator .tabulator-loader .tabulator-loader-msg {
    background-color: #0d6efd;
    color: #ffffff;
    border-radius: 0.375rem;
    padding: 15px 30px;
}

/* Filter input styling */
.tabulator .tabulator-header-filter input,
.tabulator .tabulator-header-filter select {
    background-color: #ffffff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 6px 10px;
    font-size: 0.9rem;
    width: 100%;
    margin-top: 5px;
}

.tabulator .tabulator-header-filter input:focus,
.tabulator .tabulator-header-filter select:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tabulator {
        font-size: 0.85rem;
    }
    
    .tabulator .tabulator-header .tabulator-col {
        padding: 8px 6px;
    }
    
    .tabulator .tabulator-row .tabulator-cell {
        padding: 8px 6px;
    }
    
    .tabulator .tabulator-footer .tabulator-page {
        padding: 4px 8px;
        font-size: 0.85rem;
    }
}

/* Action buttons in table */
.tabulator-action-btn {
    padding: 4px 8px;
    margin: 0 2px;
    font-size: 0.85rem;
    border-radius: 0.25rem;
    text-decoration: none;
    display: inline-block;
}

.tabulator-action-btn-primary {
    background-color: transparent;
    border: 1px solid #0d6efd;
    color: #0d6efd;
}

.tabulator-action-btn-primary:hover {
    background-color: #0d6efd;
    color: #ffffff;
}

.tabulator-action-btn-info {
    background-color: transparent;
    border: 1px solid #0dcaf0;
    color: #0dcaf0;
}

.tabulator-action-btn-info:hover {
    background-color: #0dcaf0;
    color: #ffffff;
}

.tabulator-action-btn-danger {
    background-color: transparent;
    border: 1px solid #dc3545;
    color: #dc3545;
}

.tabulator-action-btn-danger:hover {
    background-color: #dc3545;
    color: #ffffff;
}

/* Badge styling in table */
.tabulator-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.25rem;
    line-height: 1;
}

.tabulator-badge-primary {
    background-color: #0d6efd;
    color: #ffffff;
}

.tabulator-badge-secondary {
    background-color: #6c757d;
    color: #ffffff;
}

.tabulator-badge-success {
    background-color: #198754;
    color: #ffffff;
}

.tabulator-badge-danger {
    background-color: #dc3545;
    color: #ffffff;
}

.tabulator-badge-warning {
    background-color: #ffc107;
    color: #000000;
}

.tabulator-badge-info {
    background-color: #0dcaf0;
    color: #000000;
}

/* Empty state */
.tabulator-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.tabulator-empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.tabulator-empty-state h5 {
    margin-bottom: 10px;
    font-weight: 500;
}

.tabulator-empty-state p {
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Scrollbar styling */
.tabulator .tabulator-tableholder::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.tabulator .tabulator-tableholder::-webkit-scrollbar-track {
    background-color: #f1f1f1;
}

.tabulator .tabulator-tableholder::-webkit-scrollbar-thumb {
    background-color: #c1c1c1;
    border-radius: 5px;
}

.tabulator .tabulator-tableholder::-webkit-scrollbar-thumb:hover {
    background-color: #a8a8a8;
}
