/* Sobrescribir completamente los estilos de paginación DataTables */

/* Tamaño de letra para los tbody de DataTables */
.dataTables_wrapper tbody,
.dataTables_wrapper tbody td {
    font-size: 12px !important;
}

/* 1. Neutralizar específicamente la clase .page-link en DataTables */
.dataTables_wrapper .dataTables_paginate .paginate_button a.page-link {
    border: none !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-block;
    width: 100%;
    height: 100%;
}

.dataTables_wrapper .paginate_button.page-item {
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 3px !important;
}

/* 2. Resetear todos los estilos de paginación de DataTables */
.dataTables_wrapper .paginate_button,
.dataTables_wrapper .paginate_button.current,
.dataTables_wrapper .paginate_button.disabled {
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 3. Contenedor de paginación */
.dataTables_wrapper .dataTables_paginate {
    padding-top: 1rem;
    padding-bottom: 0.5rem;
    display: flex;
    justify-content: end;
    font-size: 12px !important; /* Tamaño de fuente para controles de paginación */
}

/* 4. Botones de paginación personalizados */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem !important;
    margin: 0 3px !important;
    padding: 0.375rem 0.75rem !important;
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    color: #212529 !important;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    font-size: 12px !important; /* Tamaño de fuente para botones de paginación */
}

/* 5. Estados del botón de paginación */
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
    color: #0d6efd !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background-color: #0b5ed7 !important;
    border-color: #0a58ca !important;
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
    color: #6c757d !important;
    border: 1px solid #dee2e6 !important;
    background: #f8f9fa !important;
    cursor: not-allowed;
    opacity: 0.65;
}

/* 6. Eliminar outline y efectos no deseados */
.dataTables_wrapper .dataTables_paginate .paginate_button:focus,
.dataTables_wrapper .dataTables_paginate .paginate_button:active {
    outline: none !important;
    box-shadow: none !important;
    background-color: #e9ecef !important;
}

/* 7. Solución específica para Firefox */
.dataTables_wrapper .dataTables_paginate .paginate_button::-moz-focus-inner {
    border: 0;
}

/* Mejoras para el input de búsqueda */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: 0;
}

/* Mejoras para selector de registros por página */
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    appearance: none;
    font-size: 12px !important; /* Tamaño de fuente para selector de registros */
}

/* Tamaño de letra para textos informativos de DataTables */
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length {
    font-size: 12px !important;
}

/* Estilos responsivos */
@media (max-width: 767.98px) {
    .dataTables_wrapper .dataTables_paginate {
        justify-content: center;
    }
    
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 0.25rem 0.5rem !important;
        font-size: 12px !important; /* Mantener el mismo tamaño en móviles */
    }
    
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length {
        text-align: center;
        margin-bottom: 1rem;
    }
}

/* Estilo para el botón de paginación */
.page-link {
    /* padding: 0.375rem 0.75rem !important; */
    font-size: 12px !important; /* Tamaño de fuente para enlaces de paginación */
}

.active>.page-link, .page-link.active {
    color: inherit !important;
}