/* DataTables 2.x styling */

.dt-container {
    font-size: 0.875rem;
}

/* Top row: length left, search right */
.dt-layout-row:first-child {
    margin-bottom: 1rem;
}

/* Search input */
.dt-search input.dt-input {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
    min-width: 220px;
    font-size: 0.875rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dt-search input.dt-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 0.15rem rgba(var(--color-primary-rgb), 0.2);
    outline: none;
}

/* Length selector */
.dt-length select.dt-input {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.375rem 2rem 0.375rem 0.5rem;
}

/* Info text */
.dt-info {
    padding-top: 0.5rem;
    color: #6c757d;
    font-size: 0.8125rem;
}

/* Table */
table.dataTable {
    width: 100% !important;
    border-collapse: collapse;
}
table.dataTable thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    white-space: nowrap;
}
table.dataTable tbody td {
    padding: 0.625rem 0.75rem;
    border-top: 1px solid #eee;
    vertical-align: middle;
    font-size: 15px;
}
table.dataTable tbody tr:hover {
    background: rgba(var(--color-primary-rgb), 0.04);
}

/* Pagination */
.dt-paging {
    padding-top: 0.75rem;
}
.dt-paging .pagination {
    margin-bottom: 0;
    gap: 4px;
}
.dt-paging .pagination .page-item .page-link {
    border-radius: 6px;
    padding: 0.375rem 0.625rem;
    font-weight: 500;
    color: #495057;
    background: #fff;
    border: 1px solid #dee2e6;
    transition: all 0.15s ease;
    min-width: 2rem;
    text-align: center;
}
.dt-paging .pagination .page-item .page-link:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}
.dt-paging .pagination .page-item.active .page-link {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}
.dt-paging .pagination .page-item.disabled .page-link {
    color: #adb5bd;
    pointer-events: none;
    background: transparent;
    border-color: transparent;
}

/* Export buttons */
.dt-buttons {
    margin-bottom: 0.75rem;
}
.dt-buttons .btn {
    margin-right: 0.375rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
}

/* Table skeleton before init */
table.dataTable:not(.dataTable) {
    opacity: 0;
}

/* Processing overlay */
.dt-processing {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: rgba(255,255,255,0.95);
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Action column */
.product-table th:last-child,
.product-table td:last-child {
    min-width: 100px;
    text-align: center;
}

/* Checkboxes */
table.dataTable input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    min-width: auto !important;
    max-width: 16px !important;
}
table.dataTable th.dt-check-col,
table.dataTable td.dt-check-col {
    width: auto !important;
    min-width: fit-content !important;
    max-width: fit-content !important;
    text-align: center;
    padding: 8px 4px !important;
}
