/**
 * DataTables en Modales - Estilos personalizados
 * Para tablas dentro de modales: sin búsqueda, sin paginación, sin selector de registros
 * Autor: CeibeRRHH
 * Fecha: 06-10-2025
 */

/* Ocultar barra de búsqueda en DataTables de modales */
.datatable-modal-wrapper .dataTables_filter {
    display: none !important;
}

/* Ocultar selector de cantidad de registros */
.datatable-modal-wrapper .dataTables_length {
    display: none !important;
}

/* Ocultar información de registros (Showing 1 to X of Y entries) */
.datatable-modal-wrapper .dataTables_info {
    display: none !important;
}

/* Ocultar controles de paginación */
.datatable-modal-wrapper .dataTables_paginate {
    display: none !important;
}

/* Ajustar el wrapper para que no tenga espacio extra */
.datatable-modal-wrapper .dataTables_wrapper {
    padding: 0 !important;
    margin: 0 !important;
}

/* Mantener solo la tabla visible con buen espaciado */
.datatable-modal-wrapper .dataTable {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Asegurar que el contenedor de la tabla no tenga padding excesivo */
.datatable-modal-wrapper .dataTables_scroll {
    padding: 0 !important;
    margin: 0 !important;
}

/* Eliminar padding del scrollHead */
.datatable-modal-wrapper .dataTables_scrollHead {
    padding: 0 !important;
    margin: 0 !important;
}

/* Eliminar padding del scrollBody */
.datatable-modal-wrapper .dataTables_scrollBody {
    padding: 0 !important;
    margin: 0 !important;
}

/* Tabla sin márgenes ni padding externos, CON border */
.datatable-modal-wrapper table.dataTable {
    margin: 0 !important;
    border: 1px solid #e5e7eb !important; /* border-gray-200 */
    border-radius: 0.5rem !important; /* rounded-lg */
    overflow: hidden !important;
}

/* Estilo compacto para las celdas en modales */
.datatable-modal-wrapper .dataTable td,
.datatable-modal-wrapper .dataTable th {
    padding: 8px 12px !important;
    font-size: 0.875rem !important; /* text-sm */
}

/* Headers más compactos */
.datatable-modal-wrapper .material-thead th {
    padding: 10px 12px !important;
    font-size: 0.813rem !important; /* text-xs */
    font-weight: 600 !important;
}

/* Mejorar apariencia de filas hover */
.datatable-modal-wrapper .dataTable tbody tr:hover {
    background-color: #f3f4f6 !important; /* gray-100 */
}

/* Eliminar cualquier margen extra del wrapper principal y TODO el padding */
.datatable-modal-wrapper {
    margin: 0 !important;
    padding: 0 !important;        /* SIN padding */
    background-color: white !important;
}

/* Asegurar que no haya espacio entre el header y el body de la tabla */
.datatable-modal-wrapper .dataTables_scrollHead {
    margin-bottom: 0 !important;
}

.datatable-modal-wrapper .dataTables_scrollBody {
    margin-top: 0 !important;
}
