/* Global DataTable Styling for All Templates */

/* Target DataTable dynamically created rows */
#data tbody tr td {
    line-height: 2.0 !important;
    padding: 0.25rem 0.5rem !important;
}

#data thead tr th {
    line-height: 1.2 !important;
    padding: 0.5rem 0.75rem !important;
}

/* More height for dt_group class */
.dt_group {
    line-height: 1.4 !important;
    padding: 0.75rem 1rem !important;
}

/* ID column should have more width to prevent overlap */
#data th:nth-child(2),
#data td:nth-child(2) {
    min-width: 80px !important;
    width: 80px !important;
    white-space: nowrap !important;
}

/* Target all table rows globally */
.table td, .table th {
    line-height: 2.0 !important;
    padding: 0.25rem 0.5rem !important;
}

/* Force styling on DataTable rows after they're created */
#data tbody tr {
    line-height: 2.0 !important;
}

#data thead tr {
    line-height: 1.2 !important;
}

/* Make it even more compact for mobile */
@media (max-width: 768px) {
    #data tbody tr td {
        line-height: 2.0 !important;
        padding: 0.2rem 0.4rem !important;
    }
    
    #data thead tr th {
        line-height: 1.1 !important;
        padding: 0.35rem 0.5rem !important;
    }

    .table td, .table th {
        line-height: 2.0 !important;
        padding: 0.2rem 0.4rem !important;
    }
}

/* Additional DataTable optimizations */
.table-responsive {
    font-size: 0.875rem;
}

.table-compact tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.table-compact.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-compact .action-buttons {
    white-space: nowrap;
    min-width: 120px;
}

.table-compact .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-active { background-color: #28a745; }
.status-inactive { background-color: #6c757d; }
.status-pending { background-color: #ffc107; }
.status-error { background-color: #dc3545; }
